Common Web Services Workflow
While all Web Services follow the same standards, they all do different things. They wouldn't be worth anything if you didn't get the information you need, or if they contained a lot of excess data. If you are unfamiliar with a particular Web Service, there are a few things that you can do to figure out what data is available and how to get it.
- Identify a Web Service that you will be using.
- Write a script to pull the WSDL from the Web Service.
- From the WSDL, identify the functions you want to use and what arguments it expects.
- Write a script to use that function and return your values.
- Parse the results and use them. This can be for display, saving to a database, or anything else you need.
Note: web services sometimes take a lot of time to return results, especially the first time they are called. If you put your Web Services script in a button, the client will freeze until the call is complete (this is because the event handlers are run on the GUI thread). It's a good idea to use system.util.invokeAsynchronous() or add a waiting image to your screen to let the user know Ignition is working as expected.
See Overview & Simple Arguments to get started.