Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
2.5.3
-
Unknown
Description
If I have a Dispatch client and I have WS-Addressing enabled on it and I send a request then I see the following:
Content-Type: application/soap+xml; action="urn:ihe:iti:2007:RegistryStoredQuery"
Headers: {Accept=[*/*]}
Payload: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><Action xmlns="http://www.w3.org/2005/08/addressing">urn:ihe:iti:2007:RegistryStoredQuery</Action>
But when I just disable WS-Addressing then the content-type header changes to the following:
Content-Type: application/soap+xml; charset=UTF-8
There's no action attribute any more. Manually setting the soap action uri on the dispatch object puts it back:
disp.getRequestContext().put(Dispatch.SOAPACTION_URI_PROPERTY, soapAction);
So there's a workaround possible (where your dispatch use case can accommodate it) but the problem is that CXF shouldn't require WS-Addressing enabled to set the Content-Type header's action attribute automatically.
This is a bigger problem in SOAP 1.1 where many services rely on the SOAPAction header and CXF is sending a blank SOAPAction header by default unless WS-Addressing is enabled.