Affects Version/s: 2.2
Fix Version/s: None
Per JAX-WS v2.2 section "4.3 javax.xml.ws.Dispatch"
Dispatch supports two usage modes, identified by the constants javax.xml.ws.Service.Mode.MESSAGE
and javax.xml.ws.Service.Mode.PAYLOAD respectively:
Message In this mode, client applications work directly with protocol-specific message structures. E.g.,
when used with a SOAP protocol binding, a client application would work directly with a SOAP
Message Payload In this mode, client applications work with the payload of messages rather than the
messages themselves. E.g., when used with a SOAP protocol binding, a client application would
work with the contents of the SOAP Body rather than the SOAP message as a whole.
A client does the following:
dispatchSrc = service.createDispatch(PORT_QNAME3, Source.class, javax.xml.ws.Service.Mode.PAYLOAD);
And then creates a message which includes the entire soapenv:Envelope:
msg = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><HelloRequest xmlns=\"http://helloservice.org/types"><argument>sendSource</argument></HelloRequest></soapenv:Body></soapenv:Envelope>";
As noted above for Message Payload: "... a client application would work with the contents of the SOAP Body rather than the SOAP message as a whole".This is incorrect yet is not flagged in the RI. The RI passes for this and this seems to be incorrect according to the mode used PAYLOAD.