use of com.sun.xml.ws.developer.WSBindingProvider in project metro-jax-ws by eclipse-ee4j.
the class WSATest method testEcho.
public void testEcho() {
// setting user defined MessageID:
List<Header> headers = new ArrayList<Header>();
headers.add(new StringHeader(AddressingVersion.W3C.messageIDTag, "userDefinedMessageID"));
((WSBindingProvider) port).setOutboundHeaders(headers);
port.echoString("String to be echoed");
// without fix, there is duplicit header wsa:MessageID so the WS call crashes with
// SOAPFaultException: A header representing a Message Addressing Property is
// not valid and the message cannot be processed ...
}
use of com.sun.xml.ws.developer.WSBindingProvider in project metro-jax-ws by eclipse-ee4j.
the class WSDLEprExtensionsTest method testEprWithDispatchWithoutWSDL.
/**
* Tests client-side access to EPR extensions specified in WSDL
* @throws Exception
*/
public void testEprWithDispatchWithoutWSDL() throws Exception {
Service service = Service.create(serviceName);
service.addPort(portName, jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
Dispatch dispatch = service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
WSEndpointReference wsepr = ((WSBindingProvider) dispatch).getWSEndpointReference();
assertTrue(wsepr.getEPRExtensions().isEmpty());
}
use of com.sun.xml.ws.developer.WSBindingProvider 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")));
}
use of com.sun.xml.ws.developer.WSBindingProvider 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")));
}
use of com.sun.xml.ws.developer.WSBindingProvider 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")));
}
Aggregations