Reputation: 8009
I want to find out what the element below means:
<a:To s:mustUnderstand="1">http://localhost/w.Web/service.svc</a:To>
It seems that the WCF service still process the soap request when the url is wrong.
Why is it not in the SOAP message I saw in other sites?
Any idea?
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://localhost/w.Web/service.svc</a:To>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
...
</s:Body>
</s:Envelope>
Upvotes: 2
Views: 868
Reputation: 364249
To header is part of WS-Addressing protocol. It defines the destination of the message (it can be used for example by message routers to pass message to the real destination). It is included in SOAP message only if it uses WS-Addressing. WCF always uses addressing when WsHttpBinding
is used.
Upvotes: 3