Sample of consuming a SOAP Web service
- Last Updated: June 6, 2022
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
One of the operations available from NewCo Web service enables you to get the customer name for a given customer number. The Progress eLearning Community Web page includes a link to a program, InvokeValideCustomer.w, that uses that operation:

The following excerpts from InvokeValideCustomer illustrate how to consume a Web service from ABL. In the main block, the application first creates a server and connects to the Web service by specifying the location of the WSDL file for run-time access and the name of a port type (persistent procedure) on the server:
|
-Port when the WSDL file contains
more than one valid service and port. For information on the full range of binding options
for Web services, see Connecting to OpenEdge SOAP Web Services from ABL.If the server connects successfully, the application uses the RUN
statement syntax to create the Web service proxy procedure object and map it to the port
type (NewCoServiceObj) that defines the ValidateCustomer operation for the Web service:
|
When you click Enter, the application invokes the
ValidateCustomer operation, passing in the value in the customer number
field and displaying the return value in the customer name field:
|
For more information on mapping Web service port types and invoking operations on them, see Invoking OpenEdge SOAP Web Service Operations from ABL.
When you click Done, the application deletes the
hPortType procedure object, unbinds the Web service from the server, and
then deletes the server object:
|
For more information on managing Web service bindings, see Connecting to OpenEdge SOAP Web Services from ABL.
This sample shows the similarity between basic AppServer and Web service access using synchronous interaction with the client. Another common feature between client interaction with an AppServer and client interaction with a Web service is the ability to invoke procedures asynchronously. For information on when and what you need to do to invoke Web service requests asynchronously, see Managing asynchronous requests.