Release 10.1A: OpenEdge Development:
Web Services

> ## Statements for accessing Web services

> Table C–2 lists the 4GL statements that are either valid only for accessing a Web service or have special application in Web service client programming. The remaining chapters explain how to use these 4GL elements.

> Table C–2: Statements to access Web services
> 4GL statement | Description
> --- | ---
>     CREATE SERVER server-handle
> | Creates a server object and stores a reference to it in the specified `HANDLE` variable. You can then bind (logically connect) the server object to a Web service using the server handle `CONNECT( )` method.
>     CREATE SOAP-HEADER
>     header-obj-handle
> | Creates a SOAP header object used to add a SOAP header to a pending SOAP request message generated by a 4GL Web service invocation.
>     CREATE SOAP-HEADER-ENTRYREF
>     soap-obj-handle
> | Creates a SOAP header-entryref object used to add SOAP header entries to an existing SOAP header.
>     DELETE OBJECT handle
> | Deletes certain objects, including server objects, procedure objects, SOAP header objects, SOAP header-entryref objects, and asynchronous request objects.
>     DELETE PROCEDURE
>     procedure-handle
> | Deletes the procedure object associated with a Web service.
>     FUNCTION operationName
>       [ RETURNS ] dataType
>       [ ( parameter
>         [ , parameter ] ... ) ]
>       IN hPortType .
> | Defines a user-defined function prototype to map a Web service operation as specified by the WSDL Analyzer, which determines the need for a function to return a value.
>     return = operationName
>       [ ( parameter
>         [ , parameter ] ... ) ] .
> | Invokes a Web service operation defined as a user-defined function, where `return` is a variable to receive the value of the operation `<return>` parameter element, `operationName` is the name of the operation as specified in the WSDL file and whose 4GL prototype is defined using the `FUNCTION` statement, and `parameter` is a 4GL function parameter as required by the WSDL file for the operation. The operation can also be invoked as part of any other 4GL statement that can invoke a user-defined function.
>     PROCESS EVENTS
> | Handles any pending `PROCEDURE-COMPLETE` events for asynchronous requests by triggering execution of the event procedures for all completed asynchronous requests. You can also use any blocking I/O statement, such as the `WAIT-FOR` statement, to handle these events.
>     RUN portTypeName
>       [ SET hPortType ] ON SERVER
>       server-handle [ NO-ERROR ] .
> | Creates and associates a procedure object with a Web service, where `portTypeName` is the name of a Web service port type as specified in the WSDL file and whose operations this procedure object encapsulates, `hPortType` is a `HANDLE` variable that is set to the handle of the created procedure object, and `server-handle` is a handle to the server object that binds the Web service.
>     RUN operationName IN hPortType
>       [ ASYNCHRONOUS
>         [ SET asyncRequestHandle ]
>         [ EVENT-PROCEDURE
>           eventInternalProcedure
>           [ IN procedureContext ] ]
>       [ ( parameter
>         [ , parameter ] ... ) ]
>       [ NO-ERROR ] .
> | Invokes a Web service operation that does not contain a `<return>` parameter element, where `operationName` is the name of a Web service operation specified in the WSDL file, `hPortType` is a handle to the procedure object that encapsulates the operation, and `parameter` is a 4GL procedure parameter as required by the WSDL for the operation. If the operation is invoked asynchronously, `asyncRequestHandle` is a handle that is set to the asynchronous request object created for the asynchronous request, `eventInternalProcedure` is the name of a 4GL internal procedure defined to handle the results of the asynchronous request, and `procedureContext` is a handle to an active 4GL procedure object that encapsulates the event internal procedure.
>     WAIT-FOR ...
> | Handles any pending `PROCEDURE-COMPLETE` events for asynchronous requests by forcing the event procedures for all completed asynchronous requests to execute. You can also use `PROCESS EVENTS` or any other blocking I/O statement, such as the `PROMPT-FOR` statement, to handle these events.

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