use of client.soap_mu_header.client.Hello_Service in project metro-jax-ws by eclipse-ee4j.
the class SoapMuHeaderTest method testMUHeaderInWSDL.
public void testMUHeaderInWSDL() {
Hello_Service service = new Hello_Service();
Hello port = service.getHelloPort();
Holder<String> extra = new Holder<String>();
port.hello("extra", extra);
}
use of client.soap_mu_header.client.Hello_Service in project metro-jax-ws by eclipse-ee4j.
the class SoapMuHeaderTest method testMUHeaderInWSDLDispatchMessageMode.
/**
* For Message mode, extra MU headers are ignored for MU processing to let client apps deal with it.
*/
public void testMUHeaderInWSDLDispatchMessageMode() {
Hello_Service service = new Hello_Service();
Dispatch<SOAPMessage> dispatch = service.createDispatch(portQName, SOAPMessage.class, Service.Mode.MESSAGE);
SOAPMessage in = null;
try {
in = getSOAPMessage(makeStreamSource(message1));
} catch (Exception e) {
fail(e.getMessage());
}
SOAPMessage out = dispatch.invoke(in);
}
use of client.soap_mu_header.client.Hello_Service in project metro-jax-ws by eclipse-ee4j.
the class SoapMuHeaderTest method testMUHeaderNotInWSDL.
public void testMUHeaderNotInWSDL() {
Hello_Service service = new Hello_Service();
Hello port = service.getHelloPort();
Holder<String> extra = new Holder<String>();
try {
port.hello("extraMU", extra);
fail("MU Exception expected");
} catch (SOAPFaultException e) {
assertTrue(e.getFault().getFaultCode().endsWith(":MustUnderstand"));
}
}
use of client.soap_mu_header.client.Hello_Service in project metro-jax-ws by eclipse-ee4j.
the class SoapMuHeaderTest method testMUHeaderNotInWSDLDispatchMessageMode.
/**
* For Message mode, extra MU headers are ignored for MU processing to let client apps deal with it.
*/
public void testMUHeaderNotInWSDLDispatchMessageMode() {
Hello_Service service = new Hello_Service();
Dispatch<SOAPMessage> dispatch = service.createDispatch(portQName, SOAPMessage.class, Service.Mode.MESSAGE);
SOAPMessage in = null;
try {
in = getSOAPMessage(makeStreamSource(message2));
} catch (Exception e) {
fail(e.getMessage());
}
SOAPMessage out = dispatch.invoke(in);
}
use of client.soap_mu_header.client.Hello_Service in project metro-jax-ws by eclipse-ee4j.
the class SoapMuHeaderTest method testMUHeaderNotInWSDLDispatchPayloadMode.
/**
* With Dispatch palyload mode, All MU headers (even described in WSDL binding) are not not understood by default.
*/
public void testMUHeaderNotInWSDLDispatchPayloadMode() {
Hello_Service service = new Hello_Service();
Dispatch<Source> dispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
Source in = null;
try {
in = makeStreamSource(payload2);
} catch (Exception e) {
fail(e.getMessage());
}
try {
Source out = dispatch.invoke(in);
fail("MU Exception expected");
} catch (SOAPFaultException e) {
assertTrue(e.getFault().getFaultCode().endsWith(":MustUnderstand"));
}
}
Aggregations