gdaniels 02/02/04 16:37:42
Modified: java/src/org/apache/axis/encoding/ser ArraySerializer.java
Log:
OK, removeAttribute() just does NOT seem to be happy - keeps breaking
for me every time I run the functional tests within ant, but not from the
normal command line or within IDEA. Refactor code to use
setAttribute() instead.
Revision Changes Path
1.8 +11 -5
xml-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java
Index: ArraySerializer.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ArraySerializer.java 4 Feb 2002 21:08:56 -0000 1.7
+++ ArraySerializer.java 5 Feb 2002 00:37:41 -0000 1.8
@@ -238,12 +238,18 @@
int typeI = attrs.getIndex(Constants.URI_CURRENT_SCHEMA_XSI,
"type");
if (typeI != -1) {
- attrs.removeAttribute(typeI);
- attributes = context.setTypeAttribute(attrs,
- Constants.SOAP_ARRAY);
- } else {
- attributes = attrs;
+ String qname =
+ context.getPrefixForURI(Constants.URI_CURRENT_SCHEMA_XSI,
+ "xsi") + ":type";
+ attrs.setAttribute(typeI,
+ Constants.URI_CURRENT_SCHEMA_XSI,
+ "type",
+ qname,
+ "CDATA",
+ context.qName2String(Constants.SOAP_ARRAY));
}
+
+ attributes = attrs;
}
// For non-encoded (literal) use, each item is named with the QName