Hi Axis2 developers,
Even I too am facing same problem. And, this appears like a bug to me. 
As per SOAP element names should be qualified, but that doesn't
necessarily mean prefixes should exist. A default namespace element
may just be qualified with a null prefix. This should be fixed at the
earliest, or else interop is going to be a problem.
I am writing a CommonsHTTPTransporSender and am stuck in creating a response
response envelope out of the returned SOAP packet. In my case on the
server-side Axis1.2RC2 returned a SOAP packet (verified with tcpmon)
that has an element <EchoStringReturn>, this is being treated as
unqualifed and OM (AXIOM) is failing to (de)serialize it.

Thank you,
Jayachandra

On Thu, 3 Mar 2005 19:46:14 +0900, Jongjin Choi <[EMAIL PROTECTED]> wrote:
> Hi.
> 
> 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();
> 
> 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
>  Is this right or am I miss something in OMElement?
> 
> Thanks.
> 
> /Jongjin
> 
> 


-- 
-- Jaya

Reply via email to