[ 
http://issues.apache.org/jira/browse/AXIS-2139?page=comments#action_12417042 ] 

Yevgeny Rouban commented on AXIS-2139:
--------------------------------------

I have encountered a mistake in the fix of SOAPEnvelope.setDirty(boolean dirty) 
method, which is now in the axis 1.4 binaries. 
http://svn.apache.org/viewvc/webservices/axis/trunk/java/src/org/apache/axis/message/SOAPEnvelope.java?revision=264831&view=markup&pathrev=386031
at the bottom of this source change setDirty() to super.setDirty(dirty):

    public void setDirty(boolean dirty) {
        if (recorder != null && !_isDirty && dirty && isRecorded()){
            recorder.clear();
            recorder = null;
        }
<<        setDirty();
>>        super.setDirty(dirty);
    }


To test this fix, please add the following assertion to the Test2139.java:
        assertXMLEqual("Input differs from what getAsString() returns.", xml, 
env.getAsString());

With the suggested fix it passes, but without the fix it reports the following 
error:

junit.framework.AssertionFailedError: Input differs from what getAsString() 
returns., org.custommonkey.xmlunit.Diff
[different] Expected number of child nodes '3' but was '1' - comparing 
<soapenv:Envelope...> at /Envelope[1] to <soapenv:Envelope...> at /Envelope[1]

I use WSS4J 1.5, AXIS 1.4 and 

java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, 
GC: System optimized over throughput (initial strategy singleparpar))


> SAX recorder is dirty after deserialization
> -------------------------------------------
>
>          Key: AXIS-2139
>          URL: http://issues.apache.org/jira/browse/AXIS-2139
>      Project: Apache Axis
>         Type: Bug

>   Components: Serialization/Deserialization
>     Versions: current (nightly)
>     Reporter: Steve Green
>     Assignee: Venkat Reddy
>     Priority: Blocker
>  Attachments: Test2139.java, test.java, test.java
>
> During parsing of a message, SAX events are stored in the recorder, and 
> MessageElement objects are created.  The insertion of the new MessageElements 
> are setting _isDirty, and thus invalidating the recorder for serialization.  
> In my particular case, this breaks digital signatures becuase the 
> MessageElement DOM is incomplete (it's missing some whitespace text nodes).  
> It seems to me that it doesn't make sense to dirty the recorder during 
> recording itself.  This problem seemed to be created at version 1.13 of 
> NodeImpl.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to