Search in sources :

Example 6 with MemberSubmissionAddressingFeature

use of com.sun.xml.ws.developer.MemberSubmissionAddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class AddNumbersClient method xxtestEPRGetPortVIII.

public void xxtestEPRGetPortVIII() throws Exception {
    if (ClientServerTestUtil.useLocal()) {
        System.out.println("HTTP Transport Only Exiting");
        return;
    }
    AddNumbersPortType proxy = createStub();
    EndpointReference epr = ((BindingProvider) proxy).getEndpointReference(MemberSubmissionEndpointReference.class);
    RespectBindingFeature feature = new RespectBindingFeature(true);
    MemberSubmissionAddressingFeature addr = new MemberSubmissionAddressingFeature(true, false);
    WebServiceFeature[] features = new WebServiceFeature[] { feature, addr };
    AddNumbersPortType port = epr.getPort(AddNumbersPortType.class, features);
    assertTrue(port != null);
    System.out.println("Adding numbers 2 and 4");
    int result = port.addNumbers(2, 4);
    assert (result == 6);
    System.out.println("Addinion of 2 and 4 successful");
}
Also used : MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Example 7 with MemberSubmissionAddressingFeature

use of com.sun.xml.ws.developer.MemberSubmissionAddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class AddNumbersClient method testEPRGetPortVI.

public void testEPRGetPortVI() throws Exception {
    if (ClientServerTestUtil.useLocal()) {
        System.out.println("HTTP Transport Only Exiting");
        return;
    }
    AddNumbersPortType proxy = createStub();
    EndpointReference epr = ((BindingProvider) proxy).getEndpointReference(MemberSubmissionEndpointReference.class);
    RespectBindingFeature feature = new RespectBindingFeature(true);
    MemberSubmissionAddressingFeature addr = new MemberSubmissionAddressingFeature(false, false);
    WebServiceFeature[] features = new WebServiceFeature[] { feature, addr };
    AddNumbersPortType port = epr.getPort(AddNumbersPortType.class, features);
    assertTrue(port != null);
    // expectation is that port is not configured for addressing and the invocation will fail
    try {
        System.out.println("Adding numbers 2 and 4");
        int result = port.addNumbers(2, 4);
    } catch (Exception ex) {
        assertTrue(ex instanceof SOAPFaultException);
        System.out.println(((SOAPFaultException) ex).getFault().getFaultString());
    }
}
Also used : SOAPFaultException(jakarta.xml.ws.soap.SOAPFaultException) MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature) SOAPFaultException(jakarta.xml.ws.soap.SOAPFaultException) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Example 8 with MemberSubmissionAddressingFeature

use of com.sun.xml.ws.developer.MemberSubmissionAddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class AddNumbersClient method testEPRGetPortVI.

public void testEPRGetPortVI() throws Exception {
    if (ClientServerTestUtil.useLocal()) {
        System.out.println("HTTP Transport Only Exiting");
        return;
    }
    AddNumbersPortType proxy = createStub();
    EndpointReference epr = ((BindingProvider) proxy).getEndpointReference(MemberSubmissionEndpointReference.class);
    RespectBindingFeature feature = new RespectBindingFeature(true);
    MemberSubmissionAddressingFeature addr = new MemberSubmissionAddressingFeature(false, false);
    WebServiceFeature[] features = new WebServiceFeature[] { feature, addr };
    AddNumbersPortType port = epr.getPort(AddNumbersPortType.class, features);
    assertTrue(port != null);
    System.out.println("Adding numbers 2 and 4");
    int result = port.addNumbers(2, 4);
    assert (result == 6);
    System.out.println("Addinion of 2 and 4 successful");
}
Also used : MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Example 9 with MemberSubmissionAddressingFeature

use of com.sun.xml.ws.developer.MemberSubmissionAddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class AddNumbersClient method testEPRGetPortVIII.

public void testEPRGetPortVIII() throws Exception {
    if (ClientServerTestUtil.useLocal()) {
        System.out.println("HTTP Transport Only Exiting");
        return;
    }
    AddNumbersPortType proxy = createStub();
    EndpointReference epr = ((BindingProvider) proxy).getEndpointReference(MemberSubmissionEndpointReference.class);
    RespectBindingFeature feature = new RespectBindingFeature(true);
    MemberSubmissionAddressingFeature addr = new MemberSubmissionAddressingFeature(true, false);
    WebServiceFeature[] features = new WebServiceFeature[] { feature, addr };
    AddNumbersPortType port = epr.getPort(AddNumbersPortType.class, features);
    assertTrue(port != null);
    System.out.println("Adding numbers 2 and 4");
    int result = port.addNumbers(2, 4);
    assert (result == 6);
    System.out.println("Addinion of 2 and 4 successful");
}
Also used : MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Example 10 with MemberSubmissionAddressingFeature

use of com.sun.xml.ws.developer.MemberSubmissionAddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class AddNumbersClient method testEPRGetPortVIIIII.

public void testEPRGetPortVIIIII() throws Exception {
    if (ClientServerTestUtil.useLocal()) {
        System.out.println("HTTP Transport Only Exiting");
        return;
    }
    AddNumbersPortType proxy = createStub();
    EndpointReference epr = ((BindingProvider) proxy).getEndpointReference(MemberSubmissionEndpointReference.class);
    RespectBindingFeature feature = new RespectBindingFeature(true);
    MemberSubmissionAddressingFeature addr = new MemberSubmissionAddressingFeature(true, true);
    WebServiceFeature[] features = new WebServiceFeature[] { feature, addr };
    AddNumbersPortType port = epr.getPort(AddNumbersPortType.class, features);
    assertTrue(port != null);
    try {
        System.out.println("Adding numbers 2 and 4");
        int result = port.addNumbers(2, 4);
        assertFalse(result == 6);
    } catch (Exception ex) {
        assertTrue(ex instanceof SOAPFaultException);
        System.out.println(((SOAPFaultException) ex).getFault().getFaultString());
    }
}
Also used : SOAPFaultException(jakarta.xml.ws.soap.SOAPFaultException) MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature) SOAPFaultException(jakarta.xml.ws.soap.SOAPFaultException) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Aggregations

MemberSubmissionAddressingFeature (com.sun.xml.ws.developer.MemberSubmissionAddressingFeature)19 MemberSubmissionEndpointReference (com.sun.xml.ws.developer.MemberSubmissionEndpointReference)9 W3CEndpointReference (jakarta.xml.ws.wsaddressing.W3CEndpointReference)9 WSEndpointReference (com.sun.xml.ws.api.addressing.WSEndpointReference)6 SOAPFaultException (jakarta.xml.ws.soap.SOAPFaultException)4 WebServiceFeature (jakarta.xml.ws.WebServiceFeature)3 WSService (com.sun.xml.ws.api.WSService)2 OneWayFeature (com.sun.xml.ws.api.addressing.OneWayFeature)2 BindingImpl (com.sun.xml.ws.binding.BindingImpl)2 SOAPFault (jakarta.xml.soap.SOAPFault)2 Dispatch (jakarta.xml.ws.Dispatch)2 RespectBindingFeature (jakarta.xml.ws.RespectBindingFeature)2 AddressingFeature (jakarta.xml.ws.soap.AddressingFeature)2 Source (javax.xml.transform.Source)2 DOMSource (javax.xml.transform.dom.DOMSource)2 SOAPMessage (jakarta.xml.soap.SOAPMessage)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1