工行流水查询API求教程

最近企业要做一个工行银行流水查询的功能,查询企业银行账户的收支出情况,做个对账的功能,无从下手,求教

3个回答

public static void main(String[] args) throws IOException {

    String dateString = "<?xml version=\"1.0\" encoding=\"GBK\"?><CMS><eb><pub><TransCode>TEST</TransCode><CIS>400090001604411</CIS><BackCode>SZF</BackCode><ID>null</ID><TranDate>2017-05-04</TranDate><TranTime>145922111222</TranTime><fSeqno>201705040123456</fSeqno></pub><in><AccNo>4000023029200124946</AccNo><AreaCode>SZFH</AreaCode><MinAmt>1</MinAmt><MaxAmt>100000000</MaxAmt></in></eb></CMS>";

    URL url = new URL("http://83.36.2.123:8446");//118.6.13.101:8108//118.6.29.160:8008//114.255.225.58:8446//83.36.2.123:8446
    HttpURLConnection http = (HttpURLConnection) url.openConnection();

    http.setReadTimeout(20000);
    http.setDoOutput(true);
    http.setDoInput(true);
    http.setRequestMethod("POST");

    http.getDefaultRequestProperty("application/x-www-form-urlencoded");
    http.connect();

    String string = getrevFromBASE64(dateString.getBytes());

    OutputStreamWriter out = new OutputStreamWriter(http.getOutputStream());
    out.append(string);
    out.flush();
    out.close();

    InputStreamReader isr = new InputStreamReader(http.getInputStream());

    BufferedReader reader = new BufferedReader(isr);

    String line;
    StringBuffer buffer = new StringBuffer();

    while((line = reader.readLine())!= null ){

        buffer.append(line);
    }

    System.out.println(buffer.toString());


}

直接给我来了个 Connection refused: connect

不是有《银企互联开发手册2016》,所有文档下载下来看看,支持什么语言,什么协议,什么格式。

立即提问
相关内容推荐