int statusCode =0 ;
PostMethod postMethod = new PostMethod(wsdlLocation);
// String soapRequestData = buildRequestData();
byte[] bytes = soapResponseData.getBytes("utf-8");
InputStream inputStream = new ByteArrayInputStream(bytes, 0,
bytes.length);
RequestEntity requestEntity = new InputStreamRequestEntity(inputStream,
bytes.length, "application/soap+xml; charset=utf-8");
postMethod.setRequestEntity(requestEntity);
HttpClient httpClient = new HttpClient();
statusCode = httpClient.executeMethod(postMethod);
soapResponseData = postMethod.getResponseBodyAsString();
return statusCode;
这是代码 报错位置statusCode = httpClient.executeMethod(postMethod);求大神给我解决一下谢谢。
java.net.SocketException: Network is unreachable: connect 原因是我这边网络忽然断开无法连接服务器
答案:2 悬赏:20 手机版
解决时间 2021-03-05 01:29
- 提问者网友:孤山下
- 2021-03-04 21:11
最佳答案
- 五星知识达人网友:旧脸谱
- 2021-03-04 21:42
有一个onClose属性,客户端关闭浏览器的时候执行onClose方法,这时要将session回话关闭。
全部回答
- 1楼网友:野慌
- 2021-03-04 21:53
线程不对,连接不上,检查一下你的sccket或者到网上拷一份
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯