This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Services and the fly likes How to capture web service custom edefined exception?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to capture web service custom edefined exception??" Watch "How to capture web service custom edefined exception??" New topic
Author

How to capture web service custom edefined exception??

Rafa Barcel� Bauz�
Greenhorn

Joined: Aug 09, 2006
Posts: 22
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!!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to capture web service custom edefined exception??