1

我尝试在 Netbean 6.8 中使用 ws-import 生成这一代 java 类。我想重新生成一个 jax-ws,因为在包 ebay.api.paypalapi 中发现了一个错误(我认为该错误是由于来自 Paypal SOAP Api 的 wsdl 文件)。

Netbean 6.8 不允许删除 Generated Souce(jax-ws) 所以我使用基于 www.paypal.com/wsdl/PayPalSvc.wsdl 的 wsdl 重新创建了另一个 ws 文件,但它仍然无法正常工作。

希望有人建议我如何解决这个问题。谢谢。

这是错误代码:

    20-Oct-2012 21:39:18 : Retrieving Location: http://www.paypal.com/wsdl/PayPalSvc.wsdl 

    Retrieved :    https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl 
    Saved at: C:\Documents and Settings\Karen\Desktop\ShoppingCart\src\conf       
    \xml-resources\web-service-references\PayPalSvc\wsdl\www.paypalobjects.com\wsdl\PayPalSvc.wsdl
     Retrieving Location: CoreComponentTypes.xsd 
    Found in document: https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl

    Error: An I/O error occured. Remote host closed connection during handshake
    Retrieving Location: eBLBaseComponents.xsd 
    Found in document: https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl
    Retrieved :    https://www.paypalobjects.com/wsdl/eBLBaseComponents.xsd 
    Saved at: C:\Documents and Settings\Karen\Desktop\ShoppingCart\src\conf     \xml-resources\web-service-        references\PayPalSvc\wsdl\www.paypalobjects.com\wsdl\eBLBaseComponents.xsd
    Retrieving Location: EnhancedDataTypes.xsd 
    Found in document: https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl
    Retrieved :    https://www.paypalobjects.com/wsdl/EnhancedDataTypes.xsd 
    Saved at: C:\Documents and Settings\Karen\Desktop\ShoppingCart\src\conf\xml-resources\web-service-        references\PayPalSvc\wsdl\www.paypalobjects.com\wsdl\EnhancedDataTypes.xsd
    Retrieving Location: CoreComponentTypes.xsd 
    Found in document: https://www.paypalobjects.com/wsdl/eBLBaseComponents.xsd
    Retrieved :    https://www.paypalobjects.com/wsdl/CoreComponentTypes.xsd 
    Saved at: C:\Documents and Settings\Karen\Desktop\ShoppingCart\src\conf \xml-resources\web-service-        references\PayPalSvc\wsdl\www.paypalobjects.com\wsdl\CoreComponentTypes.xsd
    Retrieving Location: EnhancedDataTypes.xsd 
    Found in document: https://www.paypalobjects.com/wsdl/eBLBaseComponents.xsd
    File name already exists with the same content length. Ignoring the file.:
    Retrieving Location: EnhancedDataTypes.xsd 
    Found in document: https://www.paypalobjects.com/wsdl/eBLBaseComponents.xsd
    Retrieving Location: eBLBaseComponents.xsd 
    Found in document: https://www.paypalobjects.com/wsdl/CoreComponentTypes.xsd
    File name already exists with the same content length. Ignoring the file.:
    Retrieving Location: eBLBaseComponents.xsd 
    Found in document: https://www.paypalobjects.com/wsdl/CoreComponentTypes.xsd`
4

2 回答 2

1

wsimport 可以自己手动使用。

尝试下载 wsdl 文件和 wsdl 文件中链接的所有 xsd 文件。将 wsdl 文件保存为 .xml,将 xsd 保存为 .xsd 文件。修改 wsdl 文件以指向本地 xsd 文件。

然后尝试使用以下命令运行 wsimport:-

wsimport -keep -verbose -s 。-d 。-wsdllocation

然后尝试调试。

于 2012-10-24T19:19:19.830 回答
0

查看xsd它们彼此链接的 s 以及导入,当它尝试第二次下载它时会出错。

我会将wsdl所有链接xsd的 s 下载到本地文件夹并尝试从那里生成 Web 服务客户端。如果您的 netbeans 代理生成器太愚蠢而无法处理此递归,请查看axis2。如果您碰巧使用 maven,请查看wdl2code

于 2012-10-21T07:04:12.357 回答