Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 33135 invoked from network); 5 Jan 2006 12:14:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jan 2006 12:14:25 -0000 Received: (qmail 96218 invoked by uid 500); 5 Jan 2006 12:14:17 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 95868 invoked by uid 500); 5 Jan 2006 12:14:15 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 95857 invoked by uid 99); 5 Jan 2006 12:14:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2006 04:14:15 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ajith.ranabahu@gmail.com designates 64.233.162.203 as permitted sender) Received: from [64.233.162.203] (HELO zproxy.gmail.com) (64.233.162.203) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2006 04:14:13 -0800 Received: by zproxy.gmail.com with SMTP id f1so3140625nzc for ; Thu, 05 Jan 2006 04:14:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=qssIHTHtEwHe29ZG6U8qHAKzCw0+jMwn56Z7QmpUoPM7uZQ3q2maZrP/Iic3HR5aiU6zIbTXB1GjgiWqpnabhn1kPvnHyZHsgNyPqdPXIfDu6apT3LUmM7yrncDDY58mnB6NNyZtRK7dg12zzFgcBW5m+tWcUbarsQIJWUYHQT4= Received: by 10.65.95.5 with SMTP id x5mr1213145qbl; Thu, 05 Jan 2006 04:14:03 -0800 (PST) Received: by 10.65.204.15 with HTTP; Thu, 5 Jan 2006 04:14:03 -0800 (PST) Message-ID: Date: Thu, 5 Jan 2006 18:14:03 +0600 From: Ajith Ranabahu To: axis-user@ws.apache.org Subject: Re: [Axis2] Throwing faults In-Reply-To: <200601050933.42401.rnaranjo@alumnos.upm.es> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_52891_5801205.1136463243066" References: <200601032045.46539.rnaranjo@alumnos.upm.es> <200601041306.44476.rnaranjo@alumnos.upm.es> <200601050933.42401.rnaranjo@alumnos.upm.es> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_52891_5801205.1136463243066 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=E9n Naranjo Izquierdo 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, wil= l > the axis engine handle it and send it to the client? (as you said, more o= r > less, on your first mail?) > > Thank you, > > Rub=E9n > > 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 t= o > > 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=E9n Naranjo Izquierdo wrote: > > > Sorry for my last message, I didn't see the message Ajith wrote. I > have > > > new doubts about Ajith said: > > > > > > =B7 Can I make modifications on the Skeleton generated so it can thro= w > the > > > faults I need? > > > =B7 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 ------=_Part_52891_5801205.1136463243066 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=E9n Naranjo Izquierdo <rnaranjo@alumnos.upm.es> wrote:
  Hi Ajith,
  I have a final question for you. :) Ar= e you sure I have to modify the
message receiver? Message receiver throw= s AxisFault on it's
"invokeBussinesLogic" method, and the exce= ptions I throw in the Skeleton
extend AxisFault. If the message receiver just redirects that faults, w= ill
the axis engine handle it and send it to the client? (as you said, m= ore or
less, on your first mail?)

Thank you,

  R= ub=E9n

P.S: Thanks Anne for your advices too. I made the changes you said on m= y wsdl
file, but wsdl2java still doesn't handle faults.

On Wednes= day 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)
><= br>> On 1/4/06, Rub=E9n Naranjo Izquierdo < rnaranjo@alumnos.upm.es> wrote:
> >   Sorry for m= y last message, I didn't see the message Ajith wrote. I have
> > n= ew doubts about Ajith said:
> >
> > =B7 Can I make modifi= cations on the Skeleton generated so it can throw the
> > faults I need?
> > =B7 How can I throw any kind of f= ault (so Axis can see it an throw an
> > AxisFault) when the code = generated doesn't throw any exception? Example
> > of generated co= de:
> >
> > public class MyServicePortTypeSkeleton {
>= >         public BeginDocument = begin (BegunDocument param0 ){
> >            = ;     //Todo fill this with the necessary business logic
> >  =             &nb= sp;  return null;
> >      &nbs= p;  }
> > }
> >
> > On Wednesday 04 January= 2006 4:51, Ajith Ranabahu wrote:
> > > Hi Ruben,
> > > The Axis2 code generator does not generate exceptions fo= r 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 t= hat switch
> >
> > on)
> >
> > > So = for the time being you'll have to work with AxisFaults.
>
> --
> Ajith Ranabahu



-- =
Ajith Ranabahu ------=_Part_52891_5801205.1136463243066--