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");
}
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());
}
}
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");
}
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");
}
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());
}
}
Aggregations