• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to capture web service custom edefined exception??

Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!!
    Bookmark Topic Watch Topic
  • New Topic