You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by mi...@systor.com on 2002/04/30 15:19:32 UTC
Custom Fault
Hi,
Does axis beta 2 supports custom faults?
If so how should I define them in WSDL? I tryed with:
<portType name="SrvDummyPortType">
<operation name="ping">
<input message="dummy:PingInput"/>
<output message="dummy:PingOutput"/>
<fault name="pingException" message="dummy:PingFault"/>
</operation>
</portType>
<message name="PingFault">
<part name="exception" type="myTypes:MyType"/>
</message>
In the SOAP fault I receive this:
<SOAP-ENV:Fault>
<faultcode xmlns:ns1
="http://xml.apache.org/axis/">ns1:Server.generalException</faultcode>
<faultstring></faultstring>
<detail>
<ns2:exceptionName xmlns:ns2
="http://xml.apache.org/axis/">com.company.wsdl.dummy.PingFault</ns2:exceptionName>
<ns3:stackTrace xmlns:ns3="http://xml.apache.org/axis/">
at
com.company.wsdl.dummy.SrvDummyBindingImpl.ping(SrvDummyBindingImpl.java:25)
#xd;
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:229)
#xd;
...
</ns3:stackTrace>
</detail>
</SOAP-ENV:Fault>
I can catch my custom fault, but I can not retrieve any data
(myTypes:MyType) out of it.
Thanks for any ideas.
Milos Cekovic