Skip to main content
Skip table of contents

Deploying Processes as ReSTful HTTP Web Service

To provide a Technical Process as operation of a ReSTful web service within the Webservice Configuration Editor, proceed as follows: 

  1. If needed, create a new node (corresponds to a URL part of the web service) within the tree structure, see Editing the Web Service Configuration graphically.
  2. Choose Add HTTP ReST Service to create a new HTTP ReST service for the desired node (with the type Constant,Variable or Remainder) and adjust the (security) properties, if required.
  3. Choose Add HTTP ReST Operation in the context menu to create a new operation for the HTTP ReST service or select an entry in the Operations table, which shall be overwritten.

    You can assign an operation GETPOSTPUTDELETE once for each service or enter any operation name; it will be distinguished between upper case and lower case
  4. Drag and drop a process from the repository to the desired operation in order to assign the process path.

  5. Define an input mode and an output mode for each operation to specify which XML structure is expected and created.
  6. If required, enable the use of placeholders in order to enable parameter handling for the web service operation, and to hand over HTTP request information to the process context as placeholders.

    If option Enabled is selected, the following placeholders with HTTP request information are are available within the X4 process context, e.g. within XSL mappings:

    • REQUEST_PARAMETER_<Name>: Desired parameter (case-sensitive!)
    • REQUEST_HEADER_<NAME>: Desired HTTP header (only uppercase!)
    • REQUEST_METHOD
    • REQUEST_SCHEME
    • REQUEST_PATH
    • REQUEST_FULL_PATH
    • REQUEST_REMOTE_ADDRESS
    • REQUEST_REMOTE_PORT
    • REQUEST_REMOTE_USER
    • REQUEST_LOCAL_ADDRESS
    • REQUEST_LOCAL_PORT
    • REQUEST_SERVER_NAME
    • REQUEST_SERVER_PORT
  7. Define security options such as Realm or Guest Allowed for the operation.

Example: ReSTful web service configuration (excerpt from XML storage format)

XML
<Constant value="example">
    <Service type="Http">
        <Operation name="GET" process="x4db:/1/RestExamples/http/DirectOutput.wrf">
            <InputHandler type="HTTP-MetaXml" />
            <OutputHandler type="HTTP-Content" />
        </Operation>
    </Service>
</Constant>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.