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

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

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

    少年阿賓

    那些青春的歲月

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      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;
     }

     /**
      * 查詢產品客戶經理接口
      */
     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"));
     }

    }

    主站蜘蛛池模板: 亚洲熟妇无码久久精品| 亚洲最大视频网站| 国产精品手机在线亚洲| 无人在线观看免费高清视频 | 国产成人青青热久免费精品| 亚洲午夜电影在线观看高清 | 欧洲亚洲国产精华液| 成人午夜性A级毛片免费| 亚洲av永久综合在线观看尤物| 国产偷国产偷亚洲高清人 | 国产免费人成在线视频| 亚洲欧美日韩综合俺去了| 全免费a级毛片免费看无码| 亚洲精品制服丝袜四区| 国产成人精品免费视频大全| 国产亚洲美女精品久久久| 国产午夜精品理论片免费观看| 亚洲色偷拍另类无码专区| 污视频在线免费观看| 亚洲综合国产精品| 色妞WWW精品免费视频| 综合一区自拍亚洲综合图区| 99久久国产免费中文无字幕| 亚洲欧洲中文日韩av乱码| ass亚洲**毛茸茸pics| 四虎成人免费网址在线| 有码人妻在线免费看片| 国产亚洲一区二区在线观看| 99久久免费中文字幕精品| 亚洲熟妇无码AV| 91久久精品国产免费直播| 色噜噜AV亚洲色一区二区| 亚洲免费在线播放| 亚洲国产午夜精品理论片在线播放 | 成人久久久观看免费毛片| 精品亚洲综合久久中文字幕| 国产成人无码精品久久久免费| 亚洲AV无码久久精品成人| 国产99久久久久久免费看| 亚洲图片校园春色| 亚洲AV无码乱码精品国产|