As per the SOAP Request child node already has the namespace of the parent
node by default and we can get rid of the mentioned problem by passing the
default namespace of the existing child element when creating a new
OMElement of the child.

When adding the child node to the parent node axiom ignores the default
namespace and generates the desired output.

Thanks,
Sohani

Sohani Weerasinghe
Software Engineer
WSO2, Inc: http://wso2.com

Mobile  : +94 716439774
Blog     :http://christinetechtips.blogspot.com/
Twitter  : https://twitter.com/sohanichristine

On Mon, Sep 29, 2014 at 2:43 PM, Sohani Weerasinghe <[email protected]> wrote:

> Hi All,
>
> When I try to create an OMElement by adding child nodes to the parent
> node, if there is a declared namespace in the parent node it propagates
> down to the child node as well. In other words I am getting an empty
> namespace (xmlns="") for child elements as follows.
>
> SOAP Request:
>
>  <outer xmlns="http://abc.com";>
>    <inner/>
>   </outer>
>
> Response :
>
>  <outer xmlns="http://abc.com";>
>   <inner* xmlns=""*/>
>   </outer>
>
> Can someone provide a solution to overcome this issue.
>
> Sohani Weerasinghe
> Software Engineer
> WSO2, Inc: http://wso2.com
>
> Mobile  : +94 716439774
> Blog     :http://christinetechtips.blogspot.com/
> Twitter  : https://twitter.com/sohanichristine
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to