1

每当尝试使用 WSDL 创建代理类时,我都会收到以下异常。

几个观察:-

1) 我的 WSDL 在 xsd http://200.123.23.196:9090 /TOOLBOX/WSDL/temp/temparature.xsd之后指出/导入。如果我从上面的 URL 中使用 wsdl 中的 tempratue.xsd,它总是失败并在 eclipse 中抛出以下异常。

2)如果我尝试从不同的服务器访问相同的 XSD,它会正常工作并创建代理类(temparature.xsd 在不同的服务器上可用)。

3)为什么相同的 XSD 在不同的服务器上表现不同。

4)还有一个观察:- 当我把这个网址放在浏览器http://200.123.23.196:9090 /TOOLBOX/WSDL/temp/temparature.xsd 中时,我无法直接在浏览器中看到 xsd 的内容。而不是使用其他 URL,我可以直接看到内容。

IWAB0399E 从 WSDL 生成 Java 时出错:WSDLException(位于 /definitions/types/schema):faultCode=OTHER_ERROR:尝试解析在“ http://200.123.23.196:9090/TOOLBOX/WSDL/temp/temparature ”中引用的模式时发生错误.xsd',相对于 'file:/D:/workspaces/globice/LAS/xsd/my_ice.wsdl'.: no content-type: java.net.UnknownServiceException: no content-type at java.net.URLConnection.getContentHandler(Unknown来源)在 java.net.URLConnection.getContent(Unknown Source) 在 java.net.URL.getContent(Unknown Source) 在 com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source) 在 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。在 org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495) 在 org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516) 上读取 WSDL(未知来源)。 apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)

等待回复:)

提前感谢山姆

4

1 回答 1

0

这一行:

java.net.UnknownServiceException: no content-type

建议服务器未将内容类型标头设置为application/xmltext/xml以响应“ http://200.123.23.196:9090/TOOLBOX/WSDL/temp/temparature.xsd ”。

你能证实吗?

于 2009-10-09T17:45:47.173 回答