0 Replies Latest reply on Dec 28, 2008 11:19 AM by Kevin Richards

    Where does "myEPR" come from in Programmers Guide

    Kevin Richards Newbie

      Hi,

      On page 47 of the Programmers Guide, it has the following

      ServiceInvoker flightService = new ServiceInvoker(...);
      Message request = // create new Message of desired type
      request.getBody().add("org.example.flight.seatnumber", 1);
      request.getBody().add("org.example.flight.flightnumber", "BA1234");
      request.getHeader().getCall().setMessageID(1234);
      request.getHeader().getCall().setReplyTo(myEPR);
      Message response = null;
      do
      {
       response = flightService.deliverSync(request, 1000);
       if (response.getHeader().getCall().getRelatesTo() == 1234)
       {
       // it's out response!
       break;
       }
       else
       response = null; // and keep looping
      } while maximumRetriesNotExceeded;
      


      Where does "myEPR" come from.
      The reason I'd like to know is that I'd like to set the faultTo so that exceptions can be returned to the client.
      e.g.
      request.getHeader().getCall().setFaultTo(myEPR);
      


      Thanks
      PS. When using mep="OneWay", faults do NOT go to the replyTo address but specifically looks for the faultTo