You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2004/01/15 19:30:34 UTC
cvs commit: ws-axis/java/src/org/apache/axis/encoding/ser BeanSerializer.java
dims 2004/01/15 10:30:34
Modified: java/src/org/apache/axis/encoding/ser BeanSerializer.java
Log:
Fix for Bug 26104 - Serialization of headers in a SOAP request fails if debugs are enabled
from tkoponen@iki.fi (Teemu Koponen)
Revision Changes Path
1.71 +12 -1 ws-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java
Index: BeanSerializer.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- BeanSerializer.java 10 Dec 2003 20:04:27 -0000 1.70
+++ BeanSerializer.java 15 Jan 2004 18:30:34 -0000 1.71
@@ -551,9 +551,20 @@
QName qname,
QName xmlType, AttributesImpl attrs,
SerializationContext context) throws Exception {
- String propString = context.getValueAsString(propValue, xmlType);
+
String namespace = qname.getNamespaceURI();
String localName = qname.getLocalPart();
+
+ // org.xml.sax.helpers.AttributesImpl JavaDoc says: "For the
+ // sake of speed, this method does no checking to see if the
+ // attribute is already in the list: that is the
+ // responsibility of the application." check for the existence
+ // of the attribute to avoid adding it more than once.
+ if (attrs.getIndex(namespace, localName) != -1) {
+ return;
+ }
+
+ String propString = context.getValueAsString(propValue, xmlType);
attrs.addAttribute(namespace,
localName,