Reputation: 2560
I'm a little confused about how SOAPAction is implemented in WCF (and other web service frameworks for that matter).
In a test client, I have a Client Message Inspector configured to grab both the SOAP message and any HTTP headers that are being sent with the request. At least here in the client message inspector, the action shows up as an element in the SOAP Header:
<s:Header>
<Action ... >http://myurl.com/2009/11/MyService/MyMethod</Action>
However, if I view the request in Fiddler, the Action
element is missing and instead there is now an additional entry in the HTTP Headers:
SOAPAction: "http://myurl.com/2009/11/MyService/MyMethod"
Can anyone explain what the heck is going on??
Thanks!
Upvotes: 14
Views: 30817
Reputation: 52689
This is a problem with WCF not following the standards.
SOAP 1.1 uses the SOAPAction header to decide what method to call, but this was a bit messy as the method name was embedded elsewhere in the message. SOAP 1.2 resolved this and added the action to content-type header, and deprecated the SOAPAction header (though its now an optional for those clients that still want to send it).
See an o'reilly blog page for some details.
Upvotes: 17
Reputation: 161821
Chances are that you're seeing the difference between SOAP 1.1 and SOAP 1.2.
Upvotes: 5
Reputation: 17
Putting SOAP action in an HTTP header is part of SOA specification, and WCF just implements SOAP specification in this case.
Read here: http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528
Upvotes: 0
Reputation: 755207
Seems to me as if those two are equivalent, no? I guess Fiddler just interprets that SOAP header "", calling it "SOAPAction". The value appears to be the same, no?
What you get from the Client Message Inspector is the raw XML data (the raw format of the SOAP message) as it travels across the copper wire (or fibre). What Fiddler gives you is a higher-level HTTP-oriented interpretation of that same XML message, I would say.
Judging from other blog posts and articles I've found on Fiddler and SOAP (e.g. this blog post - check out the "Sample Capture" section towards the end), it almost seems to me as if Fiddler will strip out the SOAP headers and interpret / show them in a custom format, leaving just the SOAP body to be shown as body of the message being displayed.
Is there an actual technical problem? Or just a question of how to interpret the two formats?
Upvotes: 3