Search in sources :

Example 21 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class WSDLEprExtensionsTest method testEprWithDispatchWithWSDL.

/**
 * Tests client-side access to EPR extensions specified in WSDL
 * @throws Exception
 */
public void testEprWithDispatchWithWSDL() throws Exception {
    Service service = new HelloService();
    Dispatch dispatch = service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
    WSEndpointReference wsepr = ((WSBindingProvider) dispatch).getWSEndpointReference();
    assertTrue(wsepr.getEPRExtensions().size() == 1);
    WSEndpointReference.EPRExtension idExtn = wsepr.getEPRExtension(new QName("http://schemas.xmlsoap.org/ws/2006/02/addressingidentity", "Identity"));
    assertTrue(idExtn != null && idExtn.getQName().equals(new QName("http://schemas.xmlsoap.org/ws/2006/02/addressingidentity", "Identity")));
}
Also used : QName(javax.xml.namespace.QName) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) WSBindingProvider(com.sun.xml.ws.developer.WSBindingProvider) Service(jakarta.xml.ws.Service) Dispatch(jakarta.xml.ws.Dispatch)

Example 22 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class WSDLEprExtensionsTest method testEprWithSEI.

/**
 * Tests client-side access to EPR extensions specified in WSDL
 * @throws Exception
 */
public void testEprWithSEI() throws Exception {
    HelloService service = new HelloService();
    Hello hello = service.getHelloPort();
    WSEndpointReference wsepr = ((WSBindingProvider) hello).getWSEndpointReference();
    assertTrue(wsepr.getEPRExtensions().size() == 1);
    WSEndpointReference.EPRExtension idExtn = wsepr.getEPRExtension(new QName("http://schemas.xmlsoap.org/ws/2006/02/addressingidentity", "Identity"));
    assertTrue(idExtn != null && idExtn.getQName().equals(new QName("http://schemas.xmlsoap.org/ws/2006/02/addressingidentity", "Identity")));
}
Also used : QName(javax.xml.namespace.QName) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) WSBindingProvider(com.sun.xml.ws.developer.WSBindingProvider)

Example 23 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class EprExtensionsContributorTest method testEprWithDispatchWithWSDL.

/**
 * Tests client-side access to EPR extensions specified in WSDL
 *
 * @throws Exception
 */
public void testEprWithDispatchWithWSDL() throws Exception {
    Service service = new HelloService();
    Dispatch dispatch = service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
    WSEndpointReference wsepr = ((WSBindingProvider) dispatch).getWSEndpointReference();
    assertTrue(wsepr.getEPRExtensions().size() == 2);
    WSEndpointReference.EPRExtension idExtn = wsepr.getEPRExtension(new QName("http://example.com/addressingidentity", "Identity"));
    assertTrue(idExtn != null && idExtn.getQName().equals(new QName("http://example.com/addressingidentity", "Identity")));
}
Also used : QName(javax.xml.namespace.QName) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) WSBindingProvider(com.sun.xml.ws.developer.WSBindingProvider) Service(jakarta.xml.ws.Service) Dispatch(jakarta.xml.ws.Dispatch)

Example 24 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class EprExtensionsContributorTest method testEprWithSEI.

/**
 * Tests client-side access to EPR extensions specified in WSDL
 *
 * @throws Exception
 */
public void testEprWithSEI() throws Exception {
    HelloService service = new HelloService();
    Hello hello = service.getHelloPort();
    WSEndpointReference wsepr = ((WSBindingProvider) hello).getWSEndpointReference();
    assertTrue(wsepr.getEPRExtensions().size() == 2);
    WSEndpointReference.EPRExtension idExtn = wsepr.getEPRExtension(new QName("http://example.com/addressingidentity", "Identity"));
    assertTrue(idExtn != null && idExtn.getQName().equals(new QName("http://example.com/addressingidentity", "Identity")));
}
Also used : QName(javax.xml.namespace.QName) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) WSBindingProvider(com.sun.xml.ws.developer.WSBindingProvider)

Example 25 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class EprExtensionsContributorTest method testEprOnServerSide.

/**
 * Tests server-side access to EPR extensions specified in WSDL
 *
 * @throws Exception
 */
public void testEprOnServerSide() throws Exception {
    HelloService service = new HelloService();
    Hello hello = service.getHelloPort();
    W3CEndpointReference serverEpr = hello.getW3CEPR();
    // printEPR(serverEpr);
    WSEndpointReference wsepr = new WSEndpointReference(serverEpr);
    assertTrue(wsepr.getEPRExtensions().size() == 2);
    WSEndpointReference.EPRExtension idExtn = wsepr.getEPRExtension(new QName("http://example.com/addressingidentity", "Identity"));
    assertTrue(idExtn != null && idExtn.getQName().equals(new QName("http://example.com/addressingidentity", "Identity")));
}
Also used : W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) QName(javax.xml.namespace.QName) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference)

Aggregations

WSEndpointReference (com.sun.xml.ws.api.addressing.WSEndpointReference)80 QName (javax.xml.namespace.QName)32 Element (org.w3c.dom.Element)17 URL (java.net.URL)16 StreamSource (javax.xml.transform.stream.StreamSource)16 EndpointReference (jakarta.xml.ws.EndpointReference)13 WSBindingProvider (com.sun.xml.ws.developer.WSBindingProvider)11 SAAJMessage (com.sun.xml.ws.message.saaj.SAAJMessage)11 SOAPMessage (jakarta.xml.soap.SOAPMessage)11 Packet (com.sun.xml.ws.api.message.Packet)10 XMLStreamReader (javax.xml.stream.XMLStreamReader)10 Message (com.sun.xml.ws.api.message.Message)9 WebServiceException (jakarta.xml.ws.WebServiceException)9 MemberSubmissionEndpointReference (com.sun.xml.ws.developer.MemberSubmissionEndpointReference)8 ByteArrayInputStream (java.io.ByteArrayInputStream)8 WSDLPort (com.sun.xml.ws.api.model.wsdl.WSDLPort)6 MessageFactory (jakarta.xml.soap.MessageFactory)6 MimeHeaders (jakarta.xml.soap.MimeHeaders)6 Service (jakarta.xml.ws.Service)6 W3CEndpointReference (jakarta.xml.ws.wsaddressing.W3CEndpointReference)6