Good day, Perhaps someone could help me:
I am using a Java CXF 2.2 client to consume a WCF service with basic-http binding. 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><GetBestSeats xmlns="http://www.comair.co.za/dcs/checkin" xmlns:ns2=" http://www.comair.co.za/dcs" 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> </GetBestSeats> </soap:Body> </soap:Envelope> MyMember2 can actually be found in the namespace ns3, and not ns4 as indicated by the SOAP message. I even used fiddler to confirm that changing ns4 to ns3, and the request succeeded. 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? Any assistance would be appreciated, Kind Regards, Oscar
