Example usage for javax.xml.ws.spi Provider Provider

List of usage examples for javax.xml.ws.spi Provider Provider

Introduction

In this page you can find the example usage for javax.xml.ws.spi Provider Provider.

Prototype

protected Provider() 

Source Link

Document

Creates a new instance of Provider

Usage

From source file:be.agiv.security.client.IPSTSClient.java

/**
 * Main constructor.//from w w w  .  j  a va2 s  .  c  o m
 * 
 * @param location
 *            the location of the IP-STS WS-Trust web service.
 * @param realm
 *            the AGIV R-STS realm.
 * @param secondaryParametersNodeList
 *            the DOM node list that will be used as SecondaryParameters for
 *            RST requests.
 */
public IPSTSClient(String location, String realm, NodeList secondaryParametersNodeList) {
    this.location = location;
    this.realm = realm;

    Provider jaxwsProvider = Provider.provider();
    LOG.debug("JAX-WS provider: " + jaxwsProvider.getClass().getName());

    SecurityTokenService_Service service = SecurityTokenServiceFactory.getInstance();
    this.port = service.getSecurityTokenServicePort();
    BindingProvider bindingProvider = (BindingProvider) this.port;
    bindingProvider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

    Binding binding = bindingProvider.getBinding();
    List<Handler> handlerChain = binding.getHandlerChain();
    this.wsTrustHandler = new WSTrustHandler();
    this.wsTrustHandler.setSecondaryParameters(secondaryParametersNodeList);
    handlerChain.add(this.wsTrustHandler);
    this.wsAddressingHandler = new WSAddressingHandler();
    handlerChain.add(this.wsAddressingHandler);
    this.wsSecurityHandler = new WSSecurityHandler();
    handlerChain.add(this.wsSecurityHandler);
    handlerChain.add(new LoggingHandler());
    binding.setHandlerChain(handlerChain);

    this.objectFactory = new ObjectFactory();
    this.policyObjectFactory = new be.agiv.security.jaxb.wspolicy.ObjectFactory();
    this.addrObjectFactory = new be.agiv.security.jaxb.wsaddr.ObjectFactory();
    this.wssObjectFactory = new be.agiv.security.jaxb.wsse.ObjectFactory();

    this.secureRandom = new SecureRandom();
    this.secureRandom.setSeed(System.currentTimeMillis());
}

From source file:be.agiv.security.demo.Main.java

private void showAbout() {
    this.statusBar.setStatus("Written by Frank Cornelis");
    Provider jaxWsProvider = Provider.provider();
    JOptionPane.showMessageDialog(this,
            "AGIV Java Security Demo " + getVersion() + "\n" + "Copyright (C) 2011-2013 AGIV.\n"
                    + "Licensed under GNU LGPL 3.0.\n\n" + "Java version: " + System.getProperty("java.version")
                    + "\n" + "System: " + System.getProperty("os.name") + " " + System.getProperty("os.version")
                    + " " + System.getProperty("os.arch") + "\n\n" + "JAX-WS provider: "
                    + jaxWsProvider.getClass().getName(),
            "About", JOptionPane.INFORMATION_MESSAGE);
}

From source file:test.integ.be.agiv.security.Axis2Test.java

@Test
public void testProvider() throws Exception {
    Provider provider = Provider.provider();
    LOG.debug("provider class: " + provider.getClass().getName());
    assertEquals("org.apache.axis2.jaxws.spi.Provider", provider.getClass().getName());
}

From source file:test.integ.be.agiv.security.CXFTest.java

@Test
public void testProvider() throws Exception {
    Provider provider = Provider.provider();
    LOG.debug("provider class: " + provider.getClass().getName());
    assertEquals("org.apache.cxf.jaxws22.spi.ProviderImpl", provider.getClass().getName());
}

From source file:test.integ.be.agiv.security.metro.MetroTest.java

@Test
public void testProvider() throws Exception {
    Provider provider = Provider.provider();
    LOG.debug("provider class: " + provider.getClass().getName());
    assertEquals("com.sun.xml.ws.spi.ProviderImpl", provider.getClass().getName());
}

From source file:test.integ.be.e_contract.mycarenet.cxf.CXFTest.java

@Test
public void testProvider() {
    Provider provider = Provider.provider();
    LOG.debug("provider class: " + provider.getClass().getName());
    assertEquals("org.apache.cxf.jaxws22.spi.ProviderImpl", provider.getClass().getName());
}

From source file:test.integ.be.fedict.eid.dss.cxf.CXFTest.java

@Test
public void testProvider() {
    Provider provider = Provider.provider();
    LOG.debug("provider: " + provider.getClass().getName());
    assertEquals("org.apache.cxf.jaxws22.spi.ProviderImpl", provider.getClass().getName());
}