Execute GET

Operation Name

Execute GET

Function Overview

Executes the request with GET method of HTTP.

Data Model

Data model of this component is XML type.
For details on the in-outputting schema, please refer to "Schema".

Properties

For information about using variables, refer to "Variables".
Basic settings
Item name Required/Optional Use of Variables Description Remarks
Name Required Not available Enter the name to show on the script canvas.  
Required settings
Item name Required/Optional Use of Variables Description Remarks
Destination Required Not available Select a global resource.
For how to set a global resource, please refer to "Global resource properties".
  • [Add]:
    Adds a new global resource.
  • [Edit list]:
    Enables to edit the global resource settings in the "Edit resource list" screen.
 
Path Optional Available Specify the relative path from the URL entered in [URL] of [Destination].
  • lightbulbURL Encoding is applied with the encode selected or entered in [Encoding].
Encoding Optional Available Select or enter the encodes to use in URL Encoding.

Specify the encodes supported by Java SE Runtime Environment 8 when inputting.
For details, please refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html).
  • Default value is "UTF-8". If you omit the option, "UTF-8" will be set automatically.
Query parameters Optional - Specify the name and the value of a parameter linking to the URL.

Each parameter can be operated with the following.
  • [Add]:
    Adds a query parameter.
  • [Up]:
    Moves the order of the selected query parameter upwards by one.
  • [Down]:
    Moves the order of the selected query parameter downwards by one.
  • [Delete]:
    Deletes the selected query parameter.
  • lightbulbURL Encoding is applied with the encode selected or entered in [Encoding].
Query parameters/ Name Optional Available Enter the name of a query parameter.
  • If you omit the name, the query parameter will not be linked to the URL.
Query parameters/ Value Optional Available Enter the value of a query parameter.  
Response setting
Item name Required/Optional Use of Variables Description Remarks
Data destination Required Not available Select the destination of the response body.
  • [Data]:(default)
    Outputs to the result data. Outputs with the format selected in [Data type].
  • [File]:
    Outputs to the file specified in [File path].
 
Data type Required Not available Select the data type of the response body.
  • [XML]:(default)
    Processes with XML format.
  • [JSON]:
    Processes with JSON format.
  • [Other]:
    Processes with TEXT format or BINARY format.
  • Displayed if you select [Data] in [Data destination].
  • Output schema differs depending on the selected data type.
  • For details on output schema, please refer to "Output schema".
File path Required Available Select or enter the file path that outputs response body.

Click [Browse] button to activate the file Selectr and Select the file.
  • Displayed if you select [File] in [Data destination].
  • Specify the absolute path of DataSpider file system for the file path.
  • Constrained Characters of DataSpider File System cannot be used, except for the path separator "/".
Delete invalid XML characters Optional Not available Select whether to delete invalid XML characters automatically if found any during analysis of JSON data.
  • [Checked]:
    Deletes invalid XML characters.
  • [Not Checked]:(default)
    Leaves invalid XML characters intact.
  • Displayed if you select [JSON] in [Data type].
Redirect automatically Optional Not available Select whether to redirect automatically if the redirecting destination is included in the response.
  • [Checked]:
    Redirects automatically.
  • [Not checked]:(default)
    Does not redirect automatically.
Errors occur when the status code of response is 4xx or 5xx Optional Not available Select whether to make the process an error if the status code of response is 4xx or 5xx.
  • [Checked]:
    Make the process an error.
  • [Not checked]:(default)
    Does not make the process an error.
 
Property Action
Item name Description Remarks
Configure output schema from JSON file Specify JSON file and set the schema of the output destination. Displayed if you select [JSON] in [Data type].
Header Settings
Item name Required/Optional Use of variables Description Remarks
Request headers Optional - Specify HTTP header to include in the request.

Each request header can be operated with the following.
  • [Add]:
    Adds a request header.
  • [Up]:
    Moves the order of the selected request header upwards by one.
  • [Down]:
    Moves the order of the selected request header downwards by one.
  • [Delete]:
    Deletes the request header.
 
Request headers/ Name Optional Available Enter the request header name.
  • If you omit the name, request header will not be included in the request.
Request headers/ Value Optional Available Enter the request header value.  
Response headers Optional - Specify the header name to retrieve from the HTTP header included in the response.

Each response header can be operated with the following.
  • [Add]:
    Adds a response header.
  • [Up]:
    Moves the order of the selected response header upwards by one.
  • [Down]:
    Moves the order of the selected response header downwards by one.
  • [Delete]:
    Deletes the selected response header.
  • lightbulbThe response header is defined as the component variable of the name entered in [Name].
Response headers/Name Optional Only environmental variables are available. Enter the response header name.
  • Upper/lower case is not distinguished.
  • If you omit the name, response header will not be defined as the component variable.
  • Trim and define as the component variable, if there's any spaces, tabs, or enters before and behind the name.
Authentication Settings
Item name Required/Optional Use of variables Description Remarks
Authentication Required Not available Select how to authenticate when sending requests.
  • [None]:(default)
    Does not operate authentication.
  • [Basic authentication]:
    Operates basic authentication.
  • [Digest authentication]:
    Operates digest authentication
  • [WSSE authentication]:
    Operates WSSE authentication.
 
User name Optional Available Enter the user name to use on the authentication.
  • Displayed if you select [Basic authentication], [Digest authentication] or [WSSE authentication] in [Authentication].
Password Optional Available Enter the password to use on authentication.
  • Displayed if you select [Basic authentication], [Digest authentication] or [WSSE authentication] in [Authentication].
Data processing method
Item name Required/Optional Use of Variables Description Remarks
Mass data processing Required Not available Select a data processing method.
  • [Use script settings]: (default)
    Applies mass data processing settings of script property to adapter.
  • [Disable]:
    Mass data processing is not performed.
  • [Enable]:
    Mass data processing is performed.
 
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input schema

None.

Output schema

Varies depending on the setting of [Data type] in [Response settings].

In case of [XML]

Differs depending on the response body of XML data.

In case of [JSON]

If the response body is JSON format data, output to the result data with conversion into XML format.
Schemas in case you converted from JSON format to XML format are the following.
<--In case the root is JSON object of object type-->
<?xml version="1.0"?>
<root type="object">
  <JSON member name type="Attribute value showing JSON type">value</JSON member name>
    :
</root>

<-- In case the root is JSON object of array type-->
<?xml version="1.0"?>
<root type="array">
  <element type="Attribute value showing JSON type">value</element>
    :
</root>

<-- In case the JSON member name is inappropriate as XML element name-->
<?xml version="1.0"?>
<root type="object">
  <member type="Attribute value showing JSON type" name="JSON member name">value</member>
    :
</root>
Element name Attribute name Description Remarks
root - This is a root element that wraps JSON object.  
type Specifies the attribute value that shows JSON type.
Attribute value Description
object Shows the JSON object type.

Ex: Object type consists of JSON object.
{"name":"Suzuki"}
JSON object in the above example is output with conversion into the XML data.
<root type="object">
  <name type="string">Suzuki</name>
</root>
array Shows JSON array type.

Ex: JSON object consists of array type.
["apple","grape","orange"]
JSON object in the above example is output with conversion into the XML data below.
<root type="array">
  <element type="string">apple</element>
  <element type="string">grape</element>
  <element type="string">orange</element>
</root>
 
JSON member name - This is the element that shows JSON member.  
type Sets the attribute value that shows JSON type.
Attribute value Description
string Shows the JSON character string type.

Ex: JSON member that has character string type value.
{"name":"Suzuki"}
JSON member in the above example is output with conversion into the XML data below.
<name type="string">Suzuki</name>
number Shows JSON numeric type.

Ex: JSON member having numeric type value.
{"age":37}
JSON member in the above example is output with conversion into the XML data below.
<age type="number">37</age>
boolean Shows JSON boolean type value.

Ex: JSON member having boolean type value.
{"success":true}
JSON member in the above example is output with conversion into the XML data below.
<success type="boolean">true</success>
object Shows JSON object type.

Ex: JSON member having object type value.
{"name":{"first":"Ichiro","last":Suzuki"}}
JSON member in the above example is output with conversion into the XML data below.
<name type="object">
  <first type="string">Ichiro</first>
  <last type="string">Suzuki</last>
</name>
array Shows JSON array type.

Shows the element of JSON array type as "element" element.
If the element type of JSON array type is an object type, XML data having schema that shows JSON object is output to the child element of "element" element. For other types, data are output to element contents with values of "element" element.

Schema is as followed.
<JSON member name type="array">
  <element type="Attribute value showing JSON type"> value </element>
    :
</JSON member name>

Ex: JSON member having array type.
{"fruits":["apple","grape","orange"]}
JSON member in the above example is output with conversion into the XML data below.
<fruits type="array">
  <element type="string">apple</element>
  <element type="string">grape</element>
  <element type="string">orange</element>
</fruits>
null Shows null type of JSON

Ex: JSON member having the null type value.
{"name":null}
JSON member in the above example is output with conversion into the XML data below.
<name type="null"/>
 
element - This is an element name showing the array element.  
type Character strings showing JSON type is output. The same attribute value as
JSON member name type attribute is set.
 
member - This is the element name when JSON member name is used inappropriate as XML element name.  
type Character string that shows JSON type is output.
Set as the same attribute value with the type attribute of a JSON member name
 
name JSON member name is output.

Ex: JSON member having inappropriate name as the XML element name.
{"1name":"Suzuki"}
JSON member in the above example is output with conversion into the XML data below.
<member type="string" name="1name">Suzuki</member>
 

In case of [Other]

<?xml version="1.0"?>
<response>
  <body>
    <content>Response body data</content>
  </body>
</response>
Element name Attribute name Description Remarks
response -    
body -    
content - This is the data of the response body. Data differs depending on the Content-Type header value of the responses.
  • If your setting meets any of the following conditions, response body will be regarded as the text data. Therefore character string encoded with the charset parameter value in the Content-Type header will be output.
    • Content-Type header type is "text".
    • Content-Type header sub-type ends with "xml" or "json".
  • If it doesn't meet the above conditions, response body will be regarded as the binary data. Therefore the character string converted into Base64 from byte string data, created based on the charset parameter value in Content-Type header, will be output.
  • If there is neither Content-Type header nor charset parameter, the value defaults to "ISO-8859-1".

Loading Schema in Mapper

The reading of schema differs depending on the setting of [Data type] in [Response settings].

In case of [XML]

Schema needs to be loaded manually.
Specify the schema of the response body.

In case of [JSON]

Schema is automatically loaded, if you set as [Specify JSON file and set schema].

In case of [Other]

Schema is automatically loaded.
lightbulbThe automatically loaded schema can be edited.
For details, please refer to "Edit schema".

Mass Data Processing

Mass data processing is supported.

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
status_code Stores HTTP status code of responses.
  • The value defaults to null.
reason_phrase Stores the text phrase related to the HTTP status code of responses.
  • The value defaults to null.
error_response_body Stores the response body in the case the response status code is "4xx" or "5xx".
  • The value defaults to null.
message_category When errors occur, stores the message code category corresponding to the error.
  • The value defaults to null.
message_code When errors occur, stores the codes of message code corresponding to the error.
  • The value defaults to null.
message_level When errors occur, stores the message code severity corresponding to the error.
  • The value defaults to null.
error_type When errors occur, stores the error type corresponding to the error.
  • The value defaults to null.
  • Error types take the following formats.
    Ex: "java.io.FileNotFoundException"
  • Depending on the versions of DataSpider Servista, the storing contents may vary.
error_message When errors occur, stores the error message.
  • The value defaults to null.
  • Depending on the versions of DataSpider Servista, the storing contents may vary.
error_trace When errors occur, stores the trace information of the error occurred.
  • The value defaults to null.
  • Depending on the versions of DataSpider Servista or the executing client application, the storing contents may vary.

Automatic Redirect

The operations if you put check in [Redirect automatically] are as follows.

About result data when the status code of response is above 400

When the status code of response is above 400, outputs the response body to the result data.
Then, the schema of result data differs depending on the Content-Type header value of the response.

Specification Limits

Main Exceptions

Exception name Causes Solution
ResourceNotFoundException
Resource definition could not be found. Name:[]
[Destination] is not specified. Please specify [Destination] .
ResourceNotFoundException
Resource definition could not be found.Name: [<name of Global Resources>]
Resource definition selected in [Destination] is not found. Please check the global resource specified in [Destination]
InvalidPropertyConfigurationException
Required item of resource is not specified. :<Property name>
[<Property name>] of [Destination] is not specified. Please specify [<Property name>] in [Destination].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify [<Property name>].
FileIsDirectoryException Path input in [File path] is directory. Input file path in [File path].
PathIsNotAbsoluteException Relative path is the path entered in [Path] or [File path]. Enter the absolute path in [Path] or [File path].
RestServerException Response with the status code "5xx" is returned from HTTP Server. Please check the conditions of HTTP server and contents of request specified in [Destination] by referring to the contents of error messages.
RestClientException Response with the status code "4xx" is returned from HTTP Server. Please check the entered path and the contents of request in [Path] by referring to the contents of error messages.
org.apache.http.conn.HttpHostConnectException Could not connect to HTTP server or Proxy server. Please check whether connection is available to the destined HTTP server or Proxy server or not.
org.apache.http.conn.ConnectTimeoutException Connection timeout occurred when connecting with HTTP server or Proxy server. Please check the setting of [Connection timeout] in [Destination].
java.net.SocketTimeoutException After connecting to HTTP server, timout occurred during the reply of sending the request and receiving the response. Please check the setting of [Receive timeout] in [Destination].
javax.json.stream.JsonParsingException Error occurred during processing the response body as JSON format. Please check the setting and the response contents of [Response settings] referring to the error message.

Notes