Hello.

I'm still struggling to get custom exceptions throws correctly, so I decided to simplify the problem.
I took the samples.fault example included in Axis and deployed it. I did not change a single line, nor recompiled the classes: just ran AdminClient over the supplied deploy.wsdd.


I then try calling getEmployee without specifying a id, expecting a NoSuchEmployeeException (in its SOAP Fault form of course). To keep it simple I didn't code a client, just called http://localhost:8080/axis/services/Employee?method=getEmployee and here's the resulting SOAP message:

<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>samples.faults.NoSuchEmployeeFault</faultstring>
<detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>


As you can see the <detail> item is empty, while it should contain exception data (like specified in the WSDL returned by Axis ?wsdl query):

<complexType name="NoSuchEmployeeFault">
 <sequence>
   <element name="info" nillable="true" type="xsd:string" />
   <element name="cause" nillable="true" type="xsd:anyType" />
   <element name="message" nillable="true" type="xsd:string" />
 </sequence>
</complexType>

This also happens with all my other web services and I'm starting to suspect it's a configuration problem (since at least the pre-compiled sample with provided wsdd should work).

All I did was copying Axis servlet in Tomcat 5.0 jwsdp webapps directory and putting all the jars in axis/lib in my classpath. Should I have done something more?

Hope you can help me sorting this out... thanks in advance!

--
Lorenzo.





Reply via email to