axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Clegg" <andrew.cl...@gmail.com>
Subject SOAP fault "Could not initialize class ..."
Date Tue, 24 Jun 2008 16:05:47 GMT
Afternoon all,

I'm trying to get some XMLBeans-based service stubs in place and I'm
hitting an odd problem which I can't find any reference to via Google.

The services deploy to the server fine, with no error messages, and I
can see them in http://localhost:8080/axis2/services/ and view the
WSDLs. Everything looks okay.

The built-in Version service works okay, but whenever I try to run one
of mine (e.g. via SoapUI), I get a response like this:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>Could not initialize class
info.cathdb.ws.types.TestEchoDocument</faultstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>


(This is for a service called Test with a TestEcho operation, the
classic 'hello world' for request/response services.)

I have checked in my repository and TestEchoDocument.class is exactly
where it should be, in info.cathdb.ws.types, having compiled with no
errors.

The Java code in TestSkeleton.java looks like this:


    public info.cathdb.ws.types.TestEchoResponseDocument TestEcho(
        info.cathdb.ws.types.TestEchoDocument testEcho0) {
        TestEchoResponseDocument rDoc =
TestEchoResponseDocument.Factory.newInstance();
        TestEchoResponse r = rDoc.addNewTestEchoResponse();
        r.setOutputText( testEcho0.getTestEcho().getInputText() );
        return rDoc;
    }


Please let me know if I'm doing something completely wrong! I can post
the WSDL and XSD (or the relevant parts) if that would help.

Also, on a related note, if I change the TestEcho method to throw back
an exception instead, the text of the exception isn't reflected in the
soap message returned. It just says:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>unknown</faultstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>


Is there a way to have Axis2 pass the exception text back to the
client? This would be quite helpful for debugging.

Thanks in advance for any suggestions, and sorry if any of these
questions have obvious answers, I'm a complete Axis newbie.

Cheers,

Andrew.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message