axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bender <BEN...@de.ibm.com>
Subject Duplicate namespace definitions are not removed
Date Wed, 22 Mar 2006 08:43:47 GMT
Hi I'm using Axis2 for Java and I try to send messages with the following 
content and
the following style between the server and a client

  <soapenv:Header 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
    <wsa:EndpointReference>
      <wsa:Address>
        http://localhost:5988/root/cimv2:Linux_OperatingSystem
      </wsa:Address>
      <wsa:ReferenceParameters 
 xmlns:linux_os="http://localhost:8080/WSDM/Linux_OperatingSystem.xsd">
        <linux_os:CreationClassName>
          Linux_OperatingSystem
        </linux_os:CreationClassName>
        <linux_os:CSCreationClassName>
          Linux_ComputerSystem
        </linux_os:CSCreationClassName>
        <linux_os:CSName>localhost.localdomain</linux_os:CSName>
        <linux_os:Name>localhost.localdomain</linux_os:Name>
      </wsa:ReferenceParameters>
    </wsa:EndpointReference>
        ...
  </soapenv:Header>

But if I try to construct this EndpointReference or any other OMElement 
then
namespace definitions that are defined a second time in a subelement are 
not
removed from the subelements. I can only construct the following:

  <soapenv:Header 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
    <wsa:EndpointReference>
      <wsa:Address>
        http://localhost:5988/root/cimv2:Linux_OperatingSystem
      </wsa:Address>
      <wsa:ReferenceParameters 
xmlns:linux_os="http://localhost:8080/WSDM/Linux_OperatingSystem.xsd">
        <linux_os:CreationClassName 
xmlns:linux_os="http://localhost:8080/WSDM/Linux_OperatingSystem.xsd">
          Linux_OperatingSystem
        </linux_os:CreationClassName>
        <linux_os:CSCreationClassName 
xmlns:linux_os="http://localhost:8080/WSDM/Linux_OperatingSystem.xsd">
          Linux_ComputerSystem
        </linux_os:CSCreationClassName>
        <linux_os:CSName 
xmlns:linux_os="http://localhost:8080/WSDM/Linux_OperatingSystem.xsd">
          localhost.localdomain
        </linux_os:CSName>
        <linux_os:Name 
xmlns:linux_os="http://localhost:8080/WSDM/Linux_OperatingSystem.xsd">
          localhost.localdomain
        </linux_os:Name>
      </wsa:ReferenceParameters>
    </wsa:EndpointReference>
        ...
  </soapenv:Header>

My problem is that the xmlns:linux_os is still defined in every subelement 
of wsa:ReferenceParameters although
xmlns:linux_os is already defined in wsa:ReferenceParameters. This makes 
the message larger than it has to be.

Can anybody tell me how I can build a message like in the first sample or 
is it a bug in Axis that the namespace
definitions of the subelements are not removed. I don't have the problem 
with the definition of the xmlns:wsa, here
the namespace definition is removed in the subelements. The problem 
appears only if an OMElement declares more than
one namespace.

Any hint is welcome.
Thanks,
Ben
Mime
View raw message