axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Peck (JIRA)" <>
Subject [jira] Commented: (AXIS-2381) CLONE -Duplicating namespace
Date Wed, 25 Jan 2006 21:41:10 GMT
    [ ] 

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:
>      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="" xmlns:ns1="">
>          <companyName xmlns="">Industriestrasse 10</companyName>
>          <companyStreet xmlns=""/>
>          <companyZipLocation xmlns="">3000 Bern</companyZipLocation>
>          <materialVorsteuer xmlns="">12000</materialVorsteuer>
>          <mwstNr xmlns="">123456</mwstNr>
>          <rabatte xmlns="">490</rabatte>
>          <umsatz24 xmlns="">24000</umsatz24>
>          <umsatz36 xmlns="">100</umsatz36>
>          <umsatz76 xmlns="">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:
For more information on JIRA, see:

View raw message