aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Response xml in Apache CXF using JAX-RS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Response xml in Apache CXF using JAX-RS" Watch "Response xml in Apache CXF using JAX-RS" New topic
Author

Response xml in Apache CXF using JAX-RS

sachin kataria
Ranch Hand

Joined: Mar 27, 2006
Posts: 45
Hi,

I am using JAX-RS (Restful Service) in Apache CXF to create my application. Xml is going back in Response. So, it is as below :

<Customer>
<id>123</id>
<name>abc</abc>
<phone>123</phone>
</Customer>

So, for this response i have created bean class :

@XmlRootElement(name = "Customer")
public class Customer {
}

I want to customize above xml. So, how i can do that ? It is like as :

<Customer id="123">
<name>abc</name>
<phone>123<phone>
</Cusomer>

In short, i want I want to add attribute. So, how i can do that ?

Pls help me..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Response xml in Apache CXF using JAX-RS