Incorrect namespace in SOAP
---------------------------
Key: CXF-2166
URL: https://issues.apache.org/jira/browse/CXF-2166
Project: CXF
Issue Type: Bug
Components: Soap Binding
Affects Versions: 2.2
Environment: CXF 2.2
Reporter: Oscar Reitsma
There appears to be a bug with the generation of SOAP messages.
I am using a Java CXF 2.2 client to consume a WCF service with basic-http
binding. I used wsdl2java to generate the proxy objects.
I am getting the error below:
Error in line 1 position 1361. 'EndElement' 'request' from namespace
'http://www.my.name.space' is not expected. Expecting element
'MyMember2'.</Message><StackTrace> at
System.Runtime.Serialization.XmlObjectSerializerReadContext.ThrowRequiredMemberMissingException(XmlReaderDelegator
xmlReader, Int32 memberIndex, Int32 requiredIndex, XmlDictionaryString[]
memberNames)
I think I have narrowed the issue down to the incorrect namespace being
referenced in the soap message that is being generated:
The outbound message is as follows:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><MyMethodCall
xmlns="http://www.comair.co.za/dcs/checkin" xmlns:ns2="http://MyNS1"
xmlns:ns3="http://schemas.datacontract.org/2004/07/MyNamespace1"
xmlns:ns4="http://schemas.datacontract.org/2004/07/MyNamespace2"
xmlns:ns5="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
xmlns:ns6="http://schemas.datacontract.org/2004/07/MyNamespace3"
xmlns:ns7="http://schemas.datacontract.org/2004/07/MyNamespace4"
xmlns:ns8="http://schemas.datacontract.org/2004/07/MyNamespace5"
xmlns:ns9="http://schemas.microsoft.com/2003/10/Serialization/">
<request>
<ns3:MyMember1>9736399</ns3:MyMember1>
<ns4:MyMember2>
<ns4:MyMember3>false</ns4:MyMember3>
</ns4:MyMember2>
</request>
</MyMethodCall>
</soap:Body>
</soap:Envelope>
MyMember2 can actually be found in the namespace ns3, and not ns4 as indicated
by the SOAP message. I used fiddler2 to change the sent SOAP message to use the
ns3 namespace, instead of ns4. After this change the call was made successfully.
The proxy object generated by wsdl2java appears to have been generated
correctly, and references the correct namespace.
Has anyone seen this problem before, or am I missing something rather obvious?
Kind Regards,
Oscar
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.