I am new to webmethods and doing a POC on it. We wil be using API enpoints to connect to the datasource and retrive the forecast data for particular chemical product with series_id so and so. Now i have implemented the flow with 26 pub.http:client with url specified but i need to make the code more optimised by putting the series_id in a document and reading it through url and add a loop to it so as to iterate through all 26 series_id and also put the token in one file so in future if token changes we can make changes to one particular file instead of whole 26 api’s. Kindly help me with the clear solution.
if your series_ID is going to be constant try using the global variable or read through from config files.
Ex you can consider your series ID values as below.
GLBVariable : token,seriesID1,seriesID2 and so on…
Use the split service to extract your token and map to a variable which you can be used later while invoking the resource with series_ID. You can iterate with the size of the series_ID list which you got as output from the split service and call HTTP post-call dynamically
Check for the tokenize service in the Wmpublic in Built-In service reference.
Note: Tokenize does not recommend to use if your list is huge. In those case try with native java split service
there should be some regex services somewhere and one of them should be a split service.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.