59.14 MAKE_REQUEST Function Signature 2
This function invokes a Web service with the supplied SOAP envelope and returns the response as an XMLTYPE.
Syntax
APEX_WEB_SERVICE.MAKE_REQUEST (
p_url IN VARCHAR2,
p_action IN VARCHAR2 DEFAULT NULL,
p_version IN VARCHAR2 DEFAULT '1.1',
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 )
RETURN sys.xmltype;
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_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 |
The URL to retrieve the token from for token-based authentication flows (such as OAuth2). |
p_proxy_override |
The proxy to use for the request. The proxy supplied overrides the proxy defined in the application attributes. |
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. |
Returns
The SOAP service response as an XMLTYPE.
Example
The following example invokes a SOAP service returning an XMLTYPE.
DECLARE
l_xml sys.xmltype;
BEGIN
l_xml := apex_web_service.make_request(
p_url => 'http://{host}:{port}/path/to/soap/service/',
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;
Parent topic: APEX_WEB_SERVICE