簡體   English   中英

使用wsimport生成的Web服務客戶端時獲得空響應

[英]Getting a null response when using a wsimport generated web service client

我使用wsimport生成了一個Web服務客戶端。 但是,當調用該服務時,結果為無。 關於使用wsimport的教程似乎有很多,但是關於使用生成的客戶端的教程卻幾乎沒有。

調用客戶端的代碼如下所示:

URL wsdl = new URL("http:example.com:8080/TestServiceWeb/testService.wsdl");
TestService testService = new TestService(wsdl,new QName("http:test.com/test","TestService");

TestServicePortType testServicePort = testService.getTestServicePortSoap11();

TestResult result = testServicePort.doTest();

testServicePort返回的結果為null。 Wireshark數據包嗅探器顯示沒有流量發送到Web服務。

您可以在某個地方托管此Web服務,以便我們進行快速測試嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM