Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

AbstactStreamWriter writes invalid XML #1

Open
wants to merge 1 commit into from

1 participant

@allati

AbstractXMLStreamWriter swaps tag local name and namespace when calling
doWriteStartElement.


Without this fix Axis generates following XML (simple example):

<ns1:methodName xmlns:ns1="http://someuri">
    <ns1:http://someuri>somenumericdata</ns1:http://someuri>
    <ns1:http://someuri>somedate</ns1:http://someuri>
    <ns1:http://someuri>andsomestring</ns1:http://someuri>
</ns1:methodName>

It is rather bold to assume that this issue haven't manifested itself before on countless other projects, but this commit fixes the problem for me.

dmitriev AbstactStreamWriter writes invalid XML
AbstractXMLStreamWriter swaps tag local name and namespace when calling
doWriteStartElement.
c46e1ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 29, 2012
  1. AbstactStreamWriter writes invalid XML

    dmitriev authored
    AbstractXMLStreamWriter swaps tag local name and namespace when calling
    doWriteStartElement.
This page is out of date. Refresh to see the latest.
View
2  modules/axiom-api/src/main/java/org/apache/axiom/util/stax/AbstractXMLStreamWriter.java
@@ -116,7 +116,7 @@ public final void writeStartElement(String prefix, String localName, String name
}
public final void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
- doWriteStartElement(internalGetPrefix(namespaceURI), namespaceURI, localName);
+ doWriteStartElement(internalGetPrefix(namespaceURI), localName, namespaceURI);
namespaceContext.startScope();
inEmptyElement = false;
}
Something went wrong with that request. Please try again.