[JBoss JIRA] Created: (JBWS-2779) No detail tag in SOAP xml coming back from server
by William Newman (JIRA)
No detail tag in SOAP xml coming back from server
-------------------------------------------------
Key: JBWS-2779
URL: https://jira.jboss.org/jira/browse/JBWS-2779
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jbossws-cxf
Environment: Redhat 4
Reporter: William Newman
JBoss is not adding in the detail portion of the SOAP xml that comes back to the client. Without that tag I don't think that the exception can 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 {
// call my method that throws the exception
test.testThrowException();
} catch (TestException e) {
// This is the exception I should catch
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years