In
Powerbuilder 12.5, WebServices can be used either using the new Web Servicesdatasource or by Web Service Proxy wizard.
The
below step by step approach is for consuming a web service through datawindow
web service. The Web Service used in http://www.webservicex.net/stockquote.asmx?WSDL
Step
1. Click New
Step
2. Navigate to Datawindow tab
Step
3. Select Web Service. Click Next button.
Step
4. Provide the WSDL file name (http://www.webservicex.net/stockquote.asmx?WSDL).
Assembly name is optional.
Step
5. The web service list is displayed. We have only 1 web service linked to WSDL
file.
Step
6. Functions associated with the web service will display. These functions are
defined in the web service and are used in powerscript to get data from the web
service.
Step
7. Select the RET parameter. Once we hit Finish, the datawindow looks like this
Step
8. Select the setting for your datawindow and click finish
Save the datwindow
To test the data retrieval,
right click in Datawindow Preview mode and select Retrieve
.
Provide the value. I have used T as
symbol. T stands for AT & T. You can test using the list available at
http://en.wikipedia.org/wiki/Companies_listed_on_the_New_York_Stock_Exchange
The data is being returned as XML.
No comments:
Post a Comment