Chinaunix首页 | 论坛 | 博客
  • 博客访问: 664739
  • 博文数量: 53
  • 博客积分: 830
  • 博客等级: 准尉
  • 技术积分: 1089
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-31 18:23
文章存档

2019年(1)

2018年(1)

2016年(1)

2015年(1)

2014年(12)

2013年(4)

2012年(33)

分类: 系统运维

2012-06-18 12:40:09

/*
 * LoadRunner Java script. (Build: _build_number_)
 *
 * Script Description: dengdagui
 *                     
 */

import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;


import flex.messaging.io.MessageDeserializer;
import flex.messaging.io.MessageIOConstants;
import flex.messaging.io.amf.ActionMessage;
import flex.messaging.io.amf.AmfMessageDeserializer;
import flex.messaging.io.amf.AmfMessageSerializer;
import flex.messaging.io.amf.MessageBody;
import flex.messaging.io.amf.client.AMFConnection;  
import flex.messaging.io.amf.client.exceptions.ClientStatu***ception;  
import flex.messaging.io.amf.client.exceptions.ServerStatu***ception;  
import lrapi.lr;



public class Actions
{

 //     private static  int Conn_ok =1;
      
 //     private static  int Call_ok =3;
 //     private int  state;    

    public int init() throws Throwable {
        return 0;
    }//end of init


    public int action() throws Throwable {
               
    
       
       lr.start_transaction("查看房间列表");
      AMFConnection conn=new AMFConnection();  
      try {  
      //conn.connect("");  33
      conn.setObjectEncoding(0);
//          conn.connect("");  
      conn.connect("");


 
    
      try {  
          //Object obj=conn.call("product.getProducts");//第一个参数是 destination.方法 ? ?参数是方法参 ?
          //Object obj=conn.call("taskBean.getGameAffiche",1);//第一个参数是 destination.方法 ? ?参数是方法参 ?

              
    //      Object obj=conn.call("roomBean.getNewRoomByType","1",0);
    //      Object obj=conn.call("roomBean.getNewRoomByType",1,"");
                   Object obj=conn.call("roomBean.getNewRoomByType","A1",0);




    //      System.out.println(obj.toString());
              

        lr.end_transaction("查看房间列表", lr.PASS);
        conn.close();


      } catch (ServerStatu***ception e) {  
          // TODO Auto-generated catch block  
          e.printStackTrace();  
              conn.close();

         lr.end_transaction("查看房间列表", lr.FAIL);

      }  


    
      } catch (ClientStatu***ception e) {  


        e.printStackTrace();  
            conn.close();
       lr.end_transaction("查看房间列表", lr.FAIL);
      }  

       return 0;
    }//end of end

 //         
//    }//end of end


    public int end() throws Throwable {
        return 0;
    }//end of end
}

阅读(1973) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~