axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Miguel Sanchez Martin <>
Subject Question about faults
Date Tue, 05 Feb 2008 16:20:03 GMT

I have a web service client and server based based on the axiom API. The WSDL for this web
service has an operation with input, output and fault parts.
On the server side I generate a fault by doing the following:
    public void invokeBusinessLogic(
        MessageContext requestCtx,
        MessageContext responseCtx) 
        throws AxisFault 
        SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
        OMElement body = envelope.getBody();
        if (isThisAFault()) {
            SOAPFault fault = soapFactory.createSOAPFault();
            body = fault;
        OMElement payload  = buildMessage(body,...);
        responseCtx.setProcessingFault(true);  // is this required?
On the client side the onError method of the AxisCallback class is invoked, but I was expecting
that the onFault method would be invoked. The stacktrace of the exception in the onError method
is this:
 at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(
 at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
 at org.apache.axis2.description.OutInAxisOperationClient.send(
 at org.apache.axis2.description.OutInAxisOperationClient$

Am I generating the fault properly? Could you please give me a hint about where the problem
is located?
Many thanks in advance,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message