Hi Dies,
As you suggested I debugged both axis 1.1 and 1.3 it seems Axis 1.1 does not
handle "mustUnderstand", where as axis 1.3 provides a handle implementation
called "MustUnderstandChecker". This is the place where the error is
generated.
So either I could make changes to this class or I could have my own handler
instead. Since I'm very new to web services I don't know how to plug-in this
handler to axis. It doesn't seem like it cannot be externally plugged-in to
AxisClient without modifying the existing 1.3 code.
Any thoughts on this will be highly appreciated.
Thanks and regards
Sajith.
-----Original Message-----
Sent: Wednesday, February 22, 2006 11:56 AM
To: [email protected]
Subject: Re: Problem with MustUnderstand headers when migrating from axis
1.1 to 1.3
Hello Sajith,
The stub seems to generate a Fault when it receives a SOAP message with
a header with a mustUnderstand="1" attribute.
I thought this was according to the spec, as the Axis generated stub
does not understand your header.
However, I believe some months ago there was some debate on this ML
whether Axis should be doing this, or whether the client application
should be responsible for this itself.
There was no conclusion.
If you get no response from others, you could try searching the source
code for a comment regarding this change (as you said it used to work
fine with Axis 1.1, maybe you can find why it was changed, and then
judge whether that was a mistake or a new feature you'd have to work with).
Otherwise, you could employ a client-side handler that understands the
header and removes it from the SOAP message after processing it.
Good luck,
Dies
sajith wrote:
Hi,
I'm migrating from axis 1.1 to 1.3. My webservice client fails when
invoking
the method with following axis error.
I tested the same code with axis 1.1 and it works fine.
Axis fault
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand
faultSubcode:
faultString: Did not understand "MustUnderstand" header(s):
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChe
cker.java:96)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at
net.scandinavian.nibp2.SAPI_v2.AvailabilitySoap_BindingStub.getAvailabilityN
ewReservation(AvailabilitySoap_BindingStub.java:587)
at Test.main(Test.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)
{http://xml.apache.org/axis/}hostname:sajith
Did not understand "MustUnderstand" header(s):
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChe
cker.java:96)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at
net.scandinavian.nibp2.SAPI_v2.AvailabilitySoap_BindingStub.getAvailabilityN
ewReservation(AvailabilitySoap_BindingStub.java:587)
at Test.main(Test.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)
Soap Response.
<soap:Header>
<SHAvailHandle soap:mustUnderstand="1"
xmlns="https://nibp2.scandinavian.net/SAPI">
<hAvail>some encoded data</hAvail>
.
.
.
Thanks in advance.
Sajith