ANT在WSDL生成的文件中构建抛出错误

时间:2011-10-28 18:41:02

标签: java web-services ant wsdl websphere

我正在使用ANT来构建我的项目。它似乎在从WSDL自动生成的文件中抛出以下错误。

[javac] C:\Documents and Settings\Administrator\IBM\rationalsdp\workspace\BH\CPEr16Portal\source\com\ibm\cpe\bhwebservices\mdm\CPE6SOAP_HTTP_BindingStub.java:316: setUse(com.ibm.ws.webservices.engine.enum.Use) in com.ibm.ws.webservices.engine.description.OperationDesc cannot be applied to (com.ibm.ws.webservices.engine.enumtype.Use)
[javac]         _createUpdateContactPersonOperation0.setUse(com.ibm.ws.webservices.engine.enumtype.Use.LITERAL);
[javac]                                             ^
[javac] C:\Documents and Settings\Administrator\IBM\rationalsdp\workspace\BH\CPEr16Portal\source\com\ibm\cpe\bhwebservices\mdm\CPE6SOAP_HTTP_BindingStub.java:317: setStyle(com.ibm.ws.webservices.engine.enum.Style) in com.ibm.ws.webservices.engine.description.OperationDesc cannot be applied to (com.ibm.ws.webservices.engine.enumtype.Style)
[javac]         _createUpdateContactPersonOperation0.setStyle(com.ibm.ws.webservices.engine.enumtype.Style.DOCUMENT);
[javac]                                             ^
[javac] C:\Documents and Settings\Administrator\IBM\rationalsdp\workspace\BH\CPEr16Portal\source\com\ibm\cpe\bhwebservices\mdm\CPE6SOAP_HTTP_BindingStub.java:331: cannot find symbol
[javac] symbol  : variable SEND_TYPE_ATTR_PROPERTY
[javac] location: class com.ibm.wsspi.webservices.Constants
[javac]             mc.setProperty(com.ibm.wsspi.webservices.Constants.SEND_TYPE_ATTR_PROPERTY, Boolean.FALSE);
[javac]                                                               ^
[javac] C:\Documents and Settings\Administrator\IBM\rationalsdp\workspace\BH\CPEr16Portal\source\com\ibm\cpe\bhwebservices\mdm\CPE6SOAP_HTTP_BindingStub.java:332: cannot find symbol
[javac] symbol  : variable ENGINE_DO_MULTI_REFS_PROPERTY
[javac] location: class com.ibm.wsspi.webservices.Constants
[javac]             mc.setProperty(com.ibm.wsspi.webservices.Constants.ENGINE_DO_MULTI_REFS_PROPERTY, Boolean.FALSE);
[javac]                                                               ^
[javac] C:\Documents and Settings\Administrator\IBM\rationalsdp\workspace\BH\CPEr16Portal\source\com\ibm\cpe\bhwebservices\mdm\CPE6SOAP_HTTP_ServiceInformation.java:58: setStyle(com.ibm.ws.webservices.engine.enum.Style) in com.ibm.ws.webservices.engine.description.OperationDesc cannot be applied to (com.ibm.ws.webservices.engine.enumtype.Style)
[javac]         createUpdateContactPerson0Op.setStyle(com.ibm.ws.webservices.engine.enumtype.Style.DOCUMENT);
[javac]                                     ^
[javac] Note: * uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 5 errors

显然,当错误显示找不到符号时,表示找不到相应的java类..但是这些不会在RAD中抛出错误。并且必要的java文件WAS6.1 thinclient.jar存在于构建路径中。所以我很困惑为什么构建失败了?

如果我遗漏某些内容并且需要在ANT构建文件中添加任何内容以使其正确构建,有人可以指导我。

此致 Snehan Solomon

1 个答案:

答案 0 :(得分:0)

在ANT构建路径中有一些旧版本的jar导致构建失败,删除它们修复了问题,

谢谢Mike。

此致 Snehan Solomon