Previous |
Next |
Use this function to invoke a SOAP style Web service with the supplied SOAP envelope returning the results in 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_username IN VARCHAR2 default null, p_password IN VARCHAR2 default null, p_proxy_override IN VARCHAR2 default null, p_wallet_path IN VARCHAR2 default null, p_wallet_pwd IN VARCHAR2 default null ) RETURN XMLTYPE;
Parameters
Table: MAKE_REQUEST Function Parameters describes the parameters available in the MAKE_REQUEST
function.
MAKE_REQUEST Function Parameters
Parameter | Description |
---|---|
|
The URL endpoint of the Web service. |
|
The SOAP Action corresponding to the operation to be invoked. |
|
The SOAP version, 1.1 or 1.2. The default is 1.1. |
|
The SOAP envelope to post to the service. |
|
The username if basic authentication is required for this service. |
|
The password if basic authentication is required for this service |
|
The proxy to use for the request. The proxy supplied overrides the proxy defined in the application attributes. |
|
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. |
|
The password to access the wallet. |
Example
The following example uses the make_request
function to invoke a SOAP style Web service that returns movie listings. The result is stored in an XMLTYPE.
declare l_envelope CLOB; l_xml XMLTYPE; 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>'; l_xml := 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_envelope => l_envelope ); END