DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Managing Raw SOAP message within Spring Integration

Managing Raw SOAP message within Spring Integration

Krishna Prasad user avatar by
Krishna Prasad
·
Nov. 18, 12 · Interview
Like (0)
Save
Tweet
Share
9.19K Views

Join the DZone community and get the full member experience.

Join For Free

in spring integration if we use int-ws:outbound-gateway, once a message is associated to the request channel, the spring integration container add the soap header information and sends the soap payload to the target system to be processed. most of the time, this is what is needed, but sometimes, we just need the integration layer to act as a proxy. the soap payload coming from the source system is just handed to the target system retaining all the properties of source system like security, enrichment and others.

in this case the trick is instead of using int-ws:outbound-gateway, we should use int-http:inbound-gateway and int-http:outbound-gateway. this way you can fool the target system to accept this as a soap message. we can also make it aware what soapaction we need to execute is a below,

<int-http:inbound-gateway id="webservice.inbound.gateway"
request-channel="http.outbound.enrich.in" reply-channel="ws.outbound"
name="/receivegateway" supported-methods="post" />

<int:header-enricher input-channel="http.outbound.enrich.in"
output-channel="ws.inbound">
<int:header name="content-type" value="text/xml;charset=utf-8" />
<int:header name="soapaction"
value="http://www.webservicex.net/conversionrate" />
</int:header-enricher>

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

<int-http:outbound-gateway id="webservice.outbound.gateway"
request-channel="ws.inbound" reply-channel="ws.outbound"
url="http://www.webservicex.net/currencyconvertor.asmx"
expected-response-type="java.lang.string" />

the spring integration flow is as below,

managing raw soap message within spring integration

managing raw soap message within spring integration

i hope this blog helped you.


Spring Integration Integration SOAP Web Protocols Spring Framework Payload (computing) Requests Container security

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

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Real-Time Stream Processing With Hazelcast and StreamNative
  • How to Secure Your CI/CD Pipeline
  • 5 Factors When Selecting a Database
  • Top Three Docker Alternatives To Consider

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: