Data Services Oracle Fusion Middleware Online Documentation Library

15-6 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator SOAP Editor The SOAP Editor allows you to graphically build the XML request for the web service and display the response. If creating an OdiInvokeWebService step, this SOAP request filled in the SOAP editor is saved with the step. The left part of the editor shows the structure of the request, the right part shows the structure of the response. This arrangement can be changed clicking Switch Panel Position . The request is displayed either in a hierarchical editor view SOAP Editor tab, or in XML format Source tab. When using the SOAP Editor tab, it is only possible to edit the body of the SOAP envelope. To edit or view the whole envelope, including the SOAP headers, you must use the Source tab. In the Editor, you can fill in the value and optionally the attributes for each element of your request. Optional elements are displayed in italic. Repeatable elements are labelled with ...n after the name. Right-click any element to perform one of the following operations, if possible: ■ Duplicate content - copies the structure and content of the element. ■ Duplicate structure - copies the structure but leaves all fields blank. ■ Delete - deletes the element. ■ Export Request - exports the entire soap request to an XML file. Results This part of the interface appears only when using an OdiInvokeWebService tool step in a package, to control how the response is written to a XML file. Figure 15–3 Result Section for the OdiInvokeWebService tool This image shows the additional parameters that are displayed when an OdiInvokeWebService tool step is used in a package. ■ File Mode -RESPONSE_MODE: One of NEW_FILE, FILE_APPEND, NO_FILE ■ Result File -RESPONSE_FILE: The name of the result file to write. ■ Result File Format -RESPONSE_FILE_FORMAT: The format of the web service response file. Possible values are XML default and SOAP. WARNING: An empty element is passed as is to the Web service. For strings, this corresponds to an empty string. For numbers or date types, this may cause an error. If you want to send a null string, number or date, it is recommended to use the nil=trueattribute. To remove empty elements, click Remove blank optional elements in the Advanced editor toolbar. Working with Web Services in Oracle Data Integrator 15-7 ■ XML Charset -RESPONSE_XML_ENCODING: The name of the character encoding to write into the XML file. ■ Java Charset -RESPONSE_FILE_CHARSET: The name of the character encoding used when writing the file. Refer to Section A.5.22, OdiInvokeWebService for more information on these parameters.

15.4.3 Web Service Invocation in Integration Flows

Calling a Web Service using the OdiInvokeWebService tool To call a Web Service:

1. Create an OdiInvokeWebService tool step in a package, or right-click a datastore

and select Test Web Service in the contextual menu. 2. Fill in the location of the WSDL. You can use either: ■ A URL for a WSDL that has been deployed to a server for example: http:host:8080servicesWSCustomer?wsdl ■ A local file location for example: c:DataServicesWSCustomer.wsdl

3. Choose a Port, if more than one is available.

4. Choose an Operation from the list on the left.

5. In the SOAP Editor, enter the web service payload. The OdiInvokeWebService tool

supports two web service request formats: the XML body of the SOAP request only or the full-formed SOAP envelope, including the SOAP header and body.

6. Optional Click Remove blank optional elements to delete optional request

parameters which have not been specified. Some Web Services treat blank elements as invalid.

7. Click Invoke Web Service to immediately invoke the Web Service. The response is

shown in right pane of the SOAP Editor. 8. If you are creating an OdiInvokeWebService tool step, define the response file parameters. Note: The result file parameters are only taken into account at run-time. No result file is generated when clicking Invoke Web Service . Note: Input format request and output format response are independant. Oracle Data Integrator recognizes the input message format automatically and writes the response according to the RESPONSE_FILE_FORMAT default is XML. However, in the Advanced editor the request file format determines the response file format. If you test the invocation using a XML payload message, the response will be XML payload. If you test using a full-formed SOAP message, the response will be a full-formed SOAP message. How to generate a web service request file with Oracle Data Integrator is covered in Generating the Request File .