Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-1997

Dynamic "per message" endpoint

    XMLWordPrintable

    Details

      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

            Activity

              People

              Assignee:
              igarashitm tomohisa igarashi
              Reporter:
              jorgemoralespou_2 Jorge Morales Pou (Inactive)
              Votes:
              12 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: