WSDL到Java-客户端创建错误 [英] WSDL to Java -client creation error

查看:154
本文介绍了WSDL到Java-客户端创建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从WSDL创建Web服务,但反复出现以下错误.尝试在构建路径中刷新axis.jar,但仍给出相同的错误,而我有另一个WSDL,并且很好地为此生成了客户端.

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从WSDL生成Java时出错:WSDLException(在 /definitions/types/xsd:schema):faultCode = OTHER_ERROR:错误 试图解析引用的架构时发生 '@ sp.schema.url @/FinancialStatement.xsd',相对于 '文件:/C:/hrishi_workspace/findata/web/wsdl/FinancialStatement.wsdl'.: 找不到此文件: 文件:/C:/hrishi_workspace/findata/web/wsdl/@sp.schema.url@/FinancialStatement.xsd: java.io.FileNotFoundException:找不到此文件: 文件:/C:/hrishi_workspace/findata/web/wsdl/@sp.schema.url@/FinancialStatement.xsd 在com.ibm.wsdl.util.StringUtils.getContentAsInputStream(未知 com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema上的源代码(未知) com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema上的源代码(未知) com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes上的源)(未知源) 在com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(未知来源) 在com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(未知来源)处 com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(未知源)位于 com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(来源未知) org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516) 在 org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495) 在org.apache.axis.wsdl.gen.Parser $ WSDLRunnable.run(Parser.java:361)

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)

谢谢.

Rishi

推荐答案

似乎您的文件:/C:/hrishi_workspace/findata/web/wsdl/FinancialStatement.wsdl正在引用外部架构文件.如果您查看该WSDL文件,则在definitions/types/xsd:schema元素下,您将具有一个或多个xsd:include和/或xsd:import.这些元素可以具有schemaLocation属性.寻找以 FinancialStatement.xsd 结尾的那个;我怀疑其中有 @ sp.schema.url @ ,在我看来,它可能是一个占位符,可能应该由您的构建脚本或其他东西更改了. WSDL和XSD之间的路径;如果它们在同一文件夹中,则只需使用XSD文件名.它应该注意错误.一旦起作用,您应该尝试了解该占位符的含义,并可能弄清楚需要在特定环境中进行配置以使其像这样工作的地方...

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...

这篇关于WSDL到Java-客户端创建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆