-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
jbossws-native-3.1.1
-
None
JBoss is not adding in the detail portion of the SOAP xml that comes back to the client. Without that tag the exception will not get translated correctly on the client side.
I.E. The following should contain a detail tag showing how to map the thrown fault to a class on the client side.
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>env:Server</faultcode>
<faultstring>Server was unable to process request.</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
This affects throwing/catching a custom exception, i.e.
user defined exception:
<xsd:element name="TestExceptionElement" type="xsd:string"/>
<message name="TestException">
<part name="message" type="TestExceptionElement"/>
</message>
.
.
<operation name="throwTestException">
<input message="tns:throwTestException_request"/>
<output message="tns:throwTestException_response"/>
<fault name="TestException" message="tns:TestException"t/>
</operation>
This generates the following code for the exception:
public class TestException extends java.lang.Exception {
private java.lang.String message;
public TestException(java.lang.String message)
{ super(message); this.message = message; }public String getMessage()
{ return message; }}
Server code:
throw (new TestException("Throwing a test exception from the server"));
Client code:
try
catch (TestException e)
{ // This is the exception I should catch e.printStackTrace(); }catch (Exception e)
{ e.printStackTrace(); }