use of client.soap_mu_header.client.Hello_Service in project metro-jax-ws by eclipse-ee4j.
the class SoapMuHeaderTest method testMUHeaderInWSDLDispatchPayloadMode.
/**
* With Dispatch palyload mode, All MU headers (even described in WSDL binding) are not not understood by default.
*/
public void testMUHeaderInWSDLDispatchPayloadMode() {
Hello_Service service = new Hello_Service();
Dispatch<Source> dispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
Source in = null;
try {
in = makeStreamSource(payload1);
} 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