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 "Jarek Gawor (JIRA)" <ax...@ws.apache.org> on 2006/03/27 07:42:21 UTC

[jira] Resolved: (AXIS-2364) namespace and tagname get swapped around in MessageElements created by SOAPDocumentImpl

     [ http://issues.apache.org/jira/browse/AXIS-2364?page=all ]
     
Jarek Gawor resolved AXIS-2364:
-------------------------------

    Resolution: Fixed

This is already fixed in cvs.

> namespace and tagname get swapped around in MessageElements created by SOAPDocumentImpl
> ---------------------------------------------------------------------------------------
>
>          Key: AXIS-2364
>          URL: http://issues.apache.org/jira/browse/AXIS-2364
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.3
>  Environment: axis (3.1)
> castor (1.0M)
>     Reporter: David Lavender

>
> When we encode our Java objects into XML we get tags with no names, but they all have their own namespaces!
> eg.
> < LocationCode="AGP" CodeContext="IATA" xmlns="ArrivalAirport"/>
> when we were expecting:
> <ArrivalAirport LocationCode="AGP" CodeContext="IATA"/>
> debugging through SOAPDocumentImpl, we found that the MessageElements that it creates are inadvertently swapping the namepsace and tagnames around:
> in SOAPDocumentImpl.createElement method:
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_ENVELOPE))
>                     new SOAPEnvelope();
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_HEADER))
>                     return new SOAPHeader(soapenv, soapenv.getSOAPConstants());
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_BODY))
>                     return new SOAPBody(soapenv, soapenv.getSOAPConstants());
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_FAULT))
>                     return new SOAPEnvelope();
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_FAULT_DETAIL))
>                     return new SOAPFault(new AxisFault(tagName));
>                 else {
>                     return new MessageElement("", prefix, localname);
>                 }
> should be:
>                     return new MessageElement(prefix, localname, "");
> the constructor that this calls is:
>     public MessageElement(String localPart, String prefix, String namespace)
> and it's the namespace we want set to "", not the localPart.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira