1
votes

I have the below requirement in spring integration.

  1. Receive the web service request.
  2. Create a custom payload.(This will be the output of service activator)
  3. Call 2 stored procedures in sql server. The first one returns an out parameter. I have to use this out parameter, as well as the list of items in the custom payload to insert data into DB.
  4. Proceed to generate the response message using the payload generated in step 2 using another service activator

Please let me know if i can achieve step 3 using jdbc stored procedure outbound gateway. Sample code will be of great help. Thanks in advance...

1

1 Answers

0
votes

What you say is called Content Enricher and Spring Integration has the implementation on the matter.

So, you should call enrich sub-flow to execute the stored procedure and return that OUT to the main flow to enrich message not destroying the current payload.

We have a sample about Enricher, too.