35.8 MAKE_REQUEST Procedure

Use this procedure to invoke a SOAP style Web service with the supplied SOAP envelope and store 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

Table 35-3 describes the parameters available in the MAKE_REQUEST procedure.

Table 35-3 MAKE_REQUEST Procedure 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) or 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, file:/usr/home/oracle/WALLETS. 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

The following example uses the make_request procedure to retrieve a list of movies from a SOAP style Web service. The response is stored in an Application Express 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;