GEOSS Banner

Steps for MINES ParisTech GENESIS Toolbox

<<Prev T.O.C Next>>


Creating a Web Processing Service

To create a new Web Processing Service follows these steps.

Perform the login procedure.

Click on the Service management (1) link in the toolbar. The browser should display:

Click on the "Create a new Service" (2) section link. The following page should be displayed.

Select the "Create Web Processing Service" (3) option and fill the Service Info tab (4) using a unique Service Name. This is the name of the service that will be used to create the WSDL file. Enter also an abstract and a Description of the service.

Select the Provider Info tab (5) and enter the Provider Name and Provider Site (this information will be included in the describe response).

Select the Contact Info tab (6) and fill all the Service Contact Information (this information will be included in the describe response).

Then click on the Create WPS Service Button (7). The Browser should now display a successful message:

Click on OK (8). The browser now should provide a list of all schema associated to this service and some additional parameters to be set. At the bottom of the following page, you will find the "Request Management" section.

In the "Request Management" section, which looks like this:

You can setup the following behaviors:

· Queue incoming service requests: setting this parameter to "true" all the requests to the service will be queued, avoiding concurrence between scripts execution (only for asynchronous operations). This field cannot be set if there is global queuing.

· Suspend mode: The Suspend mode defines the way the requests are managed on the service suspension. Two modes are supported: HARD and SOFT mode. HARD mode: the "first scripts" are not executed, the request is put in rejected status and the get result will be information of such rejection. SOFT mode: requests are queued on a dedicated queue before executing "first scripts" and before and after the normal queuing mechanism. Each request in suspend queue is served when the service is resumed.

· If the new service supports secure communication via SSL select the (OPTIONAL) "SSL" option and fill the (OPTIONAL) "Certification location" field with the path to the SSL certificate location. WARN: only if both the SSL fields are specified will the secure communication be possible.

· WS-Security: this allows securing the communication at SOAP level. Please refer to the Service Security Configuration for more information.

A summary of all the selected options is now displayed.

The service created is automatically populated with the GetCapabilities, DescribeProcess operations and an EMPTY Execute operation.

Add a WPS operation

A new operation can be added to a service in order to extend it with new features.

Select a WPS service (9) and click on the Operations management menu link (10). A page reporting the operations available for the selected service should be displayed.

The list should at least contain the following operations:

    * GetCapabilities: The GetCapabilities operation provides access to general information about a live WPS implementation, and lists the operations and access methods supported by that implementation.

    * DescribeProcess: The DescribeProcess operation allows WPS clients to request a full description of one or more processes that can be executed by the service. This description includes the input and output parameters and formats and can be used to automatically build a user interface to capture the parameter values to be used to execute a process.

    * Execute: The Execute operation allows WPS clients to run a specified process implemented by a server, using the input parameter values provided and returning the output values produced. Inputs can be included directly in the Execute request, or reference web accessible resources.

When a new service is created the Execute and DescribeProcess operations are deployed but cannot be invoked (indeed no processing are reported in the GetCapabilities thus it is not possible to create a valid input message for the DescribeProcess and the Execute).

To add new processing click on the "Add WPS processing Wizard >>" (11) button the browser should display the following dialog:

In this step a Describe Process document can be created. The DescribeProcess operation allows WPS clients to request a full description of one or more processes that can be executed by the service. This description includes the input and output parameters and formats and can be used to automatically build a user interface to capture the parameter values to be used to execute a process. In tho Toolbox the describe document is used to build the WPS infrastructure and set the variables that will be used in the processing.

The wizard window is split into two sections. The left section contains the wizard for the creation of document (12). The right section contains an edit area with the document that is being created (13). Also, the edit area section can be used to edit the Describe Process document or to load a previously saved.

Set Processing Information

At the top of the wizard should be inserted the general information of the "WPS processing". These are:

  • Processing Name. Unambiguous identifier or name of a process, unique for this server.
  • Processing Title. Title of a process, normally available for display to a human.
  • Processing Version. Release version of process (not of WPS specification).
  • Store Supported. Indicates if data output(s) from this process can be requested to be stored by the WPS server as web-accessible resources.
  • Status Supported. Indicates if WPS Execute operation response can be returned quickly with status information.
  • Processing Abstract. Brief narrative description of a process, normally available for display to a human.
  • Processing Metadata. Comma-separated list of words that will be included in the Metadata of the processing.

Insert the following information:

After set the information, on the right of the interface the XML Document will be as follows:

Process Inputs

The processing inputs in the wizard are managed by the "Processing Inputs" section. In this section you can add, edit or delete an input processing.

In order to add the first process input click on "Add Input" button (14), a new window will be displayed. Insert the following information:

At the top of the window should be inserted the general information. These are:

  • Input Name. Unambiguous identifier or name of a input (Mandatory).
  • Input Title. Title of a input, normally available for display to a human (Mandatory).
  • Input Abstract. Brief narrative description of a input, normally available for display to a human (Optional).
  • Input Metadata. Comma-separated list of words that will be included in the Metadata of the processing input (Optional).
  • Min Occurs. Minimum number of times that values for this parameter are required (Mandatory).
  • Max Occurs. Maximum number of times that this parameter may be present (Mandatory).

The types of inputs that can be defined as follows:

  • Complex Data. Indicates that this input shall be a complex data structure (such as a GML fragment), and provides lists of formats, encodings, and schemas supported.
  • Literal Data. Indicates that this input shall be a simple literal value (such as an integer) that is embedded in the execute request, and describes the possible values.
  • Bounding Box Data. Indicates that this input shall be a BoundingBox data structure that is embedded in execute request, and provides a list of the CRSs supported in these Bounding Boxes.

Select Literal Data type and insert the following information:

On the left of the form you can choose the DataType of this input (short, int, double, String, float, boolean, long, byte). In this case select double.

At the click of the check-box AnyValue, the grid immediately below (Allowed Values Grid) is disabled and the text field DefaultValue enabled (Default value of this input, encoded in character string). AnyValue indicates that any value is allowed for this input.

If a finite set of allowed values are chosen for this input, we must add the elements on the grid clicking the Add button. AllowedValues indicates that there is a finite set of values and ranges allowed for this input, and contains ordered list off all valid values.

In the same way, add the unit of measure in the Supported UOMs grid. The default UOM is the item selected. UOMs is a list of units of measure supported for this numerical input (or output). For both grids, if an element must be removed just click the button Remove.

After inserting information about the type of input, click on "Save" button. The input will be added to the "Processing Inputs" grid.

The input element added to "Current Describe Process" is the following:

Add a new process input "SecondAddend":

Select Literal Data type and insert the following information:

Select "double" Data type and check "AnyValue". After inserting information about the type of input, click on "Save" button. The input will be added to the "Processing Inputs" grid.

The input element added to "Current Describe Process" is the following:

Process Outputs

The processing outputs in the wizard are managed by the "Processing Outputs" section. In this section you can add, edit or delete an output processing.

In order to add new processing output click on "Add Output" button, a new window will be displayed. Insert the following information:

At the top of the window should be inserted the general information. These are:

  • Output Name. Unambiguous identifier or name of a output (Mandatory).
  • Output Title. Title of a output, normally available for display to a human (Mandatory).
  • Output Abstract. Brief narrative description of a output, normally available for display to a human (Optional).
  • Output Metadata. Comma-separated list of words that will be included in the Metadata of the processing output (Optional).
  • The types of outputs that can be defined as follows:
  • Complex Output. Indicates that this input shall be a complex data structure (such as a GML fragment), and provides lists of formats, encodings, and schemas supported.
  • Literal Output. Indicates that this input shall be a simple literal value (such as an integer) that is embedded in the execute request.
  • Bounding Box Output. Indicates that this input shall be a BoundingBox data structure that is embedded in execute request, and provides a list of the CRSs supported in these Bounding Boxes.

Select Literal Output type and insert the following information:

Select "double " in the DataType combo and click on "Save" button. The output will be added to the "Processing Outputs" grid.

 

The output element added to "Current Describe Process" is the following:

After the definition of inputs and output the generated Process Description document is the following:

<?xml version="1.0" encoding="UTF-8"?>

<wps:ProcessDescriptions xmlns:wps="http://www.opengis.net/wps/1.0.0" service="WPS" version="1.0.0" xml:lang="en-UK">

  <ProcessDescription xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" wps:processVersion="0.1" storeSupported="true" statusSupported="false">

    <ows:Identifier>Addition</ows:Identifier>

    <ows:Title>Addition Operation</ows:Title>

    <ows:Abstract>Addition mathematical operation</ows:Abstract>

    <ows:Metadata xlink:title="addition"/>

    <ows:Metadata xlink:title="operation"/>

    <DataInputs>

      <Input minOccurs="1" maxOccurs="1">

        <ows:Identifier>FirstAddend</ows:Identifier>

        <ows:Title>Fisrt addend</ows:Title>

        <ows:Abstract>First addend of addition</ows:Abstract>

        <ows:Metadata xlink:title="addend"/>

        <LiteralData>

          <ows:DataType ows:reference="http://www.w3.org/TR/xmlschema-2/#double">double</ows:DataType>

          <ows:AnyValue/>

        </LiteralData>

      </Input>

      <Input minOccurs="1" maxOccurs="1">

        <ows:Identifier>SecondAddend</ows:Identifier>

        <ows:Title>Second addend</ows:Title>

        <ows:Abstract>Second addend of the addition</ows:Abstract>

        <LiteralData>

          <ows:DataType ows:reference="http://www.w3.org/TR/xmlschema-2/#double">double</ows:DataType>

          <ows:AnyValue/>

        </LiteralData>

      </Input>

    </DataInputs>

    <ProcessOutputs>

      <Output>

        <ows:Identifier>result</ows:Identifier>

        <ows:Title>Addition Result</ows:Title>

        <ows:Abstract>Result of addtion</ows:Abstract>

        <ows:Metadata xlink:title="result"/>

        <LiteralOutput>

          <ows:DataType ows:reference="http://www.w3.org/TR/xmlschema-2/#double">double</ows:DataType>

        </LiteralOutput>

      </Output>

    </ProcessOutputs>

  </ProcessDescription>

</wps:ProcessDescriptions>

When done, click on the "Create" button.

The browser should display the following pop-up interface:

This step allows you to select the processing engine to be used to process the requests. Currently only three processing methods are available: Grass Engine, Shell script or Toolbox Script.

The main difference between the three is the language/tool used to implement the processing logic. In the first case a Grass script shall be provided, in the second a batch shell script while in the third a Toolbox script is used for the processing and have to be provided. These scripts are then put in execution every time a SOAP request arrives to the service. The execution of these scripts will provide the processing logic. Toolbox will take care of setting and downloading input data so that the user shall only take care of writing the logic itself. All data to work upon shall be considered already downloaded when the user script is put in execution. For all implementation methods it is possible to write the script directly in the text area or to upload one from disk.

Select the Shell Engine methods (14), load the template (15) and add the following line (16):

export result=$((($FirstAddend + $SecondAddend)))

You can provide the script logic by loading a file from disk (if available) too. Then click on the Create WPS process button (17). A new operation now created.

For each new WPS processing TOOLBOX creates a new synchronous operation called ExecuteProcess_<ProcessingName>,  if the WPS processing is asynchronous (this information is set in the Describe Process document) TOOLBOX creates a  asynchronous Operation called ExecuteProcess_<ProcessingName>_ASYNC.

<ProcessingName> is the value of the ProcessingName tag included in the Describe process document.

In the image below we have created a new asynchronous processing named TestOperation

The Resource Manager allows updating both the describe information as well as the processing logic.

The Remove button allows removing a WPS operation.

The Toolbox implements both the WPS 05-007r7 1.0.0 SOAP binding as well as the Corrigendum for OpenGIS Implementation Standard Web Processing Service (WPS) 1.0.0 (0.0.8) 08-091r6. Thus it can be invoked as a simple SOAP wrapping of the Execute POST message (as described in 08-091r6) or as encoded message ExecuteProcess_<ProcessingName> (as desscribed in WPS 05-007r7 1.0.0).

For asynchronous requests the Toolbox implements the WPS specification but extend it with the support to the WS-Addressing. In general:

    * ExecuteProcess_<ProcessingName> operations can be invoked asynchronously (if supported) via the standard WPS asynchronous mechanism (polling to a specific HTTP URL)

    * ExecuteProcess_<ProcessingName>_ASYN supports the WS-Addressing specification

Refer to the following page for more information regarding the asynchronous support

Test our WPS operation.

To test our WPS operation we have to use the Test Center. Click on test center then Toolbox Application Client link.

The link should popup the following page:

First check if the toolbox is the right on in Insert a TOOLBOX URL dialog box. Then select the sum service en the operation ExecuteProcess_Sum. Finally, click on "Create Request" button. You get the following page:

Here you have to fill-in the SOAP request, currently the TOOLBOX do not help to do so. Therefore use the following SOAP:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:q0="http://toolbox.pisa.intecs.it/soap/WPS/WPSsoap" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >

<soapenv:Body>

<q0:ExecuteProcess_Addition lineage="false" status="false" storeExecuteResponse="false" >

<q0:FirstAddend>10</q0:FirstAddend>

<q0:SecondAddend>7</q0:SecondAddend>

<q0:result/>

</q0:ExecuteProcess_Addition>

</soapenv:Body>

</soapenv:Envelope>

Then press send request. Now you get the following result, that mean the operation is functional.

<<Prev T.O.C Next>>

Tag
none

Files (0)

 
You must login to post a comment.