Internal Connector Error (1002) - HTTP 1002 (The calling thread timed out while
用Java调用Restlet框架接口时报
Internal Connector Error (1002) - HTTP 1002 (The calling thread timed out while waiting for a response to unblock it
调用代码如下:
ClientResource client1 = new ClientResource(url1);//url1调用地址
Form form1 = new Form();
form1.add("CityID","22");
form1.add("Supplier","HW");
try {
System.out.println(client1.post(form1.getWebRepresentation()).getText());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
catch(Exception e)
{
// 这里就抛异常,Internal Connector Error (1002) - HTTP 1002 (The calling thread timed out while waiting for a response to unblock it 应该是超时了
System.out.println(e.getMessage());
}
请问有人知道怎么解决么?