Examples of RMInteropServiceStub


Examples of org.apache.sandesha2.interop.RMInteropServiceStub

 
 
  private void runStubBased () throws Exception {
    ConfigurationContext configurationContext = getConfigurationContext();
   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, toAddress);
    ServiceClient stubServiceClient = stub._getServiceClient();
   
    String sequenceKey = "sequence4";
    String acksTo = stubServiceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
   
    Options options = stubServiceClient.getOptions();
    setUpOptions(options, sequenceKey, acksTo);
    populateToEPRToRejectOffers(stub._getServiceClient().getOptions().getTo());
   
    EchoString echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo1");
   
    RMInteropServiceCallbackHandlerImpl callback1 = new RMInteropServiceCallbackHandlerImpl ("callback1");
    stub.startEchoString(echoString, callback1);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo2");
   
    RMInteropServiceCallbackHandlerImpl callback2 = new RMInteropServiceCallbackHandlerImpl ("callback2");
    stub.startEchoString(echoString, callback2);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo3");
   
    RMInteropServiceCallbackHandlerImpl callback3 = new RMInteropServiceCallbackHandlerImpl ("callback3");
    stub.startEchoString(echoString, callback3);
   
    while (!callback3.isCompleted()) {
      Thread.sleep(2000);
    }
   
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

 
  private void runStubBased () throws Exception {

    ConfigurationContext configurationContext = getConfigurationContext();
   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, toAddress);
    ServiceClient stubServiceClient = stub._getServiceClient();
   
    String sequenceKey = "sequence4";
    String acksTo = stubServiceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
   
    Options options = stubServiceClient.getOptions();
    setUpOptions(options, sequenceKey, acksTo);
   
    EchoString echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo1");
   
    options.setReplyTo(new EndpointReference (AddressingConstants.Final.WSA_ANONYMOUS_URL));
   
    RMInteropServiceCallbackHandlerImpl callback1 = new RMInteropServiceCallbackHandlerImpl ("callback1");
    stub.startEchoString(echoString, callback1);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo2");
   
    RMInteropServiceCallbackHandlerImpl callback2 = new RMInteropServiceCallbackHandlerImpl ("callback2");
    stub.startEchoString(echoString, callback2);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo3");
   
    RMInteropServiceCallbackHandlerImpl callback3 = new RMInteropServiceCallbackHandlerImpl ("callback3");
    stub.startEchoString(echoString, callback3);
   
    while (!callback3.isCompleted()) {
      Thread.sleep(2000);
    }
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

 
 
  private void runStubBased () throws Exception {
    ConfigurationContext configurationContext = getConfigurationContext();
   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, toAddress);
    ServiceClient stubServiceClient = stub._getServiceClient();
   
    String sequenceKey = "sequence4";
    String acksTo = null; //serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
   
    Options options = stubServiceClient.getOptions();
    setUpOptions(options, sequenceKey, acksTo);
   
    EchoString echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo1");
   
    RMInteropServiceCallbackHandlerImpl callback1 = new RMInteropServiceCallbackHandlerImpl ("callback1");
    stub.startEchoString(echoString, callback1);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo2");
   
    RMInteropServiceCallbackHandlerImpl callback2 = new RMInteropServiceCallbackHandlerImpl ("callback2");
    stub.startEchoString(echoString, callback2);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo3");
   
    RMInteropServiceCallbackHandlerImpl callback3 = new RMInteropServiceCallbackHandlerImpl ("callback3");
    stub.startEchoString(echoString, callback3);
   
    while (!callback1.isCompleted() || !callback2.isCompleted() || !callback3.isCompleted()) {
      Thread.sleep(2000);
    }
   
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

 
  private void runStubBased () throws Exception {

    ConfigurationContext configurationContext = getConfigurationContext();
   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, toAddress);
    ServiceClient stubServiceClient = stub._getServiceClient();
   
    String sequenceKey = "sequence4";
    String acksTo = stubServiceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
   
    Options options = stubServiceClient.getOptions();
    setUpOptions(options, sequenceKey, acksTo);
   
    EchoString echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo1");
   
    options.setReplyTo(new EndpointReference (AddressingConstants.Final.WSA_ANONYMOUS_URL));
   
    RMInteropServiceCallbackHandlerImpl callback1 = new RMInteropServiceCallbackHandlerImpl ("callback1");
    stub.startEchoString(echoString, callback1);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo2");
   
    RMInteropServiceCallbackHandlerImpl callback2 = new RMInteropServiceCallbackHandlerImpl ("callback2");
    stub.startEchoString(echoString, callback2);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo3");
   
    RMInteropServiceCallbackHandlerImpl callback3 = new RMInteropServiceCallbackHandlerImpl ("callback3");
    stub.startEchoString(echoString, callback3);
   
    while (!callback3.isCompleted()) {
      Thread.sleep(2000);
    }
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

  }
 
  private void runStubBased () throws Exception {
   
    ConfigurationContext configurationContext = generateConfigContext();
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext,toEPR);
    ServiceClient stubServiceClient = stub._getServiceClient();
   
    Options options = stubServiceClient.getOptions();
    setUpOptions(options);
   
    options.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(1));
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.Ping(ping);
   
    options.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(3));
    ping = new Ping ();
    ping.setText("ping2");
    stub.Ping(ping);
   
    boolean complete = false;
    while (!complete) {
      SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
      if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==2)
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

 
  private void runStubBased () throws Exception {
    String targetEndpoint = toEPR;
    ConfigurationContext configurationContext = generateConfigContext();
   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
    ServiceClient stubServiceClient = stub._getServiceClient();
   
    String acksToAddress = stubServiceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
   
    setUpOptions(stubServiceClient.getOptions(),acksToAddress);
   
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.Ping(ping);
   
    ping = new Ping ();
    ping.setText("ping2");
    stub.Ping(ping);
   
    ping = new Ping ();
    ping.setText("ping3");
    stub.Ping(ping);
   
    SequenceReport sequenceReport = null;   
    boolean complete = false;
    while (!complete) {
      sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
      if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3)
        complete = true;
      else {
        try {
          Thread.sleep(1000);
        } catch (InterruptedException e1) {
          e1.printStackTrace();
          }
      }
    }    
   
    Thread.sleep(3000);
   
    SandeshaClient.terminateSequence(stubServiceClient);
   
    Thread.sleep(6000);
   
    stub._getServiceClient().cleanup();
   
  }
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

 
 
  private void runStubBased () throws Exception {
    ConfigurationContext configurationContext = getConfigurationContext();
   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, toAddress);
    ServiceClient stubServiceClient = stub._getServiceClient();
   
    String sequenceKey = "sequence4";
   
    //acksTo will be pickedup from replyTo
    String acksTo = null//stubServiceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
   
    Options options = stubServiceClient.getOptions();
    setUpOptions(options, sequenceKey, acksTo);
   
    EchoString echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo1");
   
    RMInteropServiceCallbackHandlerImpl callback1 = new RMInteropServiceCallbackHandlerImpl ("callback1");
    stub.startEchoString(echoString, callback1);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo2");
   
    RMInteropServiceCallbackHandlerImpl callback2 = new RMInteropServiceCallbackHandlerImpl ("callback2");
    stub.startEchoString(echoString, callback2);
   
    echoString = new EchoString ();
    echoString.setEchoString (new EchoStringRequestBodyType ());
    echoString.getEchoString().setSequence(sequenceKey);
    echoString.getEchoString().setText("echo3");
   
    RMInteropServiceCallbackHandlerImpl callback3 = new RMInteropServiceCallbackHandlerImpl ("callback3");
    stub.startEchoString(echoString, callback3);
   
    while (!callback3.isCompleted()) {
      Thread.sleep(2000);
    }
   
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

 
  private void runStubBased () throws Exception {
    String targetEndpoint = toEPR;
    ConfigurationContext configurationContext = generateConfigContext();
   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
   
    setUpOptions(stub._getServiceClient().getOptions());
    ServiceClient stubServiceClient = stub._getServiceClient();
    Options clientOptions = stubServiceClient.getOptions();
   
//    stubServiceClient.setOptions(clientOptions);
   
    setUpOptions(clientOptions);
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

 
  private void runStubBased () throws Exception {
    String targetEndpoint = toEPR;
    ConfigurationContext configurationContext = generateConfigContext();
   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
    ServiceClient stubServiceClient = stub._getServiceClient();
    setUpOptions(stubServiceClient.getOptions());
   
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.Ping (ping);
   
    ping = new Ping ();
    ping.setText("ping2");
    stub.Ping (ping);
   
    ping = new Ping ();
    ping.setText("ping3");
    stub.Ping (ping);
   
   
    SequenceReport sequenceReport = null;   
    boolean complete = false;
    while (!complete) {
      sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
      if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3)
        complete = true;
      else {
        try {
          Thread.sleep(1000);
        } catch (InterruptedException e1) {
          e1.printStackTrace();
          }
      }
    }    
   
//    SandeshaClient.closeSequence (stubServiceClient);
   
    Thread.sleep(1000);
   
    SandeshaClient.terminateSequence  (stubServiceClient);
   
    Thread.sleep(3000);
   
//    ping = new Ping ();
//    ping.setText("ping4");
//    stub.Ping (ping);
//    Thread.sleep(3000000);
   
    configurationContext.getListenerManager().stop();
    stub._getServiceClient().cleanup();
  }
View Full Code Here

Examples of org.apache.sandesha2.interop.RMInteropServiceStub

   
    private void runStub () throws Exception {
        String targetEndpoint = toEPR;
        ConfigurationContext configurationContext = generateConfigContext();
       
        RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
        ServiceClient serviceClient = stub._getServiceClient();
        setUpOptions(serviceClient.getOptions());
       
        //engage Rampart
        serviceClient.engageModule(new QName("rampart"));
       
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.Ping (ping);
   
    ping = new Ping ();
    ping.setText("ping2");
    stub.Ping (ping);
   
    ping = new Ping ();
    ping.setText("ping3");
    stub.Ping (ping);
       
        terminateSequence(serviceClient);
        Thread.sleep(5000);
       
        serviceClient.getOptions().setProperty(SandeshaClientConstants.UNRELIABLE_MESSAGE, Constants.VALUE_TRUE);
        serviceClient.getOptions().setProperty(RampartMessageData.CANCEL_REQUEST, Constants.VALUE_TRUE);
        stub.Ping(ping);
       
        Thread.sleep(10000);
//        stub._getServiceClient().cleanup();
       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.