Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.1
-
None
-
whatever
-
Moderate
Description
Create a SOAPFaultException filled with a SOAPFault and throw it from a JAX-WS Hander.
On the other side some content of the SOAPFaultException is missing.
Here is a code that can be tried: create a SOAPHandler with the following handleMessage().
public boolean handleMessage(SOAPMessageContext ctx) {
Boolean outboundProperty = (Boolean) ctx
.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (!outboundProperty) {
SOAPMessage msg = ctx.getMessage();
SOAPBody body;
try
catch (SOAPException e)
{ // TODO Auto-generated catch block e.printStackTrace(); }}
return true;
}
This is what I would expect:
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Server not responding</faultstring>
<faultactor>http://gizmos.com/orders</faultactor>
<detail>
<PO:order xmlns:PO="http://gizmos.com/orders/">Quantity element does not have a value</PO:order>
<PO:order xmlns:PO="http://gizmos.com/orders/">Incomplete address: no zip code</PO:order>
</detail>
</soapenv:Fault>
And this is what I get:
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Server not responding</faultstring>
</soap:Fault>