Hi, Well.. I was able to fix the issue by modifying the java classes and adding few line of coding(which is very similar to what Dies suggested).
Sajith. -----Original Message----- From: Dies Koper [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 6:01 AM To: [email protected] Subject: Re: MustUnderstand header I never tried it myself, but with an Axis client, I think you should be looking at the client-config.xml (which does not exist by default). Have a look at the Axis website, Axis Wiki or maybe googling for it might help. Axis does not use files named web.xml nor webserviceclient.xml. Regards, Dies Girish_Kumar wrote: > Thanks Dies. > I was looking for a non-programmatic way of adding handler to the > client. Let me try in the way you explained. > > Regards, > Girish Kumar > > -----Original Message----- > From: Dies Koper [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 23, 2006 5:24 PM > To: [email protected] > Subject: Re: MustUnderstand header > > Hello Girish, > > I've never worked with WCF nor Microsoft Indigo nor have any idea what > they are, but if your client is a (Java) servlet and uses a JAX-RPC > stub, I suppose you can just put the code that's now buried in this > e-mail to register your handler into your servlet. > Then add your handler class to WEB-INF\classes. > There's no need to touch any xml files. (Changing the xml file might be > an other, vendor-dependent, way to register your handler). > > Good luck, > Dies > > > Girish_Kumar wrote: >> Dies, >> >> I have created a client side handler, but how do I incorporate the > same >> to the client. My client is a servlet which consumes a WCF >> service(Microsoft Indigo). Documentation says I can do it using >> webserviceclient.xml. But mine is a web application created using Sun >> studio and I can see a web.xml, not webserviceclient.xml. Any help? >> >> Regards, >> Girish Kumar >> >> >> -----Original Message----- >> From: Dies Koper [mailto:[EMAIL PROTECTED] >> Sent: Thursday, February 23, 2006 10:16 AM >> To: [email protected] >> Subject: Re: MustUnderstand header >> >> Hello Girish, >> >> I am not sure what your question is but does my answer to Sajith (see >> below: "employ a client-side handler that understands the header and >> removes it from the SOAP message after processing it.") not help? >> >> Axis 1.2/1.3 stubs do not understand other people's headers so headers > >> marked with mustUnderstand="1" will lead to the exception below. > You'll >> have to process (and then remove) the headers in client handlers. >> >> Regards, >> Dies >> >> >> Girish_Kumar wrote: >>> Hi all, >>> >>> I am getting the following exception from an Axis client trying to >>> consume a WCF(Indigo) service. I am not an Axis programmer, but want >> to >>> see if it can consume a WCF service. I am using Sun java studio for >>> creating this client. >>> Exception : >>> Did not understand "MustUnderstand" >>> header(s):{http://schemas.xmlsoap.org/ws/2004/08/addressing}Action, >>> {http://schemas.xmlsoap.org/ws/2004/08/addressing}To >>> >>> > org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstan >>> dChecker.java:96) >>> org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) >>> org.apache.axis.client.Call.invokeEngine(Call.java:2784) >>> org.apache.axis.client.Call.invoke(Call.java:2767) >>> org.apache.axis.client.Call.invoke(Call.java:2443) >>> org.apache.axis.client.Call.invoke(Call.java:2366) >>> org.apache.axis.client.Call.invoke(Call.java:1812) >>> >>> > org.tempuri.WSHttpBinding_IProfileStub.login(WSHttpBinding_IProfileStub. >>> java:419) >>> LoginServlet.processRequest(LoginServlet.java:62) >>> LoginServlet.doGet(LoginServlet.java:106) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:747) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:860) >>> sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source) >>> >>> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor >>> Impl.java:25) >>> java.lang.reflect.Method.invoke(Method.java:585) >>> >>> > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) >>> java.security.AccessController.doPrivileged(Native Method) >>> javax.security.auth.Subject.doAsPrivileged(Subject.java:517) >>> >>> > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) >>> >>> > org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav >>> a:165) >>> >>> >>> note The full stack trace of the root cause is available in the >>> Sun-Java-System/Application-Server logs. >>> >>> >>> Regards, >>> Girish Kumar >>> >>> -----Original Message----- >>> From: Dies Koper [mailto:[EMAIL PROTECTED] >>> Sent: Wednesday, February 22, 2006 2:19 PM >>> To: [email protected] >>> Subject: Re: Problem with MustUnderstand headers when migrating from >>> axis 1.1 to 1.3 >>> >>> Hello Sajith, >>> >>> Refer to the JAX-RPC1.1 spec to see how to use a client handler in a >>> portable way. I believe it goes something like this: >>> >>> sf = javax.xml.rpc.ServiceFactory.newInstance(); >>> SEIService si = (SEIService)sf.loadService(SEIService.class); >>> >>> // register client handler >>> javax.xml.rpc.handler.HandlerRegistry hr = > si.getHandlerRegistry(); >>> java.util.List hl = new java.util.ArrayList(); >>> hl.add(new >>> javax.xml.rpc.handler.HandlerInfo(YourHandler.class,null,null)); >>> hr.setHandlerChain(new >> QName("http://localhost/xxx/","yourPort"),hl); >>> SEI sei = si.getSEIPort(); >>> >>> > ((javax.xml.rpc.Stub)sei)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, >>> url); >>> >>> YourHandler should implement javax.xml.rpc.handler.Handler. >>> >>> Hope that helps, >>> Dies >>> >>> >>> sajith wrote: >>>> 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(MustUnderstan >>> dChe >>>>> 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.getAvailabil >>> ityN >>>>> ewReservation(AvailabilitySoap_BindingStub.java:587) >>>>> >>>>> at Test.main(Test.java:21) >>>>> >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>> Method) >>>>> at >>>>> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav >>> a:39 >>>>> ) >>>>> >>>>> at >>>>> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor >>> Impl >>>>> .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(MustUnderstan >>> dChe >>>>> 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.getAvailabil >>> ityN >>>>> ewReservation(AvailabilitySoap_BindingStub.java:587) >>>>> >>>>> at Test.main(Test.java:21) >>>>> >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>> Method) >>>>> at >>>>> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav >>> a:39 >>>>> ) >>>>> >>>>> at >>>>> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor >>> Impl >>>>> .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> >>>>> >>>>> .
