You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Glen Daniels <gd...@macromedia.com> on 2002/08/20 00:20:24 UTC
RE: cvs commit: xml-axis/java/src/org/apache/axis/encoding/ser QN
ameSerializer.java
Nice catch Russell!
This looks like a job for... Unit Test Man!
--G
> -----Original Message-----
> From: butek@apache.org [mailto:butek@apache.org]
> Sent: Monday, August 19, 2002 4:18 PM
> To: xml-axis-cvs@apache.org
> Subject: cvs commit: xml-axis/java/src/org/apache/axis/encoding/ser
> QNameSerializer.java
>
>
> butek 2002/08/19 13:18:04
>
> Modified: java/src/org/apache/axis/encoding/ser
> QNameSerializer.java
> Log:
> Sometime in the last couple weeks the TCK had more
> failures. This fixes
> them.
>
> Revision Changes Path
> 1.6 +4 -2
> 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/QName
> Serializer.java,v
> retrieving revision 1.5
> retrieving revision 1.6
> diff -u -r1.5 -r1.6
> --- QNameSerializer.java 16 Aug 2002 11:07:09 -0000 1.5
> +++ QNameSerializer.java 19 Aug 2002 20:18:04 -0000 1.6
> @@ -77,9 +77,11 @@
> Object value,
> SerializationContext context)
> throws IOException
> {
> - QName qname = (QName) value;
> + // NOTE: getValueAsString has the side-effect of
> priming the context
> + // with the QName's namespace, so it must be
> called BEFORE context.startElement.
> + String qnameString = getValueAsString(value, context);
> context.startElement(name, attributes);
> - context.writeString(getValueAsString(qname, context));
> + context.writeString(qnameString);
> context.endElement();
> }
>
>
>
>
>