Versions Compared

Key

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

...


Figure 28: Schema of port parent_child1_GET_Response

Functional Demonstration

Image Removed
Figure 29: RESTStub being used to expose a database

The figure above demonstrates a scenario where the RESTStub component is used to expose a database query as a RESTful service. The service queries a database with a name and fetches the email id of the particular user from the table. The RESTStub component is configured with a single resource and request query parameter name is added to the GET method. This parameter is mapped to the name column of a database by using the route transformation.

No Response is added to the method so that the response string will be passed as is to the client. The route from DB to RESTStub (route 2) is configured to transform the DB response to just the mail ID. A sample invocation is as shown in the figure below.

Image Removed
Figure 30: using service to lookup mail details of a user

Refer to the following sections for detailed demonstration of functionalities of each of the below:

Note

These scenarios involve the RESTConsumer microservice as well, which works in conjunction with RESTStub. Refer to the RESTConsumer documentation to configure and run the event processes.

Useful Tips

  • For SSL to work properly the JDK version used should be greater than 1.5.0_08 and the jars present in JDK_HOME/jre/lib/ext should be copied to $FIORANO_HOME/esb/lib/ext.
  • When RESTStub component is configured to launch on HA (High Availability) Peer Servers
    • If both Primary and Secondary Servers are on the same machine:
      Initially, if RESTStub is launched on the Primary Server, the generated WADL URL contains Primary Server's jetty port number. In case of Primary Server failover, the Secondary Server becomes Active and relaunches the component. WADL will be regenerated and if the Secondary Server uses a different jetty port then the WADL URL is changed. The clients have to be reconfigured to use new URL in this case.
      To avoid this situation, it is recommended to use the same jetty ports for both Primary and Secondary Peer Servers.
      Jetty service will be started only after the server is started successfully. In case of HA, only one server will be active at a given time and the Jetty Server will be running only in the active server and there will be no bind exceptions even if both the servers use the same port number for Jetty.

...

Adaptavist ThemeBuilder EngineAtlassian Confluence