Example usage for javax.xml.ws BindingProvider ENDPOINT_ADDRESS_PROPERTY

List of usage examples for javax.xml.ws BindingProvider ENDPOINT_ADDRESS_PROPERTY

Introduction

In this page you can find the example usage for javax.xml.ws BindingProvider ENDPOINT_ADDRESS_PROPERTY.

Prototype

String ENDPOINT_ADDRESS_PROPERTY

To view the source code for javax.xml.ws BindingProvider ENDPOINT_ADDRESS_PROPERTY.

Click Source Link

Document

Standard property: Target service endpoint address.

Usage

From source file:org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport.java

@Override
public UDDIInquiryPortType getUDDIInquiryService(String endpointURL) throws TransportException {
    try {/*from w w  w  . j a va  2s .  c o m*/
        if (inquiryv2 == null) {
            inquiryv2 = new Inquiry3to2();

        }
        if (endpointURL == null) {
            UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
            endpointURL = client.getClientConfig().getUDDINode(nodeName).getInquiryUrl();
        }
        Map<String, Object> requestContext = ((BindingProvider) inquiryv2).getRequestContext();
        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
        setCredentials(requestContext);
    } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
    }
    return inquiryv2;

}

From source file:org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport.java

@Override
public UDDISecurityPortType getUDDISecurityService(String endpointURL) throws TransportException {
    try {//w  ww.ja va 2  s.c  o m
        if (securityv2 == null) {
            securityv2 = new Security3to2();

        }

        if (endpointURL == null) {
            UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
            endpointURL = client.getClientConfig().getUDDINode(nodeName).getPublishUrl();
        }
        Map<String, Object> requestContext = ((BindingProvider) securityv2).getRequestContext();
        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
        setCredentials(requestContext);
    } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
    }
    return securityv2;

}

From source file:org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport.java

@Override
public UDDIPublicationPortType getUDDIPublishService(String endpointURL) throws TransportException {
    try {//  w w  w  .ja va2 s  . c o m
        if (publishv2 == null) {
            publishv2 = new Publish3to2();

        }
        if (endpointURL == null) {
            UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
            endpointURL = client.getClientConfig().getUDDINode(nodeName).getPublishUrl();
        }

        Map<String, Object> requestContext = ((BindingProvider) publishv2).getRequestContext();
        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
        setCredentials(requestContext);
    } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
    }
    return publishv2;
}

From source file:org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport.java

public Inquire getUDDIv2InquiryService(String endpointURL) throws TransportException {
    try {/*from  w  ww.  jav a 2  s  . co m*/
        if (inquiryv2 == null) {
            inquiryv2 = new Inquiry3to2();

        }
        if (endpointURL == null) {
            UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
            endpointURL = client.getClientConfig().getUDDINode(nodeName).getInquiryUrl();
        }
        Map<String, Object> requestContext = ((BindingProvider) inquiryv2).getRequestContext();
        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
        setCredentials(requestContext);
    } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
    }
    return inquiryv2.getUDDIv2WebServiceClient();

}

From source file:org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport.java

public Publish getUDDIv2PublishService(String endpointURL) throws TransportException {
    try {//www  .  j  a  v  a2 s.  c  o m
        if (publishv2 == null) {
            publishv2 = new Publish3to2();

        }
        if (endpointURL == null) {
            UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
            endpointURL = client.getClientConfig().getUDDINode(nodeName).getPublishUrl();
        }

        Map<String, Object> requestContext = ((BindingProvider) publishv2).getRequestContext();
        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
        setCredentials(requestContext);
    } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
    }
    return publishv2.getUDDIv2PublishWebServiceClient();
}

From source file:org.apache.juddi.v3.client.transport.SAPRegistryJAXWSTransport.java

public UDDIInquiryPortType getUDDIInquiryService(String endpointURL) throws TransportException {

    if (inquiryService == null) {
        try {//from   w w  w. ja v a  2  s .c o m
            if (endpointURL == null) {
                UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName);
                endpointURL = manager.getClientConfig().getUDDINode(nodeName).getInquiryUrl();
            }
            UDDIService service = new UDDIService();
            inquiryService = service.getUDDIInquiryPort();
            Map<String, Object> requestContext = ((BindingProvider) inquiryService).getRequestContext();
            requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
            setCredentials(requestContext);

            XMLDeclarationWritingInterceptor xmldwi = new XMLDeclarationWritingInterceptor();
            Client cxfClient = ClientProxy.getClient(inquiryService);
            cxfClient.getInInterceptors().add(xmldwi);
        } catch (Exception e) {
            throw new TransportException(e.getMessage(), e);
        }
    }
    return inquiryService;
}

From source file:org.apache.juddi.v3.client.transport.SAPRegistryJAXWSTransport.java

public UDDISecurityPortType getUDDISecurityService(String endpointURL) throws TransportException {

    if (securityService == null) {
        try {//from  w ww  . j  av a 2s  . co  m
            if (endpointURL == null) {
                UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName);
                endpointURL = manager.getClientConfig().getUDDINode(nodeName).getSecurityUrl();
            }
            UDDIService service = new UDDIService();
            securityService = service.getUDDISecurityPort();
            Map<String, Object> requestContext = ((BindingProvider) securityService).getRequestContext();
            requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
            setCredentials(requestContext);

            XMLDeclarationWritingInterceptor xmldwi = new XMLDeclarationWritingInterceptor();
            Client cxfClient = ClientProxy.getClient(securityService);
            cxfClient.getInInterceptors().add(xmldwi);

        } catch (Exception e) {
            throw new TransportException(e.getMessage(), e);
        }
    }
    return securityService;
}

From source file:org.apache.juddi.v3.client.transport.SAPRegistryJAXWSTransport.java

public UDDIPublicationPortType getUDDIPublishService(String endpointURL) throws TransportException {

    if (publishService == null) {
        try {/*from  w  ww .  j a v  a  2  s .  co m*/
            if (endpointURL == null) {
                UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName);
                endpointURL = manager.getClientConfig().getUDDINode(nodeName).getPublishUrl();
            }
            UDDIService service = new UDDIService();
            publishService = service.getUDDIPublicationPort();
            Map<String, Object> requestContext = ((BindingProvider) publishService).getRequestContext();
            requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
            setCredentials(requestContext);

            XMLDeclarationWritingInterceptor xmldwi = new XMLDeclarationWritingInterceptor();
            Client cxfClient = ClientProxy.getClient(publishService);
            cxfClient.getInInterceptors().add(xmldwi);

        } catch (Exception e) {
            throw new TransportException(e.getMessage(), e);
        }
    }
    return publishService;
}

From source file:org.apache.juddi.v3.client.transport.SAPRegistryJAXWSTransport.java

public UDDISubscriptionPortType getUDDISubscriptionService(String endpointURL) throws TransportException {

    if (subscriptionService == null) {
        try {//from w w  w .  j  av a  2 s.c  om
            if (endpointURL == null) {
                UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName);
                endpointURL = manager.getClientConfig().getUDDINode(nodeName).getSubscriptionUrl();
            }
            UDDIService service = new UDDIService();
            subscriptionService = service.getUDDISubscriptionPort();
            Map<String, Object> requestContext = ((BindingProvider) subscriptionService).getRequestContext();
            requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
            setCredentials(requestContext);

            XMLDeclarationWritingInterceptor xmldwi = new XMLDeclarationWritingInterceptor();
            Client cxfClient = ClientProxy.getClient(subscriptionService);
            cxfClient.getInInterceptors().add(xmldwi);

        } catch (Exception e) {
            throw new TransportException(e.getMessage(), e);
        }
    }
    return subscriptionService;
}

From source file:org.apache.juddi.v3.client.transport.SAPRegistryJAXWSTransport.java

public UDDISubscriptionListenerPortType getUDDISubscriptionListenerService(String endpointURL)
        throws TransportException {
    if (subscriptionListenerService == null) {
        try {//from   ww  w  .  j  av a 2 s. c  o m
            if (endpointURL == null) {
                UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName);
                endpointURL = manager.getClientConfig().getUDDINode(nodeName).getSubscriptionListenerUrl();
            }
            UDDIService service = new UDDIService();
            subscriptionListenerService = service.getUDDISubscriptionListenerPort();
            Map<String, Object> requestContext = ((BindingProvider) subscriptionListenerService)
                    .getRequestContext();
            requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
            setCredentials(requestContext);

            XMLDeclarationWritingInterceptor xmldwi = new XMLDeclarationWritingInterceptor();
            Client cxfClient = ClientProxy.getClient(subscriptionListenerService);
            cxfClient.getInInterceptors().add(xmldwi);

        } catch (Exception e) {
            throw new TransportException(e.getMessage(), e);
        }
    }
    return subscriptionListenerService;
}