Accessing a Web service is very similar to visiting a Web page containing parameters in the URL or submitting a form on a Web page. An HTTP request gets sent to a URL via an HTTP GET or POST along with a set of arguments in the form of name/value pairs. In PowerBuilder there are three options available for performing this type of operation: the GetURL/PostURL functions, using Microsoft's XmlHttp object via OLE, and using the Web Service Proxy object. Demonstration Application to Call Amazon.com Web Services
In this article we will create a demonstration application that interacts with the Amazon.com E-Commerce Web Service (http://aws.amazon.com). Our application will use this service to search through one of their product indexes for items matching our search criteria. To use the Amazon.com Web service you will need to sign up for an access key through their site. The code samples will show where your key should be placed with the indicator "[YourAccessKey]".
By looking at the documentation for the Amazon E-commerce Web service, we can see that to perform an item search operation a minimal set of arguments is required. There are many additional arguments that may be used when performing searches, but we will be using the subset listed below. (Browse the Amazon.com Web service documentation to see the full range of search arguments and operations available.)