2014-01-28 39 views
1

我想連接到eBay API。我下載了WSDL from their sitewsdl2java存在地址時端口地址無效

我可以看到地址是否存在:

<wsdl:service name="FindingService"> 
     <wsdl:documentation> 
      <Version>1.12.0</Version> 
     </wsdl:documentation> 
     <wsdl:port name="FindingServiceSOAPPort" 
      binding="tns:FindingServiceSOAPBinding"> 
      <soap12:address 
       xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
       location="https://svcs.ebay.com/services/search/FindingService/v1"/> 
     </wsdl:port> 
    </wsdl:service> 

然而,當我嘗試在Eclipse中創建一個新的Web服務客戶端項目中,我得到:

IWAB0399E Error in generating Java from WSDL: java.io.IOException: 
Emitter failure. Cannot find endpoint address in port FindingServiceSOAPPort 
in service FindingServiceLocator 

有什麼事情是問題嗎?

回答

3

我面臨同樣的問題,同時使用Axis而不是Axis2wsdl2java世代。你必須用Axis2而不是Axis來嘗試它 - 早些時候我也遇到了類似的超時和發射器異常,這些異常是通過切換到Axis2來排序的。

在下面的示例截圖,我用你的例子WSDL,並能夠生成客戶端類,如下:

  1. 設置你的Axis2了 - download從這裏
  2. 關聯的Axis2運行到下載目錄 enter image description here

  3. 在Eclipse中創建 一個

  4. 確保選擇一個Dynamic Web Module version(如:2.5到3.0的原因與Axis2的衝突) enter image description here

  5. 創建的項目中選擇Web Service Client enter image description here

  6. 確保接Web service Runtime as Apache Axis2 enter image description here

  7. 瞧,您距離生成您的客戶類還有一步! enter image description here

1

我相信網址存在一些問題,我看到他們的沙箱服務已啓動並正在運行在http://svcs.sandbox.ebay.com/services/search/FindingService/v1。也許你可以嘗試使用沙箱創建項目並查看它是否可行,然後聯繫webservice提供商以獲取實際問題。

您可以嘗試在SOAP-UI中導入項目,確保生產端點URL將失敗,並且沙箱將工作。看起來WSDL2Java工具沒有問題。

+0

您好,感謝您怎麼看,其他的網址是錯的?我收到了https://svcs.ebay.com/services/search/FindingService/v1和沙箱 – Dejell

+0

的相同響應,我也嘗試使用沙盒網址,但它不起作用 – Dejell

+0

http://svcs.sandbox。 ebay.com/services/search/FindingService/v1?wsdl提供描述符信息,而svcs.ebay.com/services/search/FindingService/v1?wsdl不起作用。 – user1339772