You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Bruce Edge <br...@gmail.com> on 2009/04/25 00:55:17 UTC

To add or not to add wsdl exceptions?

In my days as a gSOAP slave I never added explicit exceptions to the wsdl as
it was assumed that any soap call could throw an exception.

I noticed that some of the cxf examples explicitly define exceptions in the
wsdl. What's the reason for this?
Does it force the client to add exception handlers?

Thanks

-Bruce

Re: To add or not to add wsdl exceptions?

Posted by Benson Margulies <bi...@gmail.com>.
Code-first, then exceptions (a) turn on Java's usual diagnostics, and (b)
cause the WSDL to have fault declarations.

If you don't declare faults, you'll get just generic exceptions, nothing of
your own devising.

On Fri, Apr 24, 2009 at 7:31 PM, Bruce Edge <br...@gmail.com> wrote:

> Sorry, yes, I was referring to wsdl faults. These were not something I ever
> ran into with gSOAP even though server could still throw faults. (or raise
> exceptions in their vocabulary) What are the implications of explicitly
> specifing faults in the wsdl?
> The only sympton I've seen is that the java clients recognize it and
> consequently require a try/catch around it.
>
> Is the case that if one does not specifying faults, and raises an exception
> from the server, that the client gets a generic fault of some sort as
> opposed to the specific type that one can specify in the wsdl?
>
> -Bruce
>
> On Fri, Apr 24, 2009 at 4:04 PM, Benson Margulies <bimargulies@gmail.com
> >wrote:
>
> > Do you wants faults declared in your WSDL?
> >
> > On Fri, Apr 24, 2009 at 6:55 PM, Bruce Edge <br...@gmail.com>
> wrote:
> >
> > > In my days as a gSOAP slave I never added explicit exceptions to the
> wsdl
> > > as
> > > it was assumed that any soap call could throw an exception.
> > >
> > > I noticed that some of the cxf examples explicitly define exceptions in
> > the
> > > wsdl. What's the reason for this?
> > > Does it force the client to add exception handlers?
> > >
> > > Thanks
> > >
> > > -Bruce
> > >
> >
>

Re: To add or not to add wsdl exceptions?

Posted by Bruce Edge <br...@gmail.com>.
Sorry, yes, I was referring to wsdl faults. These were not something I ever
ran into with gSOAP even though server could still throw faults. (or raise
exceptions in their vocabulary) What are the implications of explicitly
specifing faults in the wsdl?
The only sympton I've seen is that the java clients recognize it and
consequently require a try/catch around it.

Is the case that if one does not specifying faults, and raises an exception
from the server, that the client gets a generic fault of some sort as
opposed to the specific type that one can specify in the wsdl?

-Bruce

On Fri, Apr 24, 2009 at 4:04 PM, Benson Margulies <bi...@gmail.com>wrote:

> Do you wants faults declared in your WSDL?
>
> On Fri, Apr 24, 2009 at 6:55 PM, Bruce Edge <br...@gmail.com> wrote:
>
> > In my days as a gSOAP slave I never added explicit exceptions to the wsdl
> > as
> > it was assumed that any soap call could throw an exception.
> >
> > I noticed that some of the cxf examples explicitly define exceptions in
> the
> > wsdl. What's the reason for this?
> > Does it force the client to add exception handlers?
> >
> > Thanks
> >
> > -Bruce
> >
>

Re: To add or not to add wsdl exceptions?

Posted by Benson Margulies <bi...@gmail.com>.
Do you wants faults declared in your WSDL?

On Fri, Apr 24, 2009 at 6:55 PM, Bruce Edge <br...@gmail.com> wrote:

> In my days as a gSOAP slave I never added explicit exceptions to the wsdl
> as
> it was assumed that any soap call could throw an exception.
>
> I noticed that some of the cxf examples explicitly define exceptions in the
> wsdl. What's the reason for this?
> Does it force the client to add exception handlers?
>
> Thanks
>
> -Bruce
>