axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Closed: (AXIS-1513) Throwing SOAPFaultException in JAX-RPC (servier) handler handleRequest method results in an empty SOAP message being sent back
Date Wed, 18 Aug 2004 04:29:20 GMT
Message:

   The following issue has been closed.

   Resolver: Davanum Srinivas
       Date: Tue, 17 Aug 2004 9:28 PM

Applied Patch.

thanks,
dims
---------------------------------------------------------------------
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: Closed
   Priority: Major
 Resolution: FIXED

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

   Assignee: 
   Reporter: Shantanu Sen

    Created: Mon, 16 Aug 2004 1:03 AM
    Updated: Tue, 17 Aug 2004 9:28 PM
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