Giter Club home page Giter Club logo

spring-integration-soap-to-rest-spike's Introduction

REST to SOAP wrapper with Spring Integration

This spike illustrates how to use Spring Integration library to implement a REST wrapper for the CurrencyName SOAP endpoint, where the endpoint is provided by DataFlex Web Service which is available to the public. The CurrencyName endpoint converts a currency code (e.g. JPY) into a currency name (e.g. Yen).

How to run this spike

  • Run the rest-to-soap spring boot application
cd modules/rest-to-soap
./mvnw clean spring-boot:run
  • Call the REST API with curl and expected "Yen" to be returned
curl -u hung:pass1234 -v -s "http://localhost:8080/api/currencyname?code=jpy"

Highlight features

  • The REST controller handles many incoming requests simultaneously, all these requests are sent to a single request message channel, and all the SOAP responses are returned to the REST controller via a single reply message channel. To map the message received from the reply message channel to the corresponding REST request, the message gateway plays an important role here. To test this scope mapping, a Jmeter test plan has been included in this spike which performs the load test to the REST controller.

Setup Jmeter for testing

Run the Jmeter test plan

  • load the test plan in "/jmeter/load-test.jmx"
  • Expand the test plan tree, adjust the Filename parameter under the bzm - Random CSV Data Set Config step
  • Check the test result in Summary Report and View Result Tree

Reference

For calling other API

curl -u hung:pass1234 -v -s http://localhost:8080/api/echo\?ping\=hung
curl -u hung:pass1234 -v -s http://localhost:8080/api/upper\?value\=hung

spring-integration-soap-to-rest-spike's People

Contributors

kwonghung-yip avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.