• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

How to capture web service custom edefined exception??

 
Greenhorn
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"
targetNamespace="http://rol.ibit.org/integracio/wsdl/registre"
xmlns:ibit="http://rol.ibit.org/integracio/wsdl/registre"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tipos="http://rol.ibit.org/integracio/xsd/Instancia.xsd"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

<wsdl:types>
<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" />

</xsd:schema>
</wsdl:types>

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

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

<!-- <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:message>

<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" />
<wsdl:input>
<soap:body use="literal" parts="instancia" />
<soap:body use="literal" parts="firma" />
</wsdl:input>
<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:fault>
</wsdl peration>
</wsdl:binding>

<wsdl:service name="registreService">
<wsdl ort name="registrePort" binding="ibit:registreBinding">
<soap:address location="http://194.106.16.44:9090/calvixis/services/registrePort" />
</wsdl ort>
</wsdl:service>

</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!!!
reply
    Bookmark Topic Watch Topic
  • New Topic