call to web service multiple times

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

call to web service multiple times

srikanth.prodigy

Hello All,

 

I am trying to call web service in xpl multiple times   based on instance value

<users>

<id>1</id>

<id>2</id>

<id>3</id>

<users>

 

In the above example the web service should be called 3 times and each time id should be sent as parameter to the call

 

How can we achieve this in xforms?

 

Thanks,

Srikanth A



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: call to web service multiple times

Alessandro Vernet
Administrator
Srikanth

srikanth.prodigy wrote
I am trying to call web service in xpl multiple times   based on instance
value

<users>

<id>1</id>

<id>2</id>

<id>3</id>

<users>

In the above example the web service should be called 3 times and each time
id should be sent as parameter to the call

How can we achieve this in xforms?
Interesting question. First, I'd write the code to call the web service once. You can look at the code in web-service-weather.xhtml to see how to do that with an <xforms:submission>.

To run this 3 times, you'll have to run it a first time with the first argument, and on xforms-submit-done (event handler you put inside the <xforms:submission>), setup the parameters for the second call and run the submission again. And again for the 3rd time call. The same code handling xforms-submit-done will called every time, so you'll need to have some logic there to figure out in which case you are (response for the 1st, 2nd, or 3rd time just arrived).

Alex

Alex