wsdl java客户端,WSDL到Java-客户端创建错误

I am trying to create a web service from the WSDL but is repeatedly giving me the following error. Tried refreshing axis.jar in the build path but is still giving same error whereas I have another WSDL and client is very well being generated for the same.

Anyone here who has encountered something similar?

IWAB0399E Error in generating Java from WSDL: WSDLException (at

/definitions/types/xsd:schema): faultCode=OTHER_ERROR: An error

occurred trying to resolve schema referenced at

'@sp.schema.url@/FinancialStatement.xsd', relative to

'file:/C:/hrishi_workspace/findata/web/wsdl/FinancialStatement.wsdl'.:

This file was not found:

file:/C:/hrishi_workspace/findata/web/wsdl/@sp.schema.url@/FinancialStatement.xsd:

java.io.FileNotFoundException: This file was not found:

file:/C:/hrishi_workspace/findata/web/wsdl/@sp.schema.url@/FinancialStatement.xsd

at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown

Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown

Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown

Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)

at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)

at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at

com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at

com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at

org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)

at

org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)

at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)

Thanks.

Rishi

解决方案

It looks as if your file:/C:/hrishi_workspace/findata/web/wsdl/FinancialStatement.wsdl is making a reference to an external schema file. If you look inside that WSDL file, under the definitions/types/xsd:schema element, you'll have one or more xsd:include and/or xsd:import. These elements may have a schemaLocation attribute; look for the one that ends in FinancialStatement.xsd; I suspect it has the @sp.schema.url@ in there which to me looks like a placeholder that is probably supposed to be changed by your build script or something else... Replace that with the relative path between the WSDL and XSD; if they are in the same folder, simply use the XSD file name. It should take care of the error. Once it works, you should try to understand what's with that placeholder, and maybe figure out what you need to configure in your particular environment to make it work like that...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值