Over a million developers have joined DZone.

Managing Raw SOAP message within Spring Integration – Part 2

· Integration Zone

Today’s data climate is fast-paced and it’s not slowing down. Here’s why your current integration solution is not enough. Brought to you in partnership with Liaison Technologies.

In my earlier blog, Managing Raw SOAP message within Spring Integration, I demonstrated how to get the raw SOAP message from int-http:inbound-gateway and process the SOAP message.

There are few scenarios, where in the Spring Integration flow is invoked by an event. Where Spring Integration flow, should get a payload from source Webservice and just transfer it to target Webservice, acting as a Proxy, retaining all the properties of the source and target systems.

In this blog I will demonstrate how you can create a Proxy and how int-ws-outbound-gateway can call the Proxy service when calling Source Webservice. If you notice int-ws-outbound-gateway carefully, we can configure the security keystore and other properties. These properties will be retained, when the payload is passed to the Proxy. Once the request payload is in the Proxy, it can be sent to the source Webservice and once we get the response, we can bind it to another channel, which can be processed further or sent to the target Webservice.

Managing Raw SOAP message within Spring Integration

Managing Raw SOAP message within Spring Integration

<int:channel id="ws.outbound" />

 <int-ws:outbound-gateway id="ws.gateway"
 request-channel="ws.inbound" reply-channel="ws.outbound"
 ignore-empty-responses="true" message-sender="common.message.sender.ws"
 uri="http://localhost:8080/http-proxy-for-ws/receiveGateway" />

 <int-http:inbound-gateway id="http.proxy.gateway"
 request-channel="http.proxy.inbound" name="/receiveGateway"
 supported-methods="POST" />

 <int:channel id="http.proxy.inbound" />

 <int:service-activator input-channel="http.proxy.inbound"
 id="httpProxyServiceActivator" ref="httpProxyServiceActivatorBean"
 method="sendXml" />

 <int:channel id="http.proxy.outbound" />

 <bean id="httpProxyServiceActivatorBean">
 <property name="uri"
 value="http://www.webservicex.net/CurrencyConvertor.asmx" />
 <property name="soapAction" value="http://www.webserviceX.NET/ConversionRate" />
 <property name="wsOutboundChannel" ref="http.proxy.outbound" />
 </bean>

 <int:service-activator input-channel="http.proxy.outbound"
 id="finalProcessorServiceActivator" ref="finalProcessorServiceActivatorBean"
 method="sendXml" />

 <bean id="finalProcessorServiceActivatorBean" />
 

Is iPaaS solving the right problems? Not knowing the fundamental difference between iPaaS and iPaaS+ could cost you down the road. Brought to you in partnership with Liaison Technologies.

Topics:

Published at DZone with permission of Krishna Prasad, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}