I am calling a web service that returns results in a JSON string that looks like this:
[{"server":"https:\/\/www.domain1.com\/"},{"server":"https:\/\/www.domain2.com\/"},{"server":"https:\/\/www.domain3.com\/"}]
Although that example has three items in it, the web service could return anywhere from 1 to 10.
What I ultimately need is to read each returned result and subsequently call another web service located at the server indicated from the result. That subsequent web service call will indicate whether I need to continue on in the list or be finished.
So for instance, assuming I was originally returned the JSON shown above, I would then need to;
Call another web service located at "http://www.domain1.com/WebServices/myWebService.asmx?WSDL". That web service call would return a TRUE or FALSE.
-
Determine what to do based on result;
If all servers returned FALSE display a message "Blah Blah Blah...".
Store server name for later use in the Business Space
So, any ideas on how I can accomplish this?
Also, to call the initial Web Service that returned the list of servers I had to create an intelligent Object that after I then did a Discover on, built out all the Param and Reply objects for each function in the web service. Because each server I'm going to call has the EXACT same myWebService.asmx file, how can I build an Aware IM Object that is dynamic?
Basically, I want to be able to adjust the SOAP Channel Settings URL to be "http://www.SERVER_GOES_HERE.com/WebServices/myWebService.asmx?WSDL" based on what is returned from the first web service call.
Otherwise, I will have to add an object for myWebService.asmx for each server possible. If I add another server I would then have to come back into my Business Space, build another object and re-publish. Not to mention that with 10 servers each time I do a Discover on the myWebService.asmx for each server, and assuming that myWebService.asmx has 100 functions in it, I would then have 2000 new Param and Reply objects created in my business space.
TIA,
Keith