<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    少年阿賓

    那些青春的歲月

      BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
      500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks

    package org.abin.lee.file;

    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.List;

    import junit.framework.TestCase;
    import net.sf.json.JSONObject;

    import org.apache.http.HttpEntity;
    import org.apache.http.HttpResponse;
    import org.apache.http.NameValuePair;
    import org.apache.http.client.ClientProtocolException;
    import org.apache.http.client.entity.UrlEncodedFormEntity;
    import org.apache.http.client.methods.HttpPost;
    import org.apache.http.impl.client.DefaultHttpClient;
    import org.apache.http.message.BasicNameValuePair;
    import org.apache.http.protocol.HTTP;
    import org.apache.http.util.EntityUtils;

    public class QueryCustomerManagerTestCase extends TestCase {
     
     private static final String jsonServerUrl = " 
     static DefaultHttpClient client = new DefaultHttpClient();

     public static String sendReq(String method, String jsonReq)
       throws ClientProtocolException, IOException {
      HttpPost post = new HttpPost(jsonServerUrl + method);
      List<NameValuePair> nvps = new ArrayList<NameValuePair>();
      nvps.add(new BasicNameValuePair("json", jsonReq));

      post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));

      HttpResponse response = client.execute(post);
      HttpEntity entity = response.getEntity();
      String entityStr = EntityUtils.toString(entity);

      return entityStr;
     }

     /**
      * 查詢產(chǎn)品客戶經(jīng)理接口
      */
     public void testQueryCustomerManager() throws ClientProtocolException,
       IOException {
      String jsonReq = "{" + "RequestID:'11111',"+ "ProductID:'SC9904348'," + "timestamp:'20120416121200',"
        + "Hashcode:'1324546asdfgfhr65432wsdfgt654eds'" + "}";

      String resStr = this.sendReq("query-customer-manager-json!queryCustomerManager.action", jsonReq);

      System.out.println(resStr);

      assertNotNull(resStr);
    //  JSONObject json = JSONObject.fromObject(resStr);
    //  assertNotNull(json.get("requestID"));
     }

    }

    主站蜘蛛池模板: 亚洲高清中文字幕免费| 免费中文字幕在线| 亚洲日本成本人观看| 国产乱子伦精品免费女| 在线观看免费无码专区| 色偷偷女男人的天堂亚洲网| 亚洲av日韩片在线观看| 免费无码毛片一区二区APP| 亚洲色大情网站www| 亚洲精品字幕在线观看| 最近的免费中文字幕视频| 四虎国产精品永免费| 亚洲成人黄色在线| 国产精品亚洲αv天堂无码| 久草视频在线免费| 人妻18毛片a级毛片免费看| 亚洲国产日韩在线人成下载| 亚洲一级特黄大片在线观看| 中文字幕无码播放免费| 久99久无码精品视频免费播放| 久久精品国产亚洲AV久| 亚洲色WWW成人永久网址| 韩国日本好看电影免费看| 一级毛片**不卡免费播| 暖暖免费中文在线日本| 亚洲日本人成中文字幕| 亚洲大尺度无码无码专区| 免费在线视频一区| 欧美a级在线现免费观看| 中文字幕乱码一区二区免费| 国内成人精品亚洲日本语音| 亚洲大香伊人蕉在人依线| 亚洲va久久久噜噜噜久久天堂| mm1313亚洲精品国产| 在线播放免费人成视频在线观看| 亚洲视频在线免费观看| 大地资源网高清在线观看免费| 全黄A免费一级毛片| 亚洲一区二区三区写真 | 久久久久亚洲AV成人片| 亚洲综合国产精品第一页|