This week's book giveaway is in the Object Relational Mapping forum.
We're giving away four copies of Pro JPA 2: Mastering the Java Persistence API and have Mike Keith and Merrick Schincariol on-line!
See this thread for details.
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Web Services
 
RSS feed
 
New topic
Author

Need to return a ValueObject from a Service .

Ravi Kiran V
Ranch Hand

Joined: Apr 18, 2009
Messages: 1186

Hi

I am writing a web service which basically accepts a ConsumerId , and in turn i am returning the Consumer Details in the form of an COnsumerVO with the data set on to it .

Please tel me what is the appropaite way of returning this ConsumerVO .

Please share your ideas .


I tried to change the world, but I couldn’t find the source code
somia razzaq
Greenhorn

Joined: Jan 26, 2010
Messages: 22

Ravi Kiran V wrote:Hi

I am writing a web service which basically accepts a ConsumerId , and in turn i am returning the Consumer Details in the form of an COnsumerVO with the data set on to it .

Please tel me what is the appropaite way of returning this ConsumerVO .

Please share your ideas .



Hi
You have declared ConsumerVO as a "complex type" in schema of your web service. In output operation of web service, you choose this complex type. Then the return type of your web service will be an object.

Hope this will be the solution of your problem.

Best Wishes
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Web Services
 
RSS feed
 
New topic
replay challenge