URL wsUrl =新しいURL(URL); HttpURLConnectionのCONN =(HttpURLConnectionの)wsUrl.openConnection(); conn.setDoInput(真の); conn.setDoOutput(真の); conn.setRequestMethod( "POST"); conn.setRequestProperty( "コンテンツタイプ"、 "アプリケーション/ JSON;のcharset = UTF-8"); // conn.setRequestProperty( "認可"、 "ベアラ" + authTokenService.getSysAuthToken(リクエスト、レスポンス))。 OutputStreamのOS = conn.getOutputStream()。 文字列JSON = JsonUtil.objectToJsonStr(マップ) //logger.error("============="+JsonUtil.objectToJsonStr(map)); //转换为字节数组 //するSystem.out.println( "==============" + JSON)。 //バイト[]データ=(json.toString())GetBytesメソッド()。 os.write((json.toString())GetBytesメソッド( "UTF-8")); logger.error( "=============" + JSON)。 INTコード= conn.getResponseCode()。 System.out.println(conn.getResponseMessage())。 System.out.println(コード+ "------------------------------------")。 (コード== 200){場合 のInputStreamは= conn.getInputStream()です。 ストリング化するJsonResult = getResponseString(です)。 JSONObject jsonre = JSONObject.fromObject(化するJsonResult)。 logger.error( "=============" +化するJsonResult)。 ストリングhandleResult = jsonre.getString( "handleResult");}