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 "Eran Chinthaka (JIRA)" <ji...@apache.org> on 2005/03/07 09:59:54 UTC
[jira] Commented: (AXIS2-14) No-namespace element not serialized
[ http://issues.apache.org/jira/browse/AXIS2-14?page=comments#action_60344 ]
Eran Chinthaka commented on AXIS2-14:
-------------------------------------
Fixed this bug.
There was a problem in the builder when handling namespaces.
-- Regards,
Eran Chinthaka
> No-namespace element not serialized
> -----------------------------------
>
> Key: AXIS2-14
> URL: http://issues.apache.org/jira/browse/AXIS2-14
> Project: Axis2
> Type: Improvement
> Components: om
> Reporter: Jongjin Choi
> Assignee: Davanum Srinivas
>
> The Aixom doest not seem to serialize soap message which has an unqualified
> soap body element.
> For example,
> <soapenv:Body>
> <ns1:getBalance xmlns:ns1=http://localhost:8081/axis/services/BankPort/>
> <accountNo href="#id0"/>
> </ns1:getBalacne>
> </soapenv:Body>
> The following exception occurs when serializing.
> org.apache.axis.om.OMException: Non namespace qualified elements are not allowed
> at
> org.apache.axis.om.impl.llom.OMElementImpl.serializeStartpart(OMElementImpl.java:681)
> at
> org.apache.axis.om.impl.llom.OMElementImpl.serializeNormal(OMElementImpl.java:723)
> at org.apache.axis.om.impl.llom.OMElementImpl.serialize(OMElementImpl.java:632)
> at org.apache.axis.om.impl.llom.OMTextImpl.serialize(OMTextImpl.java:127)
> at org.apache.axis.om.impl.llom.OMElementImpl.serialize(OMElementImpl.java:638)
> at org.apache.axis.om.impl.llom.OMTextImpl.serialize(OMTextImpl.java:127)
> at
> org.apache.axis.om.impl.llom.OMElementImpl.serializeNormal(OMElementImpl.java:726)
> at org.apache.axis.om.impl.llom.OMElementImpl.serialize(OMElementImpl.java:632)
> at org.apache.axis.om.impl.llom.OMTextImpl.serialize(OMTextImpl.java:127)
> at org.apache.axis.om.impl.llom.OMElementImpl.serialize(OMElementImpl.java:638)
> at org.apache.axis.om.impl.llom.OMTextImpl.serialize(OMTextImpl.java:127)
> at
> org.apache.axis.om.impl.llom.OMElementImpl.serializeNormal(OMElementImpl.java:726)
> at org.apache.axis.om.impl.llom.OMElementImpl.serialize(OMElementImpl.java:632)
> But the OMElement for <accountNo> element is built and the localname and
> namespace's value are set.
> For example,
> Envelope envelope = (SOAPEnvelope)builder.getDocumentElement();
> SOAPBody sb = envelope.getBody();
> OMElement e1 = sb.getFirstElement(); // <ns1:getBalance>
> OMElement e2 = e1.getFirstElement(); // <accountNo>
> OMNamespace ns = e2.getNamespace();
> Writer write = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
> envelope.serialize(writer, true);
> The values of localName and namespace of OMElment e2 are :
> e2.getLocalName() = accountNo
> e2.getNamespaceName() = null;
> ns.getName() = http://localhost:8081/axis/services/BankPort
> ns.getPrefix() = ns1
> The questions are:
> 1. Why OMElement throws exception when serializing namespace-unqualified
> element?
> 2. The unqualifed element's OMElement is built but the OMNamespace for this
> OMElement looks invalid.
> In this case, I think the values should be :
> ns.getName() = "" or null
> ns.getPrefix() = "" or null
>
> * Note.
> When serializing like this :
> envelope.serialize(writer, false);
> The above exception does not occur.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira