58.16 MAKE_REQUEST Procedure Signature 2

This procedure invokes a Web service with the supplied SOAP envelope and stores the response in a collection.

Syntax

APEX_WEB_SERVICE.MAKE_REQUEST (
    p_url                  IN VARCHAR2,
    p_action               IN VARCHAR2 DEFAULT NULL,
    p_version              IN VARCHAR2 DEFAULT '1.1',
    p_collection_name      IN VARCHAR2 DEFAULT NULL,
    p_envelope             IN CLOB,
    --
    p_credential_static_id IN VARCHAR2,
    p_token_url            IN VARCHAR2 DEFAULT NULL,
    --
    p_proxy_override       IN VARCHAR2 DEFAULT NULL,
    p_transfer_timeout     IN NUMBER   DEFAULT 180,
    p_wallet_path          IN VARCHAR2 DEFAULT NULL,
    p_wallet_pwd           IN VARCHAR2 DEFAULT NULL,
    p_https_host           IN VARCHAR2 DEFAULT NULL )

Parameters

Parameter Description
p_url The URL endpoint of the Web service.
p_action The SOAP Action corresponding to the operation invoked.
p_version The SOAP version (1.1 or 1.2). The default is 1.1.
p_collection_name The name of the collection to store the response.
p_envelope The SOAP envelope to post to the service.
p_credential_static_id The name of the Web Credentials to be used. Web Credentials are configured in Workspace Utilities.
p_token_url For token-based authentication flows, the URL where to get the token from.
p_proxy_override The proxy to use for the request.
p_transfer_timeout The amount of time in seconds to wait for a response.
p_wallet_path The filesystem path to a wallet if request is HTTPS. For example, file:/usr/home/oracle/WALLETS
p_wallet_pwd The password to access the wallet.
p_https_host The host name to be matched against the common name (CN) of the remote server's certificate for an HTTPS request.

Example

The following example invokes a SOAP service and stores the response in a collection.

BEGIN
    apex_web_service.make_request(
        p_url                  => 'http://{host}:{port}/path/to/soap/service/',
        p_collection_name      => 'MY_RESPONSE_COLLECTION',
        p_action               => 'doSoapRequest',
        p_envelope             => '{SOAP envelope in XML format}',
        p_credential_static_id => 'My_Credentials',
        p_token_url            => 'http://{host}:{port}/ords/scott/oauth/token' );
END;