Details
-
Feature Request
-
Status: Resolved
-
Major
-
Resolution: Done
-
None
Description
It would be nice to have an easy way to set the reference endpoint at runtime for every call.
Use cases:
- To allow to configure different endpoint per environment, so there is no need to recompile the application or use System.property to set endpoints.
- To allow a service to invoke different endpoints depending on a "logic" in a component.
- To provide with greater flexibility on service creation.
For this, an option could be to provide hook points in the OutboundHandler so the endpoint for the ServiceReference that has been set-up through the configuration can be obtained from some other place.
E.g:
String toAddress = SOAPUtil.getToAddress(exchange.getContext()); if (address == null){ // This means there is no Addressing, so endpoint can be overwritten if configured toAddress = InjectAddressFromCache(); // Probably with a hook point could be better, to be able to set toAddress depending on ServiceName or whatever } if (toAddress != null) { _dispatcher.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toAddress); }
Attachments
Issue Links
- blocks
-
SWITCHYARD-2448 Support dynamic modification of parameters for gateway service/reference bindings
-
- Open
-
- is followed up by
-
SWITCHYARD-2844 Add common property alias collection to handle binding specific context properties
-
- Open
-
- is related to
-
ENTESB-4585 SwitchYard: dynamic "per message" endpoint
-
- Closed
-
- relates to
-
SWITCHYARD-1916 Allow HTTP reference binding to accept HTTP method, request URI, query string, etc. dynamically
-
- Resolved
-