You can use a consumer proxy to do the following:
To call a service through the Integration Server
To call a Web service
How the server proxy is used depends on the runtime configuration.
To send a message, call the corresponding consumer proxy in your application program.
Note
You can select a consumer proxy in the Object Navigator and drag it to the editor using Drag&Drop.
Declare the following variables:
DATA:
* Reference variables for proxy and exception class
lo_clientProxy TYPE REF TO [generierte Proxy-Klasse],
lo_sys_exception TYPE REF TO cx_ai_system_fault,
* Structures to set and get message content
ls_request TYPE [Output-Message-Typ],
ls_response TYPE [Input-Message-Typ].
Complete the structure ls_request for the request message.
Instantiate your consumer proxy:
TRY.
create proxy client
CREATE OBJECT lo_consumerProxy
EXPORTING LOGICAL_PORT_NAME = 'LOGICAL_PORT_NAME'
Note
LOGICAL_PORT_NAME is the name of the logical port that you want to use> it is also used to define the receiver. You can omit this parameter if you are using a default port or the PI runtime (refer to Runtime Configuration).
To send a message, call the corresponding consumer proxy method. WSDL allows several such methods (specified by the element <operation>). In XI, there is only one method, with the default name EXECUTE_SYNCHRONOUS or EXECUTE_ASYNCHRONOUS. Catch at least the exception cx_ai_system_fault:
* do synchronous consumer proxy call
CALL METHOD lo_consumerProxy->execute_synchronous
EXPORTING output = ls_request
IMPORTING input = ls_response.
CATCH cx_ai_system_fault INTO lo_sys_exception.
* Error handling
ENDTRY.