Reputation: 22974
Im new to .NET web services and am thoroughly confused with this issue. TCP Viewer shows that my test app talking to my web service forms its XML as follows:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetSupply xmlns="http://webservices.florecom.org/commercial/customer/">
<Request>
<SupplyRequest>
<Header xmlns="urn:fec:florecom:xml:data:draft:SupplyStandardMessage:5">
<UserName>xxx</UserName>
<Password>xxx</Password>
<MessageDateTime>2012-01-17T14:59:44.0438037+02:00</MessageDateTime>
<MessageSerial>0</MessageSerial>
</Header>
<Body xmlns="urn:fec:florecom:xml:data:draft:SupplyStandardMessage:5">
<SupplyRequestDetails>
<SupplyRequestLine xmlns="urn:fec:florecom:xml:data:draft:ReusableAggregateBusinessInformationEntity:3"/>
</SupplyRequestDetails>
</Body>
</SupplyRequest>
</Request>
</GetSupply>
</s:Body>
</s:Envelope>
But my web service is receiving XML from another company that looks like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<fsm:SupplyRequest xmlns:qdt="urn:un:unece:uncefact:data:draft:QualifiedDataType:5" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:4" xmlns:ram="urn:un:unece:uncefact:data:draft:ReusableAggregateBusinessInformationEntity:3" xmlns:fsm="urn:fec:florecom:xml:data:draft:SupplyStandardMessage:5">
<fsm:Header>
<fsm:UserName>xxx</fsm:UserName>
<fsm:Password>xxx</fsm:Password>
<fsm:MessageID>634617184436505019</fsm:MessageID>
<fsm:MessageDateTime>2012-01-09T15:07:23.6505019+01:00</fsm:MessageDateTime>
<fsm:MessageSerial>0</fsm:MessageSerial>
</fsm:Header>
<fsm:Body>
<fsm:SupplyRequestDetails>
<SupplyRequestLine xmlns="urn:fec:florecom:xml:data:draft:ReusableAggregateBusinessInformationEntity:3"/>
</fsm:SupplyRequestDetails>
</fsm:Body>
</fsm:SupplyRequest>
</soap:Body>
</soap:Envelope>
Can someone help explain why? Are these different versions of SOAP? Thanks
UPDATE
As a matter of interest, the problem that is occurring in this scenario (with the 2nd XML message) is that when the service method gets hit (used a breakpoint to check this and spoofed the message with Fiddler) .NET fails to bind the method's parameter (called 'Request') so its value remains NULL
Upvotes: 2
Views: 324
Reputation: 34248
If you are referring to the soap vs s its actually not really important. those nodes are the namespaces so that the consumer knows the format of the document. They will actually be processed identically by someone who knows the schema defined by http://schemas.xmlsoap.org/soap/envelope
Both refer to the soap 1.1 namespace
Upvotes: 3