0
我使用wsimport生成了web服務客戶端。但是,當打電話給服務時,結果是沒有。似乎有很多關於使用wsimport的教程,但幾乎沒有關於使用生成的客戶端的任何教程。使用wsimport生成的Web服務客戶端時得到空響應
調用客戶端的代碼看起來是這樣的:
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返回是空的結果。 Wireshark數據包嗅探器顯示沒有流量正在發送到Web服務。