You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Yves Langisch (JIRA)" <ji...@apache.org> on 2006/02/03 10:29:04 UTC

[jira] Updated: (AXIS2-425) SOAPFault details are being lost

     [ http://issues.apache.org/jira/browse/AXIS2-425?page=all ]

Yves Langisch updated AXIS2-425:
--------------------------------

    Attachment: axis2_partial_patch_425.patch

_Partial_ patch: fault.getDetail() is not null anymore for business faults described in this issue

The problem of an empty detail on the wire after throwing it again is not solved with this patch.

> SOAPFault details are being lost
> --------------------------------
>
>          Key: AXIS2-425
>          URL: http://issues.apache.org/jira/browse/AXIS2-425
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: core
>     Versions: 0.95
>     Reporter: Yves Langisch
>  Attachments: axis2_partial_patch_425.patch
>
> My service method looks as follows which again calls another webservice:
>     public OMElement Operation1(OMElement element) throws Exception {
>         OMElement result = null;
>         try {
>             Options options = new Options();
>             EndpointReference er = new EndpointReference("http://localhost:9700/nextWS");
>             options.setTo(er);
>             options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>             options.setUseSeparateListener(false);
>             options.setSoapAction("\"Operation1\"");
>             ServiceClient client = new ServiceClient();
>             client.setOptions(options);
>             result = client.sendReceive(element);
>         } catch (AxisFault axisFault) {
>         // do some work
>         ...
>         // throw fault back to client       
>             throw axisFault;
>         }
>         return result;
>     }
> If I get back a SOAPFault from the called webservice I just would like to give this SOAPFault back to the client without any modifications. Especially the detail element should not be touched. With the code above and a fault like this
> ...
> <faultString>Fault occured</faultString>
> <detail>
>    <myBusinessFault>
>     <a>info</a>
>    </myBusinessFault>
> </detail>   
> the faultString is copied into the detail element (on the wire back to the client). The original detail is lost as it is null. I have no possibility to get the details (myBusinessFault) in my catch.
> I already changed some Axis source and was able the get the details correctly as OMElement. But throwing it in the catch caused the details to be lost again on the wire. The problem seems to be in the AxisEngine class in the method extractFaultInformationFromMessageContext.
> I'll provide a partial patch to this issue that solves the problem with getting the details from the fault. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira