How to switch SOAP endpoints dynamically at runtime for SOAP reference bindings in SwitchYard

Solution Verified - Updated -

Issue

  • We are implementing a Camel Java route as a service implementation and SwitchYard gateway reference with SOAP binding, acting as a SOAP client, which is being called by the Camel route.
  • In switchyard.xml the SOAP endpoint address can be set like below. Here soap:endpointAddress is using a composite property.
<sca:reference name="someRef" multiplicity="0..1" promote="CamelServiceRoute1/MyService">
  <sca:interface.java interface="com.example.switchyard.ws.MyService"></sca:interface>
  <soap:binding.soap name="soap1">
    <soap:wsdl>wsdl/MyService.wsdl</soap:wsdl>
    <soap:wsdlPort>MyServicePort</soap:wsdlPort>
    <soap:endpointAddress>${ref-soapendpoint}</soap:endpointAddress>
  </soap:binding.soap>
</sca:reference>
...
<sca:property value="http://localhost:8080/context/MyService" name="ref-soapendpoint"></sca:property>
  • In our requirement the endpoint ("http://localhost:8080/context/MyService") varies for each message. During the routing of each message, we need to retrieve the endpoint from a database and set the same as SOAP endpoint address.
  • How can we override / set the endpoint address for each message at runtime?

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content