日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Exception in thread main com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport e

發布時間:2023/12/10 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Exception in thread main com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport e 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

摘要:在調用webservice客戶端代碼的時候報如下錯誤

Invoking reportLossByRdid... Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.UnknownHostException: opacat com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:117)at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:194)at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:122)at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:95)at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:626)at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:585)at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:570)at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:467)at com.sun.xml.internal.ws.client.Stub.process(Stub.java:308)at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:163)at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:135)at com.sun.proxy.$Proxy30.reportLossByRdid(Unknown Source)at com.qdexam.ReaderWebservice_ReaderWebservicePort_Client.main(ReaderWebservice_ReaderWebservicePort_Client.java:60) Caused by: java.net.UnknownHostException: opacat java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)at java.net.Socket.connect(Socket.java:579)at java.net.Socket.connect(Socket.java:528)at sun.net.NetworkClient.doConnect(NetworkClient.java:180)at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)at sun.net.www.http.HttpClient.New(HttpClient.java:308)at sun.net.www.http.HttpClient.New(HttpClient.java:326)at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:975)at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1091)at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:105)... 14 more
一:問題原因

無法解析該域名,可以將域名對應的ip寫入到hosts文件中保存。


二:解決辦法:

將域名對應的ip寫入到hosts文件中保存

Windows的hosts文件在“C:\windows\system32\drivers\etc”中。

Linux更改hosts的操作如下:

cd /etc/

vi hosts

輸入如下:

# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host# localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost211.151.71.11 opac


創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的Exception in thread main com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport e的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。