tags:

views:

49

answers:

2

I am getting response XML, in that I want to add xmlns attribute in each child node which is generated.

Present output:

<createProfileResponse xmlns="http://services.profile.webservices.ecaas.com"&gt;
     <createProfileReturn>STRING</createProfileReturn>
</createProfileResponse>

Required output:

<createProfileResponse xmlns="http://services.profile.webservices.ecaas.com"&gt;
     <createProfileReturn xmlns="">STRING</createProfileReturn>
</createProfileResponse>

How do I do this?

NOTE: I've used JAXB to generate the XML.

+2  A: 

The problem is that you need to have "createProfileReturn" in the blank namespace, and you explicitly put the default namespace in a non-blank namespace in the surrounding tag.

If the XML parser is fully compliant you could create a "ecaaas" global namespace and use

 <ecaas:createProfileResponse>
    <createProfileReturn/>
 </ecaas:createProfileResponse>
Thorbjørn Ravn Andersen
A: 

HIThanks for helping out, actually this we done in coding through the saopBinding class.

But we also modified the server-config.wsdd file I really didnt understand why we need wsdd file..

This gives only the service?.

Anil

Anil