chamikara    2005/05/14 10:18:54

  Modified:    sandesha/interop/org/apache/sandesha/samples/interop/testclient
                        InteropCallback.java InteropStub.java
  Log:
  Modified test client, callback classes.
  
  Revision  Changes    Path
  1.3       +1 -1      
ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/InteropCallback.java
  
  Index: InteropCallback.java
  ===================================================================
  RCS file: 
/home/cvs/ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/InteropCallback.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InteropCallback.java      14 May 2005 02:45:39 -0000      1.2
  +++ InteropCallback.java      14 May 2005 17:18:54 -0000      1.3
  @@ -52,7 +52,7 @@
                        else 
if(action.equals(Constants.WSRM.SEQUENCE_ACKNOWLEDGEMENT_ACTION))
                        msgType = "acknowledgement";
                }else{
  -                     msgType = "service response";
  +                     msgType = "";
                        
                }
                
  
  
  
  1.4       +1 -247    
ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/InteropStub.java
  
  Index: InteropStub.java
  ===================================================================
  RCS file: 
/home/cvs/ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/InteropStub.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InteropStub.java  14 May 2005 02:45:39 -0000      1.3
  +++ InteropStub.java  14 May 2005 17:18:54 -0000      1.4
  @@ -43,16 +43,6 @@
                String operation = bean.getOperation();
                int messages = bean.getNoOfMsgs();
                        
  -             System.out.println(target);
  -             System.out.println(from);
  -             System.out.println(replyTo);
  -             System.out.println(acksTo);
  -             System.out.println(acks);
  -             System.out.println(terminate);
  -             System.out.println(operation);
  -             System.out.println(messages);
  -             
  -             
                if(replyTo!=null && replyTo.equalsIgnoreCase("anonymous"))
                    replyTo = AddressingUtils.getAnonymousRoleURI();
                
  @@ -125,16 +115,6 @@
                String terminate = bean.getTerminate();
                String operation = bean.getOperation();
                int messages = bean.getNoOfMsgs();
  -                     
  -             System.out.println(target);
  -             System.out.println(from);
  -             System.out.println(replyTo);
  -             System.out.println(acksTo);
  -             System.out.println(acks);
  -             System.out.println(terminate);
  -             System.out.println(operation);
  -             System.out.println(messages);
  -             
                
                if(replyTo!=null && replyTo.equalsIgnoreCase("anonymous"))
                    replyTo = AddressingUtils.getAnonymousRoleURI();
  @@ -149,7 +129,7 @@
                try {
                    boolean sync = false;
                    
  -                     System.out.println("********Running echo 2**********");
  +                     System.out.println("********Running echo 1**********");
                        
                        RMInitiator.initClient(sync);
   
  @@ -201,231 +181,5 @@
                }           
                    
       }
  -    
  -   /* public void runPingSync(InteropBean bean){
  -             String target = bean.getTarget();
  -             String from = bean.getFrom();
  -             String replyTo = bean.getReplyto();
  -             String acks = bean.getAcks();
  -             String terminate = bean.getTerminate();
  -             String operation = bean.getOperation();
  -             int messages = bean.getNoOfMsgs();
  -                     
  -             //String targetURL = 
"http://127.0.0.1:"+"8070"+"/axis/services/RMInteropService?wsdl";;
  -
  -             try {
  -
  -                     System.out.println("********Running ping sync");
  -                     RMInitiator.initClient(true);
  -
  -                     Service service = new Service();
  -                     Call call = (Call) service.createCall();
  -
  -                     call.setProperty(Constants.ClientProperties.SYNC, new 
Boolean(true));
  -                     call.setProperty(Constants.ClientProperties.ACTION, 
"sandesha:ping");
  -            call.setProperty(Constants.ClientProperties.ACKS_TO,
  -                    Constants.WSA.NS_ADDRESSING_ANONYMOUS);
  -                     //These two are additional
  -                     
//call.setProperty("from","http://schemas.xmlsoap.org/ws/2003/03/addressing/role/anonymous";);
  -                     
//call.setProperty("replyTo","http://10.10.0.4:8080/axis/services/MyService";);
  -                     
//http://schemas.xmlsoap.org/ws/2003/03/addressing/role/anonymous
  -
  -                     
call.setProperty(Constants.ClientProperties.FROM,AddressingUtils.getAnonymousRoleURI());
  -                     System.out.println("ANON IS |:" + 
AddressingUtils.getAnonymousRoleURI());
  -                     call.setTargetEndpointAddress(target);
  -                     call.setOperationName(new QName("RMInteropService", 
operation));
  -                     call.setTransport(new RMTransport(target, ""));
  -
  -                     call.addParameter("arg1", XMLType.XSD_STRING, 
ParameterMode.IN);
  -
  -                     for(int i=1;i<=messages;i++){
  -                             
call.setProperty(Constants.ClientProperties.MSG_NUMBER, new Long((i)));
  -                             String msg = "Ping Message Number " + i;
  -                             call.invoke(new Object[]{msg});
  -                             
  -                             if(i==messages){
  -                                     
call.setProperty(Constants.ClientProperties.LAST_MESSAGE, new Boolean(true));
  -                             }
  -                     }
  -
  -                     RMInitiator.stopClient();
  -
  -                     } catch (Exception e) {
  -                             //System.err.println(e.toString());
  -                             e.printStackTrace();
  -                     }       
  -                     
  -     }
  -     
  -     public void runPingAsync(InteropBean bean){
  -           try {
  -
  -                     String target = bean.getTarget();
  -                     String from = bean.getFrom();
  -                     String replyTo = bean.getReplyto();
  -                     String acks = bean.getAcks();
  -                     String terminate = bean.getTerminate();
  -                     String operation = bean.getOperation();
  -                     int messages = bean.getNoOfMsgs();
  -                     
  -                     
  -               RMInitiator.initClient(false);
  -
  -               Service service = new Service();
  -               Call call = (Call) service.createCall();
  -
  -               call.setProperty(Constants.ClientProperties.SYNC, new 
Boolean(false));
  -               call.setProperty(Constants.ClientProperties.ACTION, 
"sandesha:ping");
  -
  -               //These two are additional
  -               call.setProperty("from","http://127.0.0.1:"; + "9070" + 
"/axis/services/RMService");
  -               
//call.setProperty("replyTo","http://127.0.0.1:"+defaultClientPort+"/axis/services/RMService";);
  -               
//http://schemas.xmlsoap.org/ws/2003/03/addressing/role/anonymous
  -
  -               call.setTargetEndpointAddress(target);
  -               call.setOperationName(new QName("RMInteropService", "ping"));
  -               call.setTransport(new RMTransport(target, ""));
  -
  -               call.addParameter("arg1", XMLType.XSD_STRING, 
ParameterMode.IN);
  -                     
  -                             for(int i=1;i<=messages;i++){
  -                                     
call.setProperty(Constants.ClientProperties.MSG_NUMBER, new Long((i)));
  -                                     String msg = "Ping Message Number " + i;
  -                                     
  -                                     if(i==messages){
  -                                             
call.setProperty(Constants.ClientProperties.LAST_MESSAGE, new Boolean(true));
  -                                     }
  -                                     
  -                                     call.invoke(new Object[]{msg});
  -                             }
  -
  -               RMInitiator.stopClient();
  -
  -           } catch (Exception e) {
  -               //System.err.println(e.toString());
  -               e.printStackTrace();
  -           }     
  -     }
  -     
  -     public void runEchoStringSync(InteropBean bean){
  -            try {
  -                
  -                     String target = bean.getTarget();
  -                     String from = bean.getFrom();
  -                     String replyTo = bean.getReplyto();
  -                     String acks = bean.getAcks();
  -                     String terminate = bean.getTerminate();
  -                     String operation = bean.getOperation();
  -                     int messages = bean.getNoOfMsgs();
  -                     
  -                     //A separate listner will be started if the value of 
the input parameter for the mehthod
  -                 // initClient is "false". If the service is of type 
request/response the parameter value shoule be "false"
  -                 RMInitiator.initClient(false);
  -
  -                 //UUIDGen uuidGen = UUIDGenFactory.getUUIDGen(); //Can use 
this for continuous testing.
  -                 //String str = uuidGen.nextUUID();
  -
  -
  -                 Service service = new Service();
  -                 Call call = (Call) service.createCall();
  -
  -                 //Action is required.
  -                 call.setProperty(Constants.ClientProperties.SYNC, new 
Boolean(false));
  -                 call.setProperty(Constants.ClientProperties.ACTION, 
"sandesha:echo");
  -
  -                 //These two are additional, We need them since we need to 
monitor the messages using TCPMonitor.
  -                 
call.setProperty(Constants.ClientProperties.FROM,AddressingUtils.getAnonymousRoleURI());
  -                 
call.setProperty(Constants.ClientProperties.REPLY_TO,"http://127.0.0.1:"; + 
"9070" + "/axis/services/RMService");
  -                             
  -                             
  -                 call.setTargetEndpointAddress(target);
  -                 call.setOperationName(new QName("RMInteropService", 
"echoString"));
  -                 call.setTransport(new RMTransport(target, ""));
  -
  -                 call.addParameter("arg1", XMLType.XSD_STRING, 
ParameterMode.IN);
  -                 call.addParameter("arg2", XMLType.XSD_STRING, 
ParameterMode.IN);
  -                 
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
  -
  -                             for(int i=1;i<=messages;i++){
  -                                     
call.setProperty(Constants.ClientProperties.MSG_NUMBER, new Long((i)));
  -                                     String msg = "ECHO " + i;
  -                                     
  -
  -                                     if(i==messages){
  -                                             
call.setProperty(Constants.ClientProperties.LAST_MESSAGE, new Boolean(true));
  -                                     }
  -                                     
  -                                     String ret = (String) call.invoke(new 
Object[]{msg,"abcdef"});
  -                                     System.out.println("Got response from 
server " + ret);
  -                             }
  -
  -                 RMInitiator.stopClient();
  -             } catch (Exception e) {
  -                 e.printStackTrace();
  -             }               
  -     }       
  -     
  -     public void runEchoStringAsync(InteropBean bean){
  -        try {
  -            
  -            System.out.println("********* Running ECHO STRING Async");
  -            
  -            System.out.println("e11111");
  -                     String target = bean.getTarget();
  -                     String from = bean.getFrom();
  -                     String replyTo = bean.getReplyto();
  -                     String acks = bean.getAcks();
  -                     String terminate = bean.getTerminate();
  -                     String operation = bean.getOperation();
  -                     int messages = bean.getNoOfMsgs();
  -             
  -            //A separate listner will be started if the value of the input 
parameter for the mehthod
  -            // initClient is "false". If the service is of type 
request/response the parameter value shoule be "false"
  -            RMInitiator.initClient(false);
  -
  -            //UUIDGen uuidGen = UUIDGenFactory.getUUIDGen(); //Can use this 
for continuous testing.
  -            //String str = uuidGen.nextUUID();
  -
  -
  -            Service service = new Service();
  -            Call call = (Call) service.createCall();
  -            System.out.println("e22222");
  -            //To obtain the
  -            call.setProperty(Constants.ClientProperties.SYNC, new 
Boolean(false));
  -            call.setProperty(Constants.ClientProperties.ACTION, 
"sandesha:echo");
  -
  -            //These two are additional
  -            
//call.setProperty("from","http://schemas.xmlsoap.org/ws/2003/03/addressing/role/anonymous";);
  -            
call.setProperty(Constants.ClientProperties.FROM,"http://127.0.0.1:"; + "9070" + 
"/axis/services/RMService");
  -            
call.setProperty(Constants.ClientProperties.REPLY_TO,"http://127.0.0.1:"; + 
"9070" + "/axis/services/RMService");
  -
  -            call.setTargetEndpointAddress(target);
  -            call.setOperationName(new QName("RMInteropService", 
"echoString"));
  -            call.setTransport(new RMTransport(target, ""));
  -
  -            call.addParameter("arg1", XMLType.XSD_STRING, ParameterMode.IN);
  -            call.addParameter("arg2", XMLType.XSD_STRING, ParameterMode.IN);
  -            call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
  -            System.out.println("e3333");
  -                     for(int i=1;i<=messages;i++){
  -                             
call.setProperty(Constants.ClientProperties.MSG_NUMBER, new Long((i)));
  -                             String msg = "ECHO " + i;
  -                             
  -
  -                             if(i==messages){
  -                                     
call.setProperty(Constants.ClientProperties.LAST_MESSAGE, new Boolean(true));
  -                             }
  -                             
  -                             String ret = (String) call.invoke(new 
Object[]{msg,"abcdef"});
  -                             System.out.println("Got response from server " 
+ ret);
  -                             System.out.println("e44444");
  -                     }
  -                     System.out.println("e55555");
  -            RMInitiator.stopClient();
  -            System.out.println("e66666");
  -        } catch (Exception e) {
  -            e.printStackTrace();
  -        }            
  -     }*/
        
   }
  
  
  

Reply via email to