• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to capture web service custom edefined exception??  RSS feed

Rafa Barcel� Bauz�
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks.
I'm trying to capture an exception throw by a web service. This web service is generated using this wsdl and axis.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl efinitions name="registre"

<xsd:schema targetNamespace="http://rol.ibit.org/integracio/wsdl/registre">

<!-- Instancia del tramit -->
<xsd:import namespace="http://rol.ibit.org/integracio/xsd/Instancia.xsd"
schemaLocation="http://rol.ibit.org/integracio/xsd/Instancia.xsd" />

<!-- Error en el proces de tramitacio -->
<xsd:element name="fault" type="xsd:string" />


<wsdl:message name="registrarInstanciaRequest">
<wsdl art name="instancia" element="tipos:instancia" />
<wsdl art name="firma" type="xsd:string" />

<wsdl:message name="registrarInstanciaResponse">
<wsdl art name="instancia" element="tipos:instancia" />
<wsdl art name="firma" type="xsd:string" />

<!-- <wsdl:message name="dadaIncorrecteFault">
<wsdl art name="faultDada" element="ibit:fault" />
<wsdl art name="faultMsg" element="ibit:fault" />
</wsdl:message> -->

<wsdl:message name="errorGenericFault">
<wsdl art name="fault" element="ibit:fault" />

<wsdl ortType name="registrePortType">
<wsdl peration name="registrarInstancia">

<wsdl:input name="registrarInstanciaRequest"
message="ibit:registrarInstanciaRequest" />

<wsdl utput name="registrarInstanciaResponse"
message="ibit:registrarInstanciaResponse" />

<!-- <wsdl:fault name="dadaIncorrecteFault"
message="ibit adaIncorrecteFault" /> -->

<wsdl:fault name="errorGenericFault"
message="ibit:errorGenericFault" />

</wsdl peration>
</wsdl ortType>

<wsdl:binding name="registreBinding" type="ibit:registrePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl peration name="registrarInstancia">
<soap peration soapAction="registrarInstancia" />
<soap:body use="literal" parts="instancia" />
<soap:body use="literal" parts="firma" />
<wsdl utput>
<soap:body use="literal" parts="instancia" />
<soap:body use="literal" parts="firma" />
</wsdl utput>
<!-- <wsdl:fault name="dadaIncorrecteFault">
<soap:fault name="dadaIncorrecteFault" use="literal" />
</wsdl:fault> -->
<wsdl:fault name="errorGenericFault">
<soap:fault name="errorGenericFault" use="literal" />
</wsdl peration>

<wsdl:service name="registreService">
<wsdl ort name="registrePort" binding="ibit:registreBinding">
<soap:address location="" />
</wsdl ort>

</wsdl efinitions>

How the web service client can cath the errorGenericFault defined in the wsdl?
Should I change anything in the wsdl??

For now I'm catching an AxisFault in the client, but what I really need is to capture the errorGenericFault. Any idea o sampe code?

Thanks and sorry for my (still) ugly english!!!
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!