Release 10.1A: OpenEdge Development:
Web Services

> ## Accessing multiple port types simultaneously

> If you want to maintain access to two or more port types at the same time (for the same or a different Web service), you must create and bind the Web service to a separate server object handle for each port type that you want to access. Then create and map a separate procedure object handle to each port type.

> This example binds two Web services (`WeatherService` and `SailingService`) in order to access three port types (`TemperaturePortType`, `WindPortType`, and `RentalPortType`) at the same time:

> Accessing multiple port types simultaneously
>     DEFINE VARIABLE hWebServiceTempPT AS HANDLE.
>     DEFINE VARIABLE hWebServiceWindPT AS HANDLE.
>     DEFINE VARIABLE hWebServiceSchedulePT AS HANDLE.
>     CREATE SERVER hWebServiceTempPT.
>     CREATE SERVER hWebServiceWindPT.
>     CREATE SERVER hWebServiceSchedulePT.
>     hWebServiceTempPT:CONNECT( "-WSDL http://.../WorldWeather.wsdl"
>                                 -Service WeatherService
>                                 -Port TemperaturePort").
>     hWebServiceWindPT:CONNECT( "-WSDL http://.../WorldWeather.wsdl"
>                                 -Service WeatherService
>                                 -Port WindPort").
>     hWebServiceSchedulePT:CONNECT( "-WSDL http://.../SailingSchedule.wsdl"
>                                 -Service SailingService
>                                 -Port RentalPort").
>     DEFINE VARIABLE hTempPT AS HANDLE.
>     DEFINE VARIABLE hWindPT AS HANDLE.
>     DEFINE VARIABLE hRentalPT AS HANDLE.
>     RUN TemperaturePortType SET hTempPT IN hWebServiceTempPT
>     RUN WindPortType SET hWindPT IN hWebServiceWindPT
>     RUN RentalPortType SET hRentalPT IN hWebServiceSchedulePT
>     .
>     .
>     .

> Note: The abbreviated URLs for the Web services in this example are completely fictitious, and any resemblance to actual public Web services is coincidental.

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