SOAP Service Versioning

Version: 17.07

Supported Since: 17.07

Use case description

I want to direct my web service calls by introducing a soap versioning service of the UltraESB-X. This service is not supposed to do processing and it will directly route the received SOAP messages to the appropriate SOAP version based service.

Proposed Solution

As shown in the following diagram, ESB will come in between the actual end user and the back end services.

soap service

UltraStudio Configuration

UltraESB-X Configuration

Implementation of the Solution

Prerequisite

In order to implement above use case you must first select following dependencies when you are creating a new Ultra project.

  • HTTP NIO Connector from the connector list

If you have already created a project, you can add above dependencies via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Connectors list and Processors list, select above dependencies.
Implementation

To implement above use case, first create an integration flow named “soap-sample-flow”, and then add required components by going through following steps in order.

  1. Add a HTTP NIO Ingress Connector from the Connectors → Ingress Connectors list, to accept the HTTP requests from the user. NIO HTTP Listener’s basic parameters should be filled as below to expose a service at port 8280 on the resource path /service/soapService

  2. Add three Processors of type HTTP NIO Egress Connector from the Connectors → Egress Connectors list, to send the received request to the actual back end services. For that NIO HTTP Egress Connector’s basic parameters should be filled as below table.

  3. Add a SOAP Router from the Processors → SOAP Router, to route the SOAP messages based on the version. No configurations are required for the element.

  4. Add two Processors of type SOAP Action Setter from Processors → SOAP Action Setter, to set the SOAP action of the message. The basic parameters should be filled as below to set the SOAP Action

  5. Add two Processors of type SOAP Action Getter from Processors → SOAP Action Getter, to get the SOAP action and include it as a scope variable of the message.

  6. Add respective Logger elements to verify the SOAP action headers obtained from the scope variable.

The completed integration flow should look like below.

soap service flow

Configuration for each element is as below. The numbering corresponds to the numbers shown in above diagram.

Design View

Text View

.

1. NIO HTTP Ingress Connector

soap service versioning component 1

3. SOAP Action Setter

soap service versioning component 3

4. SOAP Action Setter

soap service versioning component 4

5. SOAP Action Getter

soap service versioning component 5

6. SOAP Action Getter

soap service versioning component 6

7. Logger

soap service versioning component 7

8. Logger

soap service versioning component 8

9. Logger

soap service versioning component 9

10. NIO HTTP Egress Connector

soap service versioning component 10

11. NIO HTTP Egress Connector

soap service versioning component 11

12. NIO HTTP Egress Connector

soap service versioning component 12
.

1. NIO HTTP Ingress Connector

Http Port

8280

Service Path

/service/soapService

3. SOAP Action Setter

SOAP Action

soap11Action

4. SOAP Action Setter

SOAP Action

soap12Action

5. SOAP Action Getter

Action Name

SOAP_ACTION_NAME

6. SOAP Action Getter

Action Name

SOAP_ACTION_NAME

7. Logger

Log Template

@{variable.SOAP_ACTION_NAME}

Log Level

INFO

8. Logger

Log Template

@{variable.SOAP_ACTION_NAME}

Log Level

INFO

9. Logger

Log Template

Default Message

Log Level

INFO

10 .NIO HTTP Egress Connector

Destination Address Type

URL

Destination Host

localhost

Destination Port

9001

Service Path

/service/soap11Service

11 .NIO HTTP Egress Connector

Destination Address Type

URL

Destination Host

localhost

Destination Port

9002

Service Path

/service/soap12Service

12 .NIO HTTP Egress Connector

Destination Address Type

URL

Destination Host

localhost

Destination Port

9003

Service Path

/service/defaultService

.

Now you can run the Ultra Project and check the functionality of the integration flow. Create an UltraESB Server run configuration and start it.

Property Configuration

When running the sample in the UltraESB-X distribution, you need to override the following properties in-order for the sample to work. The properties file is located at $ULTRA_HOME/conf/projects/soap-service-versioning/default.properties

Refer to Managing Project Properties documentation on how to override properties.

soap-service-flow.ingress-connector.port

The Service Port of the listener (default value is 8280)

soap-service-flow.ingress-connector.servicePath

The Service Path of the listener (default value is /service/soapService)

soap-service-flow.egress-connector-soap11.servicePath

The Service Path of the listener (default value is /service/soap11Service)

soap-service-flow.egress-connector-soap11.host

The Service Path of the listener (default value is localhost)

soap-service-flow.egress-connector-soap11.port

The Service Path of the listener (default value is 9001)

soap-service-flow.egress-connector-soap12.servicePath

The Service Path of the listener (default value is /service/soap12Service)

soap-service-flow.egress-connector-soap12.host

The Service Path of the listener (default value is localhost)

soap-service-flow.egress-connector-soap12.port

The Service Path of the listener (default value is 9002)

soap-service-flow.egress-connector-default.host

The Service Path of the listener (default value is localhost)

soap-service-flow.egress-connector-default.port

The Service Path of the listener (default value is 9003)

soap-service-flow.egress-connector-default.servicePath

The Service Path of the listener (default value is /service/defaultService)

After that navigate to $ULTRA_HOME/bin directory. Next you can run the UltraESB-X distribution with following command to start the engine with this sample project deployed.

./ultraesbx.sh -sample soap-service-versioning

Testing the Integration Project

  1. Send a POST HTTP request containing any payload to http://localhost:8280/service/soapService. (You can use the HTTP Client shipped with Ultra Studio Toolbox for this purpose). You will get a response with the same content you have included in the request since our backend is an echo server. Our backend servers have been implemented as three separate integration flows included in the directory back-end-server-mock.

  2. If required you could use your own back end servers by changing the respective ports and end points.

In this topic
In this topic
Contact Us