Creating Request Messages and Calling REST Web Services

Creating Request Messages

Steps

  1. Either click Request Generator in the Web Service(REST) component, or select Web Service - Request Settings.
    The Request Generator dialog box is displayed.
  2. Enter the URL of the REST Web service in the URL field. The URL can include "?" and URL parameters.
  3. Enter parameter names and values in the Parameters area.
    Enter values directly or by using an XPath expression.

    * An XPath expression can be used to enter a value when the XPath button appears pressed in. Click Browse to display a dialog box where you can browse the XML document currently being edited and select an XPath expression for the elements below the root element.
    Each time XPath is clicked, the input format switches between direct input and XPath expression input.

  4. Click Confirm Request as necessary to check the request message that will be created.
  5. Click Execute.
    The REST Web service is called.

Description of the Request Generator Dialog Box

URL
Enter the URL of the REST Web service. The URL can include "?" and URL parameters.

* Characters that are entered here and not URL encoded will be encoded to UTF-8 when creating the request message (however, "#" characters are not URL encoded).

Parameters
Enter the name and value of the parameters to pass to the REST Web service.

* Even if the URL in URL contains "?", parameter names and values can be entered in the Parameters area.
The rules for appending the name-value pairs entered in Parameters to the values in URL are as follows:

URL Status Rules for Appending Parameters to the URL
When "?" is at the end(URL text)name=value&...&name=value
When "?" is within the text(URL text)&name=value&...&name=value
When "?" is not included(URL text)?name=value&...&name=value

* Characters that are entered here and not URL encoded will be encoded to UTF-8 when creating the request message (however, "#" characters are not URL encoded).

XPath
When XPath is clicked, the entry method changes from entering a value directly to entering an XPath expression.
An XPath expression can be used to enter a value when this button appears pressed in.
Browse
Displays a dialog box where you can browse the XML document currently being edited and select an XPath expression for elements below the root element.
Delete
Deletes a line.
Add Line
Adds a new line.
Confirm Request
Displays the content of the request message being created.

* In Confirm Request dialog box, value using XPath expression in request message is displayed as "{XPath}".

Execute
Calls a REST Web service.
Cancel
Cancels the creation of a request message, and closes the request generator.
Help
Displays the contents page of the operation manual.

Calling a REST Web Service Again

You can call a REST Web service again to obtain the latest results.

  1. Select Web Service - Re-execute.
    The REST Web service is called, and the latest execution results are displayed.

    * If a request message is not set, Web Service - Re-execute are dimmed and cannot be executed.

Setting Whether to Call a REST Web Service When Loading a File

Select one of the following operations to be performed when saving or loading a document that calls a REST Web service.

  1. Select Web Services - Execute When Loading File.
    A checkmark appears next to the menu item. If a file is saved when this option is enabled, the REST Web service is called while loading the file and the latest execution results are obtained.

    * This function is turned on or off each time the menu item is selected.

<Supplement>Precautions When Entering XPath As a Value