You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Ryo Neyama <ne...@trl.ibm.co.jp> on 2001/02/13 12:43:53 UTC

Bug fix: line separators in marshall()

There is some inconsistency about printing line separators in the
following codes:
      Envelope#marshall()
      Body#marshall()
      RPCMessage#marshall()
More specifically, while Body#marshall() prints line separators before
and after body entries, RPCMessage#marshall() does NOT print a line
separator after the last body entry.

This causes a problem in combination with SOAP digital signature
because info set of the target envelope is broken in marshalling and
unmarshalling.

The patch to fix the above problem is as follows:
--------
Index: java/src/org/apache/soap/Body.java
===================================================================
RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/Body.java,v
retrieving revision 1.5
diff -r1.5 Body.java
168a169
>         sink.write(StringUtils.lineSeparator);
Index: java/src/org/apache/soap/Envelope.java
===================================================================
RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/Envelope.java,v
retrieving revision 1.5
diff -r1.5 Envelope.java
217c217,218
<     sink.write("</" + soapEnvNSPrefix + ':' + Constants.ELEM_ENVELOPE + '>');
---
>     sink.write("</" + soapEnvNSPrefix + ':' + Constants.ELEM_ENVELOPE + 
>                '>' + StringUtils.lineSeparator);
Index: java/src/org/apache/soap/rpc/RPCMessage.java
===================================================================
RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/rpc/RPCMessage.java,v
retrieving revision 1.11
diff -r1.11 RPCMessage.java
310,311c310
<                  methodName + suffix + '>' +
<                  StringUtils.lineSeparator);
---
>                  methodName + suffix + '>');


---

I'm going to commit this patch if there is no objection on this in few
days.

Regards,
    Ryo Neyama @ IBM Research, Tokyo Research Laboratory
    Internet Technology
    neyama@trl.ibm.co.jp