Release 10.1A: OpenEdge Development:
Web Services

> ## Accessing a port type for a Web service

> While the Web service is bound to a server object, you can create and map a procedure object to the port type supported by the binding in order to invoke its Web service operations using this syntax:

> Syntax
>     RUN portTypeName [ SET hPortType ] ON SERVER hWebService .

> As a result of executing a `RUN` statement using this syntax, you can access operations defined by the specified port type (`portTypeName`) in the Web service mapped to the server object handle, `hWebService`. You can invoke these operations by executing them as procedures or user-defined functions on the procedure object handle, `hPortType`, which is now mapped to the port type, `portTypeName`.

> The `RUN` statement accomplishes this mapping by creating a procedure object for the port type and attaching it to the specified procedure object handle:

> Accessing a port type for a Web service
>     DEFINE VARIABLE hWeatherSrv AS HANDLE.
>     DEFINE VARIABLE hTempPT AS HANDLE.
>     CREATE SERVER hWebService.
>     hWeatherSrv:CONNECT("-WSDL http://.../WorldWeather.wsdl
>                          -Service WeatherService
>                          -Port TemperaturePort").
>     RUN TemperaturePortType SET hTempPT IN hWeatherSrv.

> Note: The abbreviated URL for the Web service in this example is completely fictitious, and any resemblance to an actual public Web service is coincidental.

> You can now invoke and manage all of the operations in the port type, `TemperaturePortType`, defined for the Web service, `WeatherService`. For more information on using procedure handles to invoke Web service operations, see Chapter 10, " Invoking Web Service Operations from the Progress 4GL."

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095