Situation: System A must provide a SOAP 1.2 web service to call System B. To know A what the message looks like, B sent an XSD to A, describing the contents of the message. A generated stubs using the .NET tool xsd.exe, created a simple web service around this, and completed the task.
Nonetheless; when B calls this web service, A refuses to serialize the SOAP / XML content to the generated instances of the proxy class. I understand that this should be due to how serialization is defined on the web service side in system A, but it was not possible to pinpoint what was going on.
What the message from B (anonymous) - FAILS looks like:
<ns2:Set_Out xmlns:ns2="http://a.a/1.0" xmlns:ns1="http://b.b/1.0" xmlns:ns0="http://c.c">
<Context xmlns="">
<Foo>test</Foo>
<Bar>test</Bar>
...
</Context>
What does the test message from the test client (based on WSDL) look like - WORKS:
<Set_Out xmlns="http://a.a/1.0">
<Context xmlns:b="http://schemas.datacontract.org/2004/07/x.x" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Foo>TEST</b:Foo>
<b:Bar>test</b:Bar>
...
</Context>
, A, B, . (, Context) null. , .
:
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://a.a/1.0")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://a.a/1.0", IsNullable=false)]
[System.ServiceModel.MessageContract]
public partial class Set_Out {
[System.Xml.Serialization.XmlElementAttribute(Namespace="http://a.a/1.0", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] [System.ServiceModel.MessageBodyMember(Order=0)]
public ContextType Context;
...
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://a.a/1.0")]
public partial class ContextType {
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string Foo;
, :
- WSDL WSDL WSDL (
xmlns:b , ). - WSDL
unqualified, , .
, ; B , A. // !