How To Automate Web Services

by Jonathan Chan, in Ask an ASE, posted 6/28/12
image for article

Background

A Web Service is a piece of code that is made available on a machine that is connected to the Internet. The web part of a Web Service defines the method to which it is accessed; the service part relates to the idea of providing access to functionality without having to download or install anything.  Since it is run on the web, it can be accessed by any machine connected to the Internet and it. And because it is created with a standardized protocol, it can be accessed from any environment. Think of the relationship between user and Web Service as that of a service user and a service provider. When the user has need for specific information, it contacts the service provide for the information. All the user sees is the final result—they are not troubled by the details/process of obtaining the information. 

How To AutoMate Web Services

Click here to watch the How To video on automating Web Services.

Web Service for Business

So exactly what does this mean for a business? The benefits can be summed up in one word: Efficiency. In most companies there is duplication in functionality due to the various environments. For example, if you needed to retrieve a piece of information, the process of accessing it from your development team might be different than how the accounting or HR departments access it, Assuming this information can be accessed via a Web Service, you would only require a single access method, thus removing the need to develop and maintain three disparate systems doing the exact same thing. Web Services are also not limited to internal use. Many companies use Web Services to grant external customers access to internal functionality. This allows for further integration and expansion of market-based adoption.

A simple example of this would be FedEx. Millions of people use their Web services every day to easily access shipping, rates and tracking information. With the information returned from these Web Service calls, companies can send customized emails to their clients with specific shipping details. Without a Web Service, one would need to log into the FedEx website, manually enter the tracking number, pull down the return data, parse it and then finally email the customer. With the FedEx Web Service all the information is returned in formatted fashion that can go directly into emails. And this can be done on any system in any environment.

At this point you’re probably asking yourself, how do I find out if my business partners have this wonderful thing called Web Services? We would suggest starting with a quick search of vendors’ sites. Quick searches of FedEx/UPS/USPS reveal that they do indeed have Web Service support; however, other vendors do not make this information readily available on their websites. It is probably best to contact them directly and ask.

Web Service for AutoMate

Now that you have an understanding of Web Services, we’re going to show how AutoMate helps you leverage that functionality. The first thing we’re going to do is drag over a Web Service Action which brings up the following window:

Web Service

What is neat about AutoMate is that once you put in a WSDL URI path and click the “Go” button, it automatically evaluates that Web Service and fills in the information for you to select from a dropdown.

Web Service 2

Web Service 3

Note how the Type, Function Name and Arguments now all contain specific information. AutoMate generates this information based off the path you put in.

  • The Function name determines what the Web Service will do. In certain instances, there may be multiple options in terms of what you can retrieve.
  • The Arguments section is where you can pass in information. In this specific example, the Web Service returns the Longitude/Latitude information based off the zip code. So the Argument that you are giving the Web Service is the zip code.

Web Service 4

Now let’s say you want to store the results of your Web Service. This is done by putting a variable into the “Populate Variable with Return Value” field. And you’re done.

If you have any questions on this process, please see our How To video on Web Services.