7 Replies Latest reply on Apr 8, 2014 2:09 PM by Henrique Martins

    REST reference questions

    Henrique Martins Newbie

      Hi,

       

      I have two issues using references with REST binding. The first is that I must be able to change the binding IP address without redeploy the whole service. Is it possible to change the address during the execution of the service?

       

          <sca:reference name="Task" multiplicity="0..1" promote="ProcessComponent/Task">
            <sca:interface.java interface="Task"/>
            <resteasy:binding.rest>
              <resteasy:interfaces>Task</resteasy:interfaces>
              <resteasy:address>http://10.112.34.31:8080/</resteasy:address>
            </resteasy:binding.rest>
          </sca:reference>
      

       

       

      The second is about using Path Parameters on the reference path. Below is the Interface that implements the reference. This interface is used by a service task in a bpmn proccess. I'm not finding a way to use this... Which is the best way?

       

       

      @Path("/sensor")
      public interface Task {
        @GET
        @Path("/{id}/info")
        @Consumes(MediaType.APPLICATION_XML)
        public Data getInfo();
      }
      

       

       

      Thanks in advance,

      Best Regards