axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Updated: (AXIS-1513) Throwing SOAPFaultException in JAX-RPC (servier) handler handleRequest method results in an empty SOAP message being sent back
Date Mon, 16 Aug 2004 08:06:20 GMT
The following issue has been updated:

    Updater: Shantanu Sen (mailto:ssen@pacbell.net)
       Date: Mon, 16 Aug 2004 1:05 AM
    Changes:
             Attachment changed to SOAPService.java
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXIS-1513?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1513

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1513
    Summary: Throwing SOAPFaultException in JAX-RPC (servier) handler handleRequest method
results in an empty SOAP message being sent back
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             current (nightly)
             1.2 Beta

   Assignee: 
   Reporter: Shantanu Sen

    Created: Mon, 16 Aug 2004 1:03 AM
    Updated: Mon, 16 Aug 2004 1:05 AM
Environment: W2K, Axis 1.2 nightly build.

Description:
Set up a service with one or more server side JAX-RPC handler classes. Throw a SOAPFaultException
from the handleRequest method of a handler class. The runtime correctly calls the handleFault
method of the same class and walks back the handler chain calling the handleFault of each
handler. 

However, even if a new SOAP message is created by a handler and the context set with this
new SOAP message (which is set with the appropriate fault), the SOAP message returned to the
caller is empty. 

The bug seems to be the setting of the pivot point is done after the handleFault is called
on the handler chain in SOAPService.java. So the message set on the current context by the
handler is set as the requestMessage and the NOT as the responseMessage. 

The fix is to invoke setPivotPoint(true) before calling the handleFault on the handler chain
in the invoke method. Here is the diff.

===========
C:\axis-build\ws-axis\java\src\org\apache\axis\handlers\soap>cvs diff
cvs server: Diffing .
Index: SOAPService.java
===================================================================
RCS file: /home/cvspublic/ws-axis/java/src/org/apache/axis/handlers/soap/SOAPSer
vice.java,v
retrieving revision 1.120
diff -r1.120 SOAPService.java
447,448c447,448
<                     handlerImpl.handleFault(msgContext);
<                     msgContext.setPastPivot(true);
---
>                     msgContext.setPastPivot(true);
>                     handlerImpl.handleFault(msgContext);
================================

Basically the two lines of code need to be flipped. 

The modified SOAPService.java is attached.





---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message