aspose file tools*
The moose likes Web Services and the fly likes How to obtain more than one Response from a Web Service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to obtain more than one Response from a Web Service" Watch "How to obtain more than one Response from a Web Service" New topic
Author

How to obtain more than one Response from a Web Service

Gustavo Santos
Ranch Hand

Joined: Jan 22, 2009
Posts: 40
Hello Java Ranches,

My Web Service has 4 methods and I would like to know how to call these 4 methods and get its respective responses in the same XML that the Web Service provides, I'm currently using Axis2.

e.g.:

calling the method:

XML request for the Web Service:



XML response from the Web Service:



Does anybody know how to get more than one Response in the same XML from the Web Service? 'cause I need to send just one request saying the methods that I would like to get the response from.

Any help would be appreciated,

Many Thanks.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
The model is One request - One method - One response.

Maybe you need a new method that aggregates the other 4.

Bill
Chintan Rajyaguru
Ranch Hand

Joined: Aug 19, 2001
Posts: 341
William is correct. But I would like to expand on what he said.

Web service works in request/response style so when you invoke a method, it will send you the response of that method. If you must combine the responses you could write a proxy that will invoke 4 methods separately, intercept their responses and combine them.

Having said that, your design seems little bit awkward. Why would you want to combine the 4 responses in one XML? Are you sure you have designed your service correctly?


ChintanRajyaguru.com
SOADevelopment.com - Coming soon!
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Well, I guess it could be four original services that need to be combined in a new way by a web service broker (http://www.corej2eepatterns.com/Patterns2ndEd/WebServiceBroker.htm) of some kind?
Best regards!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to obtain more than one Response from a Web Service