Using Dispatch API with Source type fails to set WS-Addressing action header properly in MESSAGE mode with SOAP 1.2 -------------------------------------------------------------------------------------------------------------------
Key: CXF-3749 URL: https://issues.apache.org/jira/browse/CXF-3749 Project: CXF Issue Type: Bug Components: JAX-WS Runtime Affects Versions: 2.4.1 Reporter: Jesse Pangburn Priority: Minor Attachments: patch3747and3748and3749.txt Prior tests with PAYLOAD mode were successful with SOAP 1.2, but a quick test on MESSAGE mode with a StaxSource revealed that the WS-Addressing action header is not properly set in SOAP 1.2. In one of the DispatchImpl.java's getPayloadElementName methods, there is the following code with a SOAP 1.1 namespace hardcoded: if (this.mode == Service.Mode.MESSAGE) { StaxUtils.skipToStartOfElement(reader); StaxUtils.toNextTag(reader, new QName("http://schemas.xmlsoap.org/soap/envelope/", "Body")); reader.nextTag(); return reader.getName().toString(); } To work with SOAP 1.1 or SOAP 1.2, it should be changed to: if (this.mode == Service.Mode.MESSAGE) { StaxUtils.skipToStartOfElement(reader); StaxUtils.toNextTag(reader, new QName(ele.getNamespaceURI(), "Body")); reader.nextTag(); return reader.getName().toString(); } I've tested this fix with a Source type in MESSAGE mode and it works with SOAP 1.1 and 1.2. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira