Now if our server does not understand SomeHeader an exception should be thrown.
To begin with, when a SoapHeader is defined in the service/proxy, .Net will not allow us to mark it as "required" since it is considered obsolete:
This is not really related to mustUnderstand: When the proxy contains required=true it means (or should have at least) that the proxy will fail itself if this value is not supplied by the user. This is different than omitting a mustUnderstand header which will cause the server to fail.
But the real inconsistency comes with mustUnderstand: When a .Net 2.0 web service gets soap:mustUnderstand header it will always ignore it even if it was not understood. On the other hand, when a .Net 2.0 web service client gets such an header in a response from the server it will throw the following exception:
Be aware of this inconsistency when you build or consume .Net 2.0 web services. What's next? get this blog rss updates or register for mail updates!
7 comments:
And I can't tell you how frustrating it is sometimes when these little issuse pop out from nowhere. It took me a while to figure this out.
I haven't tried an implementation in 3.0 or 3.5 yet, but I'm hopeful it's fixed.
And all of these small bits are usually interoperability show stoppers...
Hi
I trying to call a webservice hosted on Websphere 6.1 from a axis(1.3) based client. web service implements a oasis 2004 standard. while calling from a axis client i am getting following error
Did not understand "MustUnderstand" header(s)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstan=
dChecker.java:96)
Could you please help on this issue.
whereas when i see the soap response it does not show me any errors
Anonymous
please publish the soap response.
Hi,
Thanks a lot for your answer!
here's the soap response:
2010-12-29T10:49:41.620Z
2010-12-29T10:54:41.620Z
true
xml is not displayed well in these comments.
most probably the response contains a soap header with the must understand attribute.
this thread can be useful:
http://www.mail-archive.com/axis-user@ws.apache.org/msg10279.html
i finally figured it out: I needed a handler to process my soap header as the mustunderstand flag was on.
Thanks a lot
Post a Comment