The passing of data in faults is not yet implemented in Axis.

There is no standard for how this data gets passed back in the SOAP fault, so it looks 
like we will have to implement something and hope that 1) others will follow our lead 
and interoperate with us or 2) a standard will be specified (by who?) that we can 
implement.

I am considering tackling this soon, since it has been outstanding since I implemented 
the custom Exception stuff (<exceptionName> in the faultDetails).  Since we didn't 
have a spec for that either, I need to just go all the way.

--
Tom Jordahl
Macromedia


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 9:20 AM
To: [EMAIL PROTECTED]
Subject: 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/";>&#xd;
     at
com.company.wsdl.dummy.SrvDummyBindingImpl.ping(SrvDummyBindingImpl.java:25)

#xd;
     at java.lang.reflect.Method.invoke(Native Method)&#xd;
     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

Reply via email to