gdaniels 02/04/19 06:43:46
Modified: java/src/org/apache/axis/encoding/ser QNameSerializer.java
Log:
Use SerializationContext's qName2String() so that namespace mappings
get handled appropriately in all cases.
Revision Changes Path
1.2 +7 -11
xml-axis/java/src/org/apache/axis/encoding/ser/QNameSerializer.java
Index: QNameSerializer.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/QNameSerializer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- QNameSerializer.java 2 Apr 2002 22:05:18 -0000 1.1
+++ QNameSerializer.java 19 Apr 2002 13:43:46 -0000 1.2
@@ -55,18 +55,15 @@
package org.apache.axis.encoding.ser;
+import org.apache.axis.Constants;
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.Serializer;
+import org.apache.axis.wsdl.fromJava.Types;
import org.xml.sax.Attributes;
-import org.xml.sax.helpers.AttributesImpl;
-
import javax.xml.rpc.namespace.QName;
import java.io.IOException;
-import org.apache.axis.Constants;
-import org.apache.axis.wsdl.fromJava.Types;
-import org.apache.axis.encoding.Serializer;
-import org.apache.axis.encoding.SerializationContext;
-
/**
* Serializer for QNames.
*/
@@ -80,10 +77,9 @@
throws IOException
{
QName qname = (QName) value;
- AttributesImpl attrImpl = new AttributesImpl(attributes);
- attrImpl.addAttribute(null, null, "xmlns:qns", null,
qname.getNamespaceURI());
- context.startElement(name, attrImpl);
- context.writeString("qns:" + qname.getLocalPart());
+ String str = context.qName2String(qname);
+ context.startElement(name, null);
+ context.writeString(str);
context.endElement();
}