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 "Bryan Allen (JIRA)" <ji...@apache.org> on 2006/02/01 17:55:03 UTC

[jira] Created: (AXIS2-422) duplicate xmlns="" attribute in client response

duplicate xmlns="" attribute in client response
-----------------------------------------------

         Key: AXIS2-422
         URL: http://issues.apache.org/jira/browse/AXIS2-422
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug
  Components: om  
    Versions: 0.94    
 Environment: Axis2 0.94, Eclipse,  Java JDK 1.4.2_09, XP
    Reporter: Bryan Allen


I'm using Axis2 0.94 ServiceClient to call a Web service that returns the following XML in the soap body.  
This is the XML seen going across the wire with tcptrace. 

    <ExecuteResponse xmlns="urn:schemas-microsoft-com:xml-analysis">
      <return>
        <TABLE xmlns="">
          <CLASS>
            <Name>Alfred</Name>
            <Sex>M</Sex>
            <Age>14</Age>
            <Height>69</Height>
            <Weight>112.5</Weight>
          </CLASS>
        </TABLE>
      </return>
    </ExecuteResponse>

When this XML is parsed in ServiceClient and I serialize it out to file I get the following output:

<ExecuteResponse xmlns="urn:schemas-microsoft-com:xml-analysis">
  <return>
    <TABLE xmlns="" xmlns="">
      <CLASS xmlns="">
        <Name xmlns="">Alfred</Name>
        <Sex xmlns="">M</Sex>
        <Age xmlns="">14</Age>
        <Height xmlns="">69</Height>
        <Weight xmlns="">112.5</Weight>
      </CLASS>
    </TABLE>
  </return>
</ExecuteResponse>

I think this should work as it does work with other web service client implementations.

I tracked it down in the source and it looks like the problem may be in StAXOMBuilder and the code it uses to find or declare namespaces, processNamespaceData().  Looks like there is code there that doesn't handle a namespace with empty string namespace.  

Its definitely not optimal that each element has the xmlns="" attribute, but the main problem is the duplicate xmlns attribute that causes the XML to be invalid.


-- 
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


[jira] Assigned: (AXIS2-422) duplicate xmlns="" attribute in client response

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-422?page=all ]

Deepal Jayasinghe reassigned AXIS2-422:
---------------------------------------

    Assign To: Eran Chinthaka

> duplicate xmlns="" attribute in client response
> -----------------------------------------------
>
>          Key: AXIS2-422
>          URL: http://issues.apache.org/jira/browse/AXIS2-422
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: om
>     Versions: 0.94
>  Environment: Axis2 0.94, Eclipse,  Java JDK 1.4.2_09, XP
>     Reporter: Bryan Allen
>     Assignee: Eran Chinthaka

>
> I'm using Axis2 0.94 ServiceClient to call a Web service that returns the following XML in the soap body.  
> This is the XML seen going across the wire with tcptrace. 
>     <ExecuteResponse xmlns="urn:schemas-microsoft-com:xml-analysis">
>       <return>
>         <TABLE xmlns="">
>           <CLASS>
>             <Name>Alfred</Name>
>             <Sex>M</Sex>
>             <Age>14</Age>
>             <Height>69</Height>
>             <Weight>112.5</Weight>
>           </CLASS>
>         </TABLE>
>       </return>
>     </ExecuteResponse>
> When this XML is parsed in ServiceClient and I serialize it out to file I get the following output:
> <ExecuteResponse xmlns="urn:schemas-microsoft-com:xml-analysis">
>   <return>
>     <TABLE xmlns="" xmlns="">
>       <CLASS xmlns="">
>         <Name xmlns="">Alfred</Name>
>         <Sex xmlns="">M</Sex>
>         <Age xmlns="">14</Age>
>         <Height xmlns="">69</Height>
>         <Weight xmlns="">112.5</Weight>
>       </CLASS>
>     </TABLE>
>   </return>
> </ExecuteResponse>
> I think this should work as it does work with other web service client implementations.
> I tracked it down in the source and it looks like the problem may be in StAXOMBuilder and the code it uses to find or declare namespaces, processNamespaceData().  Looks like there is code there that doesn't handle a namespace with empty string namespace.  
> Its definitely not optimal that each element has the xmlns="" attribute, but the main problem is the duplicate xmlns attribute that causes the XML to be invalid.

-- 
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


[jira] Resolved: (AXIS2-422) duplicate xmlns="" attribute in client response

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-422?page=all ]
     
Eran Chinthaka resolved AXIS2-422:
----------------------------------

    Fix Version: 0.96
     Resolution: Fixed

Fixed in the latest SVN of Axiom

> duplicate xmlns="" attribute in client response
> -----------------------------------------------
>
>          Key: AXIS2-422
>          URL: http://issues.apache.org/jira/browse/AXIS2-422
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: om
>     Versions: 0.94
>  Environment: Axis2 0.94, Eclipse,  Java JDK 1.4.2_09, XP
>     Reporter: Bryan Allen
>     Assignee: Eran Chinthaka
>      Fix For: 0.96

>
> I'm using Axis2 0.94 ServiceClient to call a Web service that returns the following XML in the soap body.  
> This is the XML seen going across the wire with tcptrace. 
>     <ExecuteResponse xmlns="urn:schemas-microsoft-com:xml-analysis">
>       <return>
>         <TABLE xmlns="">
>           <CLASS>
>             <Name>Alfred</Name>
>             <Sex>M</Sex>
>             <Age>14</Age>
>             <Height>69</Height>
>             <Weight>112.5</Weight>
>           </CLASS>
>         </TABLE>
>       </return>
>     </ExecuteResponse>
> When this XML is parsed in ServiceClient and I serialize it out to file I get the following output:
> <ExecuteResponse xmlns="urn:schemas-microsoft-com:xml-analysis">
>   <return>
>     <TABLE xmlns="" xmlns="">
>       <CLASS xmlns="">
>         <Name xmlns="">Alfred</Name>
>         <Sex xmlns="">M</Sex>
>         <Age xmlns="">14</Age>
>         <Height xmlns="">69</Height>
>         <Weight xmlns="">112.5</Weight>
>       </CLASS>
>     </TABLE>
>   </return>
> </ExecuteResponse>
> I think this should work as it does work with other web service client implementations.
> I tracked it down in the source and it looks like the problem may be in StAXOMBuilder and the code it uses to find or declare namespaces, processNamespaceData().  Looks like there is code there that doesn't handle a namespace with empty string namespace.  
> Its definitely not optimal that each element has the xmlns="" attribute, but the main problem is the duplicate xmlns attribute that causes the XML to be invalid.

-- 
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