2 Replies Latest reply on Mar 10, 2014 10:38 AM by Jorge Morales

    Dynamic soap, http and resteasy endpoints

    Jorge Morales Master

      Hi, I developed a service which invokes an external SOAP service. It is working fine. Now it is time to promote the service to a new environment, so I have to modify external endpoints. The options that I can think of, right now, are:

      • Use a system property, and pass it to the JBoss command line with -D. In the service, use {{external.endpoint}}
      • Use a module to store properties, and deploy different modules in dev, pre and pro environment. In the service use {{external.endpoint}}
      • Use a component (Bean, camel,...) to query that value from somewhere(file, db, cache) and inject it as a property. I really don't know how should I inject the property in my bean, and then use it in the Service (maybe a header).


      I would love to see a hook point, in the OutboundHandlers, to let specify the endpoint address when there is no addressing. Something similar to this, so If I define an implementation to be injected in this point, I could set the endpoint adress. I would get that address from "cache", "properties file" using the Binding`s service name as the key.

       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);



      Also this could also be extended to set different timeouts based on configuration per environment.