You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by st...@web.de on 2006/06/15 22:49:46 UTC

[axis2] problem with Userexception and AxisFault - Part 2

Hi to the list,

concerning this problem, I opened an issue and the problem is (somehow) solved. For those interested in, have a look at this:
http://issues.apache.org/jira/browse/AXIS2-801 
Use the nightly build of 07.06.2006.

Chinthaka was so kind to fix this and to comment on a few question I had regarding this issue.

Unfortunately there are three things left to be answered, maybe someone from the list could help: 
1) I read that Axis2 uses SOAP 1.2 per default, so I wondered why my SOAP-response is SOAP 1.1. I used SOAP12Factory to build the SOAPFault, so why this ? 
2) How can I set that the server is the errorcause, till the response says 'Client' ? 
3) If I don't use stubs and skeletons from wsdl2java generation, do I have to create the SOAPFaults manually like I did? Or is there a nicer way to do that. If manually, so then Userexptions-classes do not make really sense, do they? 

Thanks in advance for clearing this

Bille



> -----Ursprüngliche Nachricht-----
> Von: axis-user@ws.apache.org
> Gesendet: 02.06.06 21:38:56
> An: axis-user@ws.apache.org
> Betreff: Re: [axis2] problem with Userexception and AxisFault


> Bille,
> 
> Please open an issue - http://issues.apache.org/jira/ with your custom
> code for throwing an exception.
> 
> thanks,
> dims
> 
> On 6/2/06, studium-sbr@web.de <st...@web.de> wrote:
> > Sorry for putting up the thread again,
> >
> > I did not manage to solve the problem.
> > Could someone please be so kind and provide some working code with the service throwing an userException, which is send back to the client with all the details and messages set while instantiating the Exception.
> > I did not use codegeneration using WSDL.
> >
> > Any hints or links are very appreciated. This thing is driving me mad
> >
> > Thanks a lot
> >
> > Bille
> >
> >
> > > > > > > Hi to the list,
> > > > > > >
> > > > > > > I have a service implementation which throws an UserException
> > > > > > > (MyException extends RemoteException).
> > > > > > > All works fine, but in the response I could not find my
> > > > > individual
> > > > > > > message and details. It just looks like this:
> > > > > > >
> > > > > > > <soapenv:Fault>
> > > > > > >                 <faultcode>soapenv:Client</faultcode>
> > > > > > >                 <faultstring>unknown</faultstring>
> > > > > > >                 <detail>
> > > > > > >                   <Exception>
> > > > > > >                      org.apache.axis2.AxisFault
> > > > > > >                      at
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:102)
> > > > > > >                      at
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
> > > > > > >                      at
> > > > > > > org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
> > > > > > >                      at
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
> > > > > > >                      at
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
> > > > > > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> > > > > > >                      at
> > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > > > > > >                      at
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> > > > > > >                      at
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> > > > > > >                      at
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> > > > > > >                      at
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> > > > > > >                      ....
> > > > > > >                   </Exception>
> > > > > > >                 </detail>
> > > > > > > </soapenv:Fault>
> > > > > > >                ....
> > > > > > >
> > > > > > > I debugged the service, and in class
> > > > > > > RawXMLINOutMessageReceiver::invokeBusinessLogic() my
> > > > > service-method
> > > > > > > is called and throws the exception. The exception is of type
> > > > > > > InvocationTargetException and has as a member variable called
> > > > > > > "target" my userdefined excpetion, with all the details and
> > > > > messages
> > > > > > > I defined.
> > > > > > > invokeBusinessLogic() catches this exception and throws an
> > > > > AxisFault
> > > > > > > using my userException, like this:
> > > > > > > throw new AxisFault(e.getMessage());
> > > > > > > The message member of the InvocationTargetException is null !! so
> > > > > all
> > > > > > > my user definitions are gone.
> > > > > > >
> > > > > > > Could someone please shed some light on this. Is there any other
> > > > > > > setting I missed.
> >
> > > > > > >
> > > > > > > By the way, the strange thing is that the faultCode says
> > > > > > > soapenv:Client !!!
> > > > > > >
> > > > > > > Thanks a lot for any hints.
> > > > > > > I was not able to find any tutorial or HowTo on ErrorHandling in
> > > > > > > Axis...?!
> > > > > > >
> > > > > > > Bille
> >
> >
> > __________________________________________________________________________
> > Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!
> > Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 
> -- 
> Davanum Srinivas : http://wso2.com/blogs/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!		
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org