Hi,
I develop a consumer for an third party webservice, which send in case
of an error:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring
xml:lang="en-US">cs.webservice.it.col.error.ValidationFailedException</faultstring>
<detail>
<KeyCallFault xmlns="ns://col.it.webservice.cs/KeyCall/V1">
<code xmlns="">DT-0005</code>
<message xmlns="">request validation failed, missing tag keysize</message>
</KeyCallFault>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I can catch this with javax.xml.ws.soap.SOAPFaultException.
This behaviour is NOT defined in the WSDL (like <wsdl:fault
name="..."><soap:fault name="..." use="literal"/></wsdl:fault>), so
wsdl2java doesn't create a
an exception class, only the class for the complex type KeyCallFault
from the schema file.
How can I map the SOAPFaultException to type KeyCallFault.
Alex