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

Dynamic "per message" endpoint

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    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

              toigaras@redhat.com tomohisa igarashi
              jmorales@redhat.com Jorge Morales Pou (Inactive)
              Archiver:
              ranumula@redhat.com Raju Anumula

              Dates

                Created:
                Updated:
                Resolved:
                Archived: