axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Created: (AXIS-1327) SOAPEnvelope.removeHeaders() does not work in context of Serialization
Date Wed, 21 Apr 2004 01:09:53 GMT
Message:

  A new issue has been created in JIRA.

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1327
    Summary: SOAPEnvelope.removeHeaders() does not work in context of Serialization
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             1.2 Beta

   Assignee: 
   Reporter: Algirdas Veitas

    Created: Tue, 20 Apr 2004 6:09 PM
    Updated: Tue, 20 Apr 2004 6:09 PM
Environment: JDK1.3.x, Windows 2000

Description:
If you attempt to delete SOAP Headers from an instance of org.apache.axis.message.SOAPEnvelope
using removeHeaders(), the behavior when trying to serialize the envelope is not what you
would expect.....  It keeps the headers.

This is due to the fact that MessageElement.output(SerializationContext context) has the following
check

if ((recorder != null) && (!_isDirty)) {
            recorder.replay(startEventIndex,
                            endEventIndex,
                            new SAXOutputter(context));
            return;
}

In this case _isDirty is false and will invoke this block of code, but
it should invoke the code below it.


BELOW IS A HANDLER THAT DEMONSTRATES THE CODE EXECUTION....

public class XYZServiceHandler
	extends BasicHandler
{
    public void invoke(MessageContext msgContext) throws AxisFault
    {
        try {
            System.out.println("BEFORE REMOVE..........");
            msgContext.getCurrentMessage().writeTo(System.out);

            SOAPMessage soapMessage  = msgContext.getCurrentMessage();
            SOAPEnvelope env = (org.apache.axis.message.SOAPEnvelope)soapMessage.getSOAPPart().getEnvelope();
            env.removeHeaders();

            System.out.println("AFTER..........");
            msgContext.getCurrentMessage().writeTo(System.out);

        }
        catch (Exception e) {
            e.printStackTrace();
        }

    }
}

JUST NEED TO SET _isDirty to true in SOAPEnveloper.removeHeaders()


---------------------------------------------------------------------
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