OdiInvokeWebService -URL=<url> -PORT=<port> -OPERATION=<operation> [-REQUEST_FILE=<file>] [-RESPONSE_MODE=<NO_FILE|NEW_FILE|APPEND>] [-RESPONSE_FILE=<file>] [-RESPONSE_XML_ENCODING=<xmlEncoding>] [-RESPONSE_FILE_CHARSET=<javaCharset>] [-HTTP_USER=<user>] [-HTTP_PASS=<password>] [-TIMEOUT=<timeout>]
[<xmlRequest>]
Invokes a web service using the HTTP protocol and writes the returned response to an XML file.
This tool invokes a specific operation on a port of a web service whose description file (WSDL) URL is provided.
If this operation requires a SOAP request, it is provided either in a request file, or directly written out in the tool call (XMLRequest). The response of the web service request is written to an XML file that can be used in Oracle Data Integrator.
Note: This Tool replaces OdiExecuteWebService.
Note: This Tool supports both HTTP and HTTPS protocols.
Parameters |
Mandatory |
Description |
---|---|---|
-URL=<url> |
Yes |
URL of the Web Service Description File (WSDL) file describing the web service. |
-PORT=<port> |
Yes |
Name of a web service port to use. |
-OPERATION=<operation> |
Yes |
Name of the web service operation to invoke. |
-REQUEST_FILE=<file> |
No |
Location of the XML file containing the request message in SOAP (Simple Object Access Protocol) format. The request can be directly written out in the tool call (<xmlRequest>). |
-RESPONSE_MODE=<NO_FILE|NEW_FILE|APPEND> |
No |
Generation mode for the response file. This parameter takes the following values:
|
-RESPONSE_FILE=<file> |
Depends |
The name of the result file to write. Mandatory if -RESPONSE_MODE is not NO_FILE. |
-RESPONSE_FILE_CHARSET=<javaCharset>
|
Depends |
Response file character encoding. See the table below. Mandatory if -RESPONSE_MODE is not NO_FILE. |
-RESPONSE_XML_ENCODING=<xmlEncoding> |
Depends |
Character encoding that will be indicated in the XML declaration header of the response file. See the table below. Mandatory if -RESPONSE_MODE is not NO_FILE. |
-HTTP_USER=<user> |
No |
User account authenticating on the HTTP server. |
-HTTP_PASS=<password> |
No |
Password of the HTTP user. |
-TIMEOUT=<timeout> |
No |
The web service request waits for a reply for this time before considering that the server will not provide a response and an error is produced. If no value is given, there is no timeout. |
<xmlRequest> |
Yes |
Request message in SOAP (Simple Object Access Protocol) format. This message should be provided on the line immediately following the OdiInvokeWebService call. |
The following table lists some of the most common XML/Java character encoding schemes. A more complete list is available at http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
XML Charset |
Java Charset |
---|---|
US-ASCII |
ASCII |
UTF-8 |
UTF8 |
UTF-16 |
UTF-16 |
ISO-8859-1 |
ISO8859_1 |
The following web service call returns the capital city for a given country (the ISO country code is sent in the request). Note that the request and response format, as well as the port and operations available, are defined in the WSDL passed in the URL parameter.
OdiInvokeWebService -URL=http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL -PORT_TYPE=CountryInfoServiceSoapType -OPERATION=CapitalCity -RESPONSE_MODE=NEW_FILE -RESPONSE_XML_ENCODING=ISO-8859-1 "-RESPONSE_FILE=/temp/result.xml" -RESPONSE_FILE_CHARSET=ISO8859_1
<CapitalCityRequest>
<sCountryISOCode>US</sCountryISOCode>
</CapitalCityRequest>
The generated /temp/result.xml file contains the following:
<CapitalCityResponse>
<m:CapitalCityResponse>
<m:CapitalCityResult>Washington</m:CapitalCityResult>
</m:CapitalCityResponse>
</CapitalCityResponse>
Oracle Data Integrator provides a special graphical interface for calling OdiInvokeWebService in packages. See Invoking Web Services for more information.