Defining Responses for RA Web Service SOAP Agent Jobs

You can define HTTP and/or SOAP response headers, extract data from a SOAP XML responses by defining parsings, and define response attachments.

Defining HTTP and/or SOAP Response Headers

The Headers available on the Request and Response pages differ depending whether the Use Native mode box is unchecked in the Agent definition.

  • When Use Native mode is checked, only HTTP Request Headers are available, because the header is part of the envelope.
  • When Use Native mode is not checked, both HTTP Request Headers and SOAP Headers are available.

You can define a Response Header to extract a value from the headers returned rather than from the response content. For example, you may have a call that returns a token value in a response header that you want to extract to use in subsequent Jobs.

Working in the HTTP and SOAP Headers Tables

To add a row to the table, click Add Row in the appropriate section. Click the cells in the table to edit their values

HTTP and SOAP Headers Column Descriptions

Column Description

Header Name

The HTTP or SOAP header name.

Output Type

Enter an output type in the Output Type field. Available options are:
  • Save as Variable: A variable with the name you specify in the Output Name field is saved to the database.
  • For Automation Engine v9/10, if the size is:

    • Less than 1024 bytes, the value is included in the database.
    • Greater than 1024 bytes, the value is written to <Agent>/bin/variableFileDirectory.

    An Automation Engine scripting language variable's name is limited to 32 alphanumeric characters, including the special characters "$", "_", "@", "§" and "#". German Umlauts are not allowed. The first character must not be a number.

  • Write to Job Report: Writes the resulting value to the Job's report log based on the name you specified in the Output Name field.
  • Save as Report: Saves the resulting value to a report in the <Agent>/bin/task_reports directory based on the name you specified in the Output Name field. The file will be registered with the Automation Engine and viewable from the UserInterface. When this option is used, the Web Service Agent expects a parameter value of just a stand-alone file name. If you enter a file name with fully qualified path, the Job will get an error like the following:
  • java.io.FileNotFoundException: task_reports/u01/users/qa4/v9/RA_WS_Alpha/test3.txt (No such file or directory)

  • Write to File: Writes the resulting value to a file in the Agent's file system. You can enter either a stand-alone file name to write to the <Agent>/bin/task_reports directory on the Agent's file system or a file name with fully qualified path to a different location on Agent's file system. The file will not be registered with the Automation Engine and is not viewable from the user interface.

Output Name

The output name.

Defining Response Parsings and Attachments for RA Web Service SOAP Agent Jobs

You can create a response parsing query to extract values from the response. Additionally, you can define response attachments.

Working in the Response Parsing and Attachments Tables

To: Do this:
Add a row to the table

Click Add Rowin the appropriate section. Click the cells in the table to edit their values.

Edit a row in the table

Click the cell in the table and edit its value.

Delete one of more rows to the table

Check the checkbox for the row(s) and click Remove.

Delete all rows to the table

Check the checkbox column header and click Remove.

Response Parsing Column Descriptions

Column: Description:
Parsing Type Enter a type in the Parsing Type field The options are:
  • XPath
  • XQuery
  • Groovy
  • Warning! The Groovy option allows you to harness the power of Java and Groovy to parse the response. Because it makes all the Java/Groovy methods available, it can be a security concern and is therefore turned off by default. Groovy parsing is only done when the Allow Groovy parsings of response data box on the Settings section of the Web Service page of the Agent is checked. If you need to define Groovy parsings, consult your Automation Engine Administrator.

Output Type Enter an output type in the Output Type field. Available options are:
  • Save as Variable: A variable with the name you specify in the Output Name field is saved to the database.
  • For Automation Engine v9/10, if the size is:

    • Less than 1024 bytes, the value is included in the database.
    • Greater than 1024 bytes, the value is written to <Agent>/bin/variableFileDirectory.

    An Automation Engine scripting language variable's name is limited to 32 alphanumeric characters, including the special characters "$", "_", "@", "§" and "#". German Umlauts are not allowed. The first character must not be a number.

  • Write to Job Report: Writes the resulting value to the Job's report log based on the name you specified in the Output Name field.
  • Save as Report: Saves the resulting value to a report in the <Agent>/bin/task_reports directory based on the name you specified in the Output Name field. The file will be registered with the Automation Engine and viewable from the UserInterface. When this option is used, the Web Service Agent expects a parameter value of just a stand-alone file name. If you enter a file name with fully qualified path, the Job will get an error like the following:
  • java.io.FileNotFoundException: task_reports/u01/users/qa4/v9/RA_WS_Alpha/test3.txt (No such file or directory)

  • Write to File: Writes the resulting value to a file in the Agent's file system. You can enter either a stand-alone file name to write to the <Agent>/bin/task_reports directory on the Agent's file system or a file name with fully qualified path to a different location on Agent's file system. The file will not be registered with the Automation Engine and is not viewable from the user interface.
Output Name The output name.
Expression

With XPath and XQuery types, you can enter a value in the Input box by doing one of the following:

  • To create an expression and replace what's in the Expression box, right-click a value and pick Create Expression and Replace.
  • To add it at the cursor location in the Expression box, select a value and click the Create Expression box or right-click a value and pick Create Expression and Insert.
Use Array When this checkbox is checked, the results are saved to an Automation Engine Array variable, where each value can be referenced numerically. For example: &VAR[1], &VAR[2], etc. If the Save as Variable checkbox is not selected, the whole result is returned as one variable.

Response Attachments Descriptions

If the Agent detects attachment references (data types base64Binary, hexBinary or swaRef) in the response definition, this table will be pre-populated when the operation is selected.

You can add additional rows if the response includes a list of attachments or if you want to handle response attachments which have no reference in the response XML (SWA attachments).

Instead of specifying a file path and name in the table, you can alternately add the attachment directly to the request XML, but you must encode it correctly (e.g. base64 encoded for an element of type base64Binary).

An attachment is referenced by the "Content ID" that you must know before defining the request.

In CXF mode, the attachments has been linked to XML node name which was related to the Content-ID with same name, like "Data". The problem was that the attachments has been processed sequentially, regarding of the name - vs. Content-ID.

Column: Description:
Output Type Enter an output type in the Output Type field. Available options are:
  • Save as Variable: A variable with the name you specify in the Output Name field is saved to the database.
  • For Automation Engine v9/10, if the size is:

    • Less than 1024 bytes, the value is included in the database.
    • Greater than 1024 bytes, the value is written to <Agent>/bin/variableFileDirectory.

    An Automation Engine scripting language variable's name is limited to 32 alphanumeric characters, including the special characters "$", "_", "@", "§" and "#". German Umlauts are not allowed. The first character must not be a number.

  • Write to Job Report: Writes the resulting value to the Job's report log based on the name you specified in the Output Name field.
  • Save as Report: Saves the resulting value to a report in the <Agent>/bin/task_reports directory based on the name you specified in the Output Name field. The file will be registered with the Automation Engine and viewable from the UserInterface. When this option is used, the Web Service Agent expects a parameter value of just a stand-alone file name. If you enter a file name with fully qualified path, the Job will get an error like the following:
  • java.io.FileNotFoundException: task_reports/u01/users/qa4/v9/RA_WS_Alpha/test3.txt (No such file or directory)

  • Write to File: Writes the resulting value to a file in the Agent's file system. You can enter either a stand-alone file name to write to the <Agent>/bin/task_reports directory on the Agent's file system or a file name with fully qualified path to a different location on Agent's file system. The file will not be registered with the Automation Engine and is not viewable from the user interface.
Output Name The output name.
Content ID Either the tag name in the XML or the SWA attachment ID