2014-01-28 45 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