users@jax-rpc.java.net

ServerExceptions et al

From: Simon Horrell <simonh_at_develop.com>
Date: Fri, 05 Jul 2002 11:44:54 +0100

I am using the WSDP 1.0 to build a JAX-RPC client and server. The server
webapp is deployed in tomcat 4.04.

I am throwing a runtime exception (either SOAPFaultException or some other)
in my JAX-RPC method implementation. On the client-side I was expecting the
plumbing to reconstitute the runtime exception as the nested exception of
the java.rmi.ServerException, but it does not. I have looked in the 1.0 spec
and can find no relevant information. In particular, how an I supposed to
distinguish, for instance, between a SOAP fault that had a faultcode of
soap:Server and one that had a faultcode of soap:Client? In fact, I notice
that the SOAPFaultException that I threw in my JAX-RPC method
implementation, with a faultcode of soap:Client and a detail element, got
caught by the server-side plumbing and changed to a SOAPFaultException with
a faultcode of soap:Server and no detail element.

I must be missing something. Please can someone enlighten me?

Also, I notice that when service-specific exceptions are thrown then a SOAP
fault message is returned as the body of an HTTP message that has it's
status line
set to 200 OK. This doesn't seem correct as the SOAP 1.1 spec says at
http://www.w3.org/TR/SOAP/#_Toc478383529 that "In case of a SOAP error while
processing the request, the SOAP HTTP server MUST issue an HTTP 500
"Internal Server Error" response and include a SOAP message in the response
containing a SOAP Fault element (see section 4.4) indicating the SOAP
processing error".

Si.