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 Yashavanth Prakash <ya...@yahoo.com> on 2005/08/24 07:00:29 UTC
Handling custom exceptions
Hi
I want to know how to send custom exceptions from
server side to client other than cathcing custom
exception and throwing the Axis Fault
Any related documentation or earlier mails about this
would be very helpful
Background:
we are building a webservice based component. As the
webservice interacts with other applications which
throw app specific error, we want to pass the same to
the client for further handling
Any help/suggestions in this regard would be really
helpful
Thanks
Yash
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Handling custom exceptions
Posted by James Wilson <wi...@ociweb.com>.
<my-opinion>Any production service should be sourced from a WSDL!</my-opinion>
You will need to define a fault message on your port bindings of the WSDL:
<wsdl:definitions ....>
<wsdl:types>
<xsd:schema>
<xsd:import ....><!-- type definition in here-->
</xsd:schema>
</wsdl:types>
<wsdl:message name="CustomException">
<wsdl:port name="fault1" element="typefromschema:CustomExceptionElement"/>
</wsdl:message>
.
.<!-- other messages -->
.
<wsdl:portType name="ThePort">
<wsdl:operation name="getFoo">
<wsdl:input name="in" message="tns:FooInMsg"/>
<wsdl:output name="out" message="tns:FooOutMsg"/>
<wsdl:fault name="CustomEx" message="tns:CustomException"/>
</wsdl:portType>
.
.
.
</wsdl:definitions>
Quoting Yashavanth Prakash <ya...@yahoo.com>:
> Hi
>
> I want to know how to send custom exceptions from
> server side to client other than cathcing custom
> exception and throwing the Axis Fault
>
> Any related documentation or earlier mails about this
> would be very helpful
>
> Background:
> we are building a webservice based component. As the
> webservice interacts with other applications which
> throw app specific error, we want to pass the same to
> the client for further handling
>
> Any help/suggestions in this regard would be really
> helpful
> Thanks
> Yash
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>