axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Langisch <li...@langisch.ch>
Subject [Axis2] SOAPFault details are being lost
Date Thu, 02 Feb 2006 19:53:12 GMT
Hi,

I'm trying to setup some kind of proxy webservice. My service method 
looks as follows:

     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 not 
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.

This is not the correct behaviour, isn't it?

Thanks
Yves

Mime
View raw message