Before getting started, you'll need the following from Engineered Software:
- A user name and password created specifically for your application
- The catalog ID's for all catalogs you'd like to access from your service client. (Please note that each catalog ID must be explicitly associated with your user name and password. Unassociated ID's will return an error.)
PUMP-FLO Web Services is actually a collection of three SOAP services. In a typical pump selection they are called in the following order.
- fluid.svc - Use the set_table_fluid or the set_custom_fluid method to create a new fluid entity and get back its ID.
- selection_list.svc - Pass your fluid ID, catalog ID, and any optional criteria to the search method to generate a selection list. Then, using the returned list ID, use the get_list method to retrieve its contents. There are additional methods for adding or removing pumps, etc.
- pumps_v2.svc - Call this service to retrieve the data for a particular pump in your list, change its characteristics, retrieve a graph image, etc.
HTML views of the WSDL files for each service may be obtained by appending ?wsdl or ?singleWsdl to the end of the address. It is generally not necessary to append these strings to a SOAP client when associating a service reference.
Each service has two valid endpoints, /cub and /x509. These are generally discovered automatically by SOAP client software. x509 is the preferred, encrypted endpoint. CUB may be used in circumstances where x509 proves problematic, but users should be aware that communication between the client and the server remains unencrypted. In the future we will likely move to a plain text over SSL transport in order to eliminate this weakness while still providing secure communications.
The workflow for basic pump selection is as follows:
- Gather selection criteria. This includes creating a fluid object to pass to the pump selector.
- Call search() to create a selection list on the PUMP-FLO server.
- Pass the selection list id created by search() to the get_list() method to retrieve the list of pumps.
- Select a pump from the list and pass its PumpStateID to get_pump() to retrieve the pump's data and to graph() to retrieve the curve image.
In pseudo code, the above would look something like:
You can also use the add_pump() function to do a manual pump selection.