Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Representational State Transfer (RESTful) has gained widespread acceptance across the Web as a simpler alternative to SOAP - and Web Services Description Language (WSDL) - based Web servicesServices. RESTful web service Web Service uses architectures architecture that use HTTP or similar protocols by restricting the interface to use standard operations like GET, POST, PUT, DELETE for HTTP. You can create Consumer/Provider activities with the RESTful Web Service Services using Adeptia SuitSuite.

...

Following are the major subsections:

This section explains the process of creating web service consumer activity for RESTful Web Service.
Steps to create Web Service Consumer activity for RESTful Web Service

  1. On the create Web Service Consumer page, select the REST radio button (see Figure 355).

...

Image Removed

You need to pass the request in the URL.
You can also define the values of the parameters in the Parameter table.

...

Image Removed

You can dynamically override a complete URL or any parameter of the URL with the value of any variable. To do this you need define the variable name in the URL field.
For Example, To override a complete URL you can define the URL as $$REST_URL_Var$$.

...

Image Removed

If you want to pass parameters as a part of HTTP request then, you need to select Header in the Style drop-down list.

...

  • Get
  • Put
  • Post
  • Delete
  1. Define the Type and Media Type from the Presentation table as per you requirement.
  2. Select a security policy from the Security Policy drop-down list.

    Image Removed

...

Image Removed

When you use either Put or Post method, then following two additional options are displayed.

...

  1. Expand the Advanced Properties section to view the advance property of the RESTful web service consumer activity (see Figure 357).

...

  1. If you do not want your RESTful web service consumer activity to wait indefinitely for a response from a web service provider then, enter a timeout value in the Read Timeout (in seconds) text box. The default value is 0 which means your RESTful web service consumer activity will wait indefinitely for a response.
  2. If you want to enter a time within which your RESTful web service consumer activity should connect to a web service then, enter a timeout value in the Connect Timeout (in seconds) text box. The default value is 0 which means your RESTful web service consumer activity will wait indefinitely for a connection.
  3. Click the Save button.

...

We can override the REST URL at run time by placing Put-Context-Var before Web Services REST Consumer Activity in the Process Flow.
Steps to override the REST URL:

...

Image Removed

To know how to create RESTful Consumer, please refer to the [ Creating Web Service Consumer Activity to Access RESTful Web Service

Using RESTful Web Service#_Creating_Web_Service_10] section.

...

Image Removed

To know how to create a Target Activity, please refer to the Creating Target Activity section.

...

Server Entities

Description

 

Context Variable

 

Put-Context-Var

Consumer Activity

 

REST

Target Activity

 

Any

...

  1. Click the Add Variable ( Image Removed ) to add new context variable. The Context Variable Information screen is displayed.
  2. Select the Rest Consumer activity (which is to be overridden) from the dropdown list Activity Name. All variables of this Rest Consumer activity are listed in the dropdown list Variable Name (seeFigure 361).

...

  1. Select restURL variable from the dropdown list Variable Name.
  2. Enter the Url that you want to override during the run time, in the textbox Variable Value.
  1. Click Done to close the Context Variable Information screen. This takes the control back to the screen Edit Context Variables. The newly created variable is added to the list of existing context variables.
  2. Click Done to close the Edit Context Variables screen and return to Process Designer.
  3. Select your Target activity.
  4. Save the process flow and exit from Process Designer.
  5. Execute the process flow, this overrides the dummy URL provided at the design time.

...

Image Removed

...

...

Step-by-step instructions to create Web Service Consumer activity for RESTful Web Service.

Overriding RESTful URL

Step-by-step instructions to override REST URL at runtime.

Creating Web Service Provider Activity to Publish RESTful Web Service

  1. In Create Web Service Provider Screen, enter the name and description of the new Web Service Provider activity in the Name and Description textboxes respectively (see Figure 362).

...

Image Removed

        1. The process flow, which you select here, should have Context Source and Context Target activity.
      1. The parameterName attribute of the context source should be restRequest.
      2. The parameterName attribute of the context target should be restResponse.|

...

Image Removed

For the parameters that you want to pass as a part of HTTP header, select the Header option in the Style drop-down list.

...

  1. Select the type of method from the Method Type drop-down list. The method type can be PUT, GET, POST, or DELETE. As per the type of method that you select, you will see a corresponding content in the Presentation Table (see Figure 364).

...

Image Removed

For the parameters that you want to pass as a part of HTTP header, select the Header option in the Style drop-down list.

...

Image Removed

To know how to create Security policy, refer to the Creating Security Policy for Web Service section.
The RESTful Web Service Provider supports only basic authentication.

...

Image Removed

A lot of WSDL files by default come with a dummy endpoint that do not point to the actual location of the service, but instead contains a dummy link, for example -

http://example/servicename

. This is because sometimes the WSDL file describes what the service looks like, but do not point where it is located. Therefore it should be possible to override the endpoint from within the Web Service Consumer configuration instead of having to do via the Process Designer.

...

Step-by-step instructions to create Web Service Provider activity for RESTful Web Service.