axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Peck (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-2381) CLONE -Duplicating namespace
Date Wed, 25 Jan 2006 21:41:10 GMT
    [ http://issues.apache.org/jira/browse/AXIS-2381?page=comments#action_12364008 ] 

Patrick Peck commented on AXIS-2381:
------------------------------------

I'm sorry I cloned the issue - I thought I could modify the "Affected Version/s" field since
this bug also applies to version 1.3 (and probably HEAD).

The problem with this bug is that it can break XML signatures.

I did some debugging on this, and I think I found a solution:

The problem seems to be not in the serialization code but in the deserialization code of the
MessageElement. In that class there is a method called 

private void copyNode(MessageElement dest, org.w3c.dom.Node source)

which is called indirectly from the MessageElement(org.w3c.dom.Element) constructor.

In said copyNode() method, default namespace nodes are not identified correctly and are not
added to the namespace mapping via 'dest.addMapping(map)'. But the serialization code somehow
depends on default namespaces being declared as namespaces, not just as 'normal' attributes.

I will attach the Axis 1.3 Version of the MessageElement class that fixes the bug via an additional
if-statement in copyNode() that takes care of default namespace declarations. I don't know
whether this is the most elegant solution, but it seems to work for me.

If it's at all possible, please incorporate this fix into version 1.3.1 or 1.4. Thanks!


> CLONE -Duplicating namespace
> ----------------------------
>
>          Key: AXIS-2381
>          URL: http://issues.apache.org/jira/browse/AXIS-2381
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC2
>     Reporter: Patrick Peck

>
> When I do a dynamic invocation to a web service the serialized SOAP-Body contains too
many namespace declarations. Each element is 'fully' qualified, e.g. :
> <soapenv:Body>
>      <ns1:aTestVo xmlns="http://wsdemo.demo.ch/" xmlns:ns1="http://wsdemo.demo.ch/">
>          <companyName xmlns="http://wsdemo.demo.ch/">Industriestrasse 10</companyName>
>          <companyStreet xmlns="http://wsdemo.demo.ch/"/>
>          <companyZipLocation xmlns="http://wsdemo.demo.ch/">3000 Bern</companyZipLocation>
>          <materialVorsteuer xmlns="http://wsdemo.demo.ch/">12000</materialVorsteuer>
>          <mwstNr xmlns="http://wsdemo.demo.ch/">123456</mwstNr>
>          <rabatte xmlns="http://wsdemo.demo.ch/">490</rabatte>
>          <umsatz24 xmlns="http://wsdemo.demo.ch/">24000</umsatz24>
>          <umsatz36 xmlns="http://wsdemo.demo.ch/">100</umsatz36>
>          <umsatz76 xmlns="http://wsdemo.demo.ch/">158340</umsatz76>
>       </ns1:aTestVo>
> </soapenv:Body>
> And the first element (aTestVo) has the same namespace duplicated.

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


Mime
View raw message