I have created a webservice using jboss.net (i.e. Axis in JBoss) and I am dynamically invoking it from WSIF 2.0. I noticed that if my EJB endpoint throws an exception, WSIF doesn’t seem to fill in the faultMessage with the details although the logs show that the fault was sent back to the client (faultcode and and faultstring).. Is this as expected or a bug? Apparently, WSIF is using the Apache Axis client, so the location where the fault is caught but not populated is approx line 1560 of WSIFOperation_ApacheAxis.java – the operation is not async but didn’t return any values since there was a fault, so it never calls buildResponseMessages(response, outMsg, faultMsg) to fill in the fault message. Here is the code I expect to work on the client:

 

        // create the input, output and fault messages associated with this operation

        WSIFMessage input = operation.createInputMessage();

        WSIFMessage output = operation.createOutputMessage();

        WSIFMessage fault = operation.createFaultMessage("soapenv:Server.userException");

 

        // populate the input message

        input.setObjectPart("in0", documentType);

        input.setObjectPart("in1", documentPayload);

 

        // do the invocation

        if (operation.executeRequestResponseOperation(input, output, fault)) {

        } else {

            System.out.println("Invocation failed");

            // extract fault message info

            throw new Exception((String)fault.toString());

        }

 

but all the fault class’s toString() displays is:

 

[EMAIL PROTECTED] name:null parts:null

 

…which means that the fault is not populated with any details.. Expected or a bug?

 

Thanks,

James

Reply via email to