axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajith Ranabahu <ajith.ranab...@gmail.com>
Subject Re: [Axis2] Throwing faults
Date Thu, 05 Jan 2006 12:14:03 GMT
Hi Ruben
If your exceptions extend the AxisFault then you won't need a modification
in the message receiver (Your reasoning seems to be right). However if you
have your own custom exceptions then the message receiver needs to have the
code to handle it

Ajith

On 1/5/06, Rubén Naranjo Izquierdo <rnaranjo@alumnos.upm.es> wrote:
>
>   Hi Ajith,
>   I have a final question for you. :) Are you sure I have to modify the
> message receiver? Message receiver throws AxisFault on it's
> "invokeBussinesLogic" method, and the exceptions I throw in the Skeleton
> extend AxisFault. If the message receiver just redirects that faults, will
> the axis engine handle it and send it to the client? (as you said, more or
> less, on your first mail?)
>
> Thank you,
>
>   Rubén
>
> P.S: Thanks Anne for your advices too. I made the changes you said on my
> wsdl
> file, but wsdl2java still doesn't handle faults.
>
> On Wednesday 04 January 2006 13:38, Ajith Ranabahu wrote:
> > Hi Ruben,
> > You'll have to modify the generated code then. Once you do the change to
> > the skeleton, you'll have to change the message receiver as well (to
> > capture the excpetion and send back the custom message)
> >
> > On 1/4/06, Rubén Naranjo Izquierdo <rnaranjo@alumnos.upm.es> wrote:
> > >   Sorry for my last message, I didn't see the message Ajith wrote. I
> have
> > > new doubts about Ajith said:
> > >
> > > · Can I make modifications on the Skeleton generated so it can throw
> the
> > > faults I need?
> > > · How can I throw any kind of fault (so Axis can see it an throw an
> > > AxisFault) when the code generated doesn't throw any exception?
> Example
> > > of generated code:
> > >
> > > public class MyServicePortTypeSkeleton {
> > >         public BeginDocument begin (BegunDocument param0 ){
> > >                 //Todo fill this with the necessary business logic
> > >                 return null;
> > >         }
> > > }
> > >
> > > On Wednesday 04 January 2006 4:51, Ajith Ranabahu wrote:
> > > > Hi Ruben,
> > > > The Axis2 code generator does not generate exceptions for faults
> yet!
> > > > However as soon as the Axis engine sees the fault, it throws an
> > >
> > > AxisFault
> > >
> > > > loaded with the fault information (The stub actually turns that
> switch
> > >
> > > on)
> > >
> > > > So for the time being you'll have to work with AxisFaults.
> >
> > --
> > Ajith Ranabahu
>



--
Ajith Ranabahu

Mime
View raw message