axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Vaccarezza (JIRA)" <>
Subject [jira] Commented: (AXIS2-1767) JMS Transport incorrectly manage AxisFaults thrown from the endpoint
Date Thu, 23 Nov 2006 19:35:02 GMT
    [ ] 
Juan Vaccarezza commented on AXIS2-1767:

This code snippet seems to fix the bug:


         public void run() {
            MessageContext msgCtx = createMessageContext(message);

            AxisEngine engine = new AxisEngine(msgCtx.getConfigurationContext());
            try {
                log.debug("Delegating JMS message for processing to the Axis engine");
                if (msgCtx.getEnvelope().getBody().hasFault()) {
                    log.debug("Fault received, processing it...");
                } else {
                    try {
                        log.debug("Helhty (no fault) message received, processing it...");
                    } catch (AxisFault e) {
                        log.warn("Exception trying to receive the healthy (no fault) message",
                        if (msgCtx.isServerSide()) {
                  "(Server Side) The exception will be sent to the client...");
                            MessageContext faultContext = engine.createFaultMessageContext(msgCtx,
            } catch (AxisFault af) {
                log.fatal("JMS Worker [" + Thread.currentThread().getName() + "] Encountered
an Axis Fault : " + af.getMessage(), af);

Just replace the run() method by this one, and that would be it.

Please, somebody check this out,  and let me know your thoughts... it worked fine for me

> JMS Transport incorrectly manage AxisFaults thrown from the endpoint
> --------------------------------------------------------------------
>                 Key: AXIS2-1767
>                 URL:
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Juan Vaccarezza
> Steps:
> *Create a wsdl document with a fault declaratrion
> *Generate java code for both client and service from the wsdl file
> *Fill a generated skeleton method with a code sinppet that just throws the declared exception.
> *Configure AXIS to use JMS transport (uncomment it in axis2.xml)
> *In the generated tests, point the generated stub to a correct jms address
> *Deploy the service
> *Start axis
> *Run tests
> Bug:
> The exception will be shown in the axis server console.
> The JMSReceiver ignores the fault just logs it and no action is taken, no response is
returned to the client.
> The junit test will get sutcked for 30 secs (the default jms transport timeout) and then
fail because no response has been sent from the server.
> The same scenario works as expected using the HTTP transport.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


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

View raw message