Try OpenEdge Now
skip to main content
Web Services
Creating ABL Clients to Consume OpenEdge SOAP Web Services : Connecting to OpenEdge SOAP Web Services from ABL : Managing Web service bindings : Accessing a port type for a Web service
 
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:
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 hServer   AS HANDLE.
DEFINE VARIABLE hPortType AS HANDLE.
CREATE SERVER hServer.
lReturn = hServer:CONNECT("-WSDL http://wstraining.progress.com/wsa/wsa1/
                           wsdl?targetURI=urn:OpenEdgeServices:NewCoService
                           -Service NewCoServiceService
                           -Port NewCoServiceObj").
RUN NewCoServiceObj SET hPortType IN hServer.
You can now invoke and manage all of the operations in the port type, NewCoServiceObj, defined for the Web service, NewCoServiceService. For more information on using procedure handles to invoke Web service operations, see Invoking operations.