aspose file tools*
The moose likes Web Services and the fly likes Setting the tag names for child nodes in web service response XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Setting the tag names for child nodes in web service response XML " Watch "Setting the tag names for child nodes in web service response XML " New topic
Author

Setting the tag names for child nodes in web service response XML

Divi Senthil
Greenhorn

Joined: Apr 19, 2012
Posts: 1
Hi

We 're provider system for a web service. Here, the requirement is to match the response tags as per the consuming system.

We managed to build the response tag names, but we're struck in getting the hierarchy built.

For example,

We are sending something as follows:

<Resource>
<Employee>
<Technical>
<id>892387834</id>
<name>Name1</name>
</Technical>
<Employee>
<Contractor>
.....
</Contractor>
</Resource>

We use the @WebResult annotation and were able to get as follows:

<Resource>
<id>892387834</id>
<name>Name1</name>
</Resource>


I would like to know how I can set the tag names in the above to reflect the child nodes names <Employee> and <Contractor>

any inputs?

Thanks
Divi
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Setting the tag names for child nodes in web service response XML