2016-04-26 1 views
0

の問題があります。サービス魔法使いは、本体にはかなり単純なXMLを返していますが、 "ns:responses"タグには非常に大きなテキストがあります - IE/Chromeでは約です。 40KB、しかしHttpClientをして、私は取得しています:Jakarta HttpClientのタグサイズが

<ns:InvokeResponse xmlns:ns="..."> 
<ns:return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns:ServiceResponse"> 
<ns:responses>TOO MANY CHARACTERS</ns:responses> 
<ns:returnCode>0</ns:returnCode> 
</ns:return> 
</ns:InvokeResponse> 

私はHttpClientを例からのコードを使用しています:

CloseableHttpClient httpclient = HttpClients.createMinimal(); 
try { 
    HttpGet httpGet = new HttpGet(request); 
    CloseableHttpResponse response1 = httpclient.execute(httpGet); 

    try { 
     System.out.println(response1.getStatusLine()); 
     HttpEntity entity1 = response1.getEntity(); 

     entity1.writeTo(new FileOutputStream("out.txt")); 

     EntityUtils.consume(entity1); 
    } finally { 
     response1.close(); 
    } 
} finally { 
    httpclient.close(); 
} 

どのようにライブラリが正しくの大きな塊を読み取ることを改善することができるかもしれないものの任意のアイデア文字が1つのタグに含まれているため、「TOO MANY CHARACTERS」ではなく正しいデータがありますか?

答えて

0

アプリケーション/ライブラリは問題ありません。これはURLのエラーで、答えはサーバーからの正解でした。