Web services trigger

Operation name

Web services trigger

Functional Overview

Web services trigger executes its associated script when the web service requests are accepted on the URL specified.

Properties

Web services trigger settings
Item name Content Remarks
Trigger name Enter the name of the trigger.  
Execution path Enter execution path of trigger.
  • The default value is "/path".
  • Example: If in the [Execution path] "run" is specified, the URL of trigger execution will be as follows.

    http://<Hostname or IP address of DataSpiderServer>:<Port number of DataSpiderServer>/dataspider/webServices/run

  • If [Enable HTTPS] at [Control Panel] - [DataSpiderServer Settings] - [Security] tab is checked, URL of trigger execution is as follows.

    https://<Hostname or IP address of DataSpiderServer>:<SSL port number of DataSpiderServer>/dataspider/webServices/run

  • By adding "?wsdl" to the end of [Execution path], and access,you can get WSDL.

    Example: http://<Hostname or IP address of DataSpiderServer>:<Port number of DataSpiderServer>/dataspider/<Execution path>?wsdl

  • If [Enable HTTPS] at [Control Panel] - [DataSpiderServer Settings] - [Security] tab is checked, URL to get WSDL is as follows.

    https://<Hostname or IP address of DataSpiderServer>:<SSL port number of DataSpiderServer>/dataspider/webServices<Execution path>?wsdl

  • [Execution path] cannot contain em-size characters.
I/O processing form Select data format treated as I/O variable.
  • [Transfer parameter of SOAP body]: (default)
    Get parameter from schema of SOAP body, and store it in the script variable.
    Select it when you want to treat only parameter in SOAP message.
  • [Transfer SOAP envelope]:
    Store entire envelope of SOAP request and SOAP response in script variable.
    Select it when you want to treat item in SOAP message freely.
  • When [Transfer parameter of SOAP body] is selected, trigger generates WSDL automatically.
  • When [Transfer SOAP envelope] is selected, SOAP body containing multiRef attribute cannot be stored into a script variable.
  • when you select [Transfer SOAP envelope], enter WSDL to [WSDL definition] manually.
Operation name Input value of "name" attribute of "wsdl:operation" element output to WSDL.
  • Enabled when [Transfer parameter of SOAP body] is selected in [I/O processing form].
  • Default value is "OperationName".
WSDL output form Select output format of WSDL.
  • [document/literal]: (default)
    Output document/literal style WSDL.
  • [rpc/encoded]:
    Output rpc/encoded style WSDL.
  • Enabled when [Transfer SOAP envelope] is selected in [I/O processing form].
Use script variable name at WSDL Select whether to use script variable name for WSDL.
  • [Checked]: (default)
    Use script variable names for WSDL(parameter names of SOAP envelope).
  • [Not Checked]:
    Use names auto-generated based on the number of script variables for WSDL(parameter names of SOAP envelope).
    Example: "in1 in2" "out1 out2"
  • Enabled when [Transfer parameter of SOAP body] in [I/O processing form] is selected.
  • Specify valid format for XML element name for script variable name.
    Because script variable name is used as element of SOAP message for request, you cannot build SOAP messages.
    Example of script variable name can not use are as follows.
    • Starting with half size number
    • Including '"'
    • Including space
    Refer to "[5] Name" of "W3C XML 1.0 specification" (http://www.w3.org/TR/xml/#NT-Name) for the XML specification of the character that can be used as an element name.
WSDL definition Enter WSDL.
  • Enabled when [Transfer SOAP envelope] in [I/O processing form] is selected.
  • Root element name must be "definitions" or "<namespace>:definitions".
  • get operation name from operation element of child element of portType element.
  • Multiple operations cannot be set.
  • Value of location attribute of address element of WSDL set to [WSDL definition] and trigger execution URL generated from path entered to [Execution path] should be corresponding.
Execution content settings
Item name Content Remarks
Trigger owner Select the owner of the trigger to be created.
  • Can only be selected by users with administrator privileges.
    (Ordinary users can select themselves only.)
Execution user name Select the user to run script specified by [Script].  
Password Type the password associated with the user specified by [Execution user name].  
Service Select the script to run by trigger.
  • Project that was registered as a service displays.
Script Select the script to run by trigger.
  • Script in the service specified by [Service] displays.
Script arguments script input variables that is set in script specified by [Script] displays
  • The script output variable does not display.
  • When [Transfer SOAP envelope] in [I/O processing form] is selected, you should set XML type script input variable for execution script.
  • Refer to "Input variable / Output variable" for how to set script input variable on script and use it, .
Script arguments / Variable name Script variable name is displayed.
  • Can not be edited.
Script arguments / Type Script variable number type is displayed.
  • Can not be edited.
Script arguments / Value Enter a script variable value.
  • Trigger variables can be specified from "Advanced operations" window.
  • If you specify a value other than the trigger variable is ignored.
  • When [Transfer SOAP envelope] in [I/O processing form] is selected, you should specify trigger variable "trigger.soapRequest" for XML type script input variable.
Script outputs Script output variables that is set in script specified in [Script] appears.
  • The script input variables does not display.
  • When you select [Transfer parameter of SOAP body] in [I/O processing form], embed content of XML type script output variable into parameter of SOAP response and return.

    Example: In case of XML script output variable of type "var"
    <?xml version="1.0" encoding="Shift_JIS"?>
    <OperationName>
      <var>
      &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;table&gt;
        &lt;row&gt;
          &lt;column&gt;1&lt;/column&gt;
        &lt;/row&gt;
      &lt;/table&gt;
      </var>
    </OperationName>
  • When [Transfer SOAP envelope] in [I/O processing form] is selected, you should set XML type script output variable for execution script.
  • Refer to " About input output variable" for how to set script output variable on script and use it,.
Script outputs / Variable name Script variable name is displayed.
  • Can not be edited.
Script outputs / Type Script variable number type is displayed.
  • Can not be edited.
Script outputs / Value Enter a script variable value.
  • Trigger variables can be specified from "Advanced operations" window.
  • If you specify a value other than the trigger variable is ignored.
  • When [Transfer SOAP envelope] in [I/O processing form] is selected, you should specify trigger variable "trigger.soapResponse" for XML type script output variable.
Execution option settings
For more information about Setting execution option, refer to "Execution option settings".

Trigger Variables

When [Transfer SOAP envelope] in [I/O processing form] is selected, hand over SOAP envelope by using XML type script I/O variable.

Trigger variable name Value Content Remarks
SOAP request trigger.soapRequest When [Transfer SOAP envelope] in [I/O processing form] is selected, SOAP request from web service client is stored in this variable.
  • Need to be specified at [Script arguments / Value].
  • Example: ${trigger.soapRequest}
SOAP response trigger.soapResponse When you select [Transfer SOAP envelope] in [I/O processing form] , return XML data in this variable to web service client .
XML data in this variable should be SOAP response based on WSDL input to [WSDL definition].
  • Need to be specified at [Script outputs / Value].
  • Example: ${trigger.soapResponse}

Log Output

When received a request to the trigger execution URL, DataSpiderServer will output the IP address of the client you used for sending the request, or the IP address of the last proxy server to the server log if the trigger is enabled.
DataSpiderServer will only output those to log when the log level is set as "FINFO".

Specification limit

Main exceptions

Nothing.

Notes