59.15 MAKE_REQUEST Procedure Signature 1
This procedure invokes a SOAP-style Web service with the supplied SOAP envelope and stores the results 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_username IN VARCHAR2 DEFAULT NULL,
p_password IN VARCHAR2 DEFAULT NULL,
p_scheme IN VARCHAR2 DEFAULT 'Basic',
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 to be 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_username |
The username if basic authentication is required for this service. |
p_password |
The password if basic authentication is required for this service |
p_scheme |
The authentication scheme. Basic (default), AWS, or Digest if supported by your database release. |
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 file system path to a wallet if the URL endpoint is HTTPS. For example, The wallet path provided overrides the wallet defined in the instance settings. |
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 1
The following example retrieves a list of movies from a SOAP-style Web service. The response is stored in an Oracle APEX collection named MOVIE_LISTINGS
.
DECLARE
l_envelope CLOB;
BEGIN
l_envelope := '<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://www.ignyte.com/whatsshowing"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<tns:GetTheatersAndMovies>
<tns:zipCode>43221</tns:zipCode>
<tns:radius>5</tns:radius>
</tns:GetTheatersAndMovies>
</soap:Body>
</soap:Envelope>';
apex_web_service.make_request(
p_url => ' http://www.ignyte.com/webservices/ignyte.whatsshowing.webservice/moviefunctions.asmx',
p_action => ' http://www.ignyte.com/whatsshowing/GetTheatersAndMovies',
p_collection_name => 'MOVIE_LISTINGS',
p_envelope => l_envelope
);
END;
Example 2
This 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}' );
END;
Parent topic: APEX_WEB_SERVICE