简体   繁体   English

wsimport上的WSDL错误

[英]WSDL error on wsimport

I am trying to connect to an old web service and I am getting an error when I autogenerate the classes with wsimport and other tools as well. 我试图连接到旧的Web服务,并且使用wsimport和其他工具自动生成类时遇到错误。

computer-name:tmp me$ wsimport -keep -verbose https://www.entech.us/sigmaaldrich/CarbonFootprintStats.asmx?WSDL
parsing WSDL...

[WARNING] src-resolve.4.2: Error resolving component 's:schema'. It was detected that 's:schema' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'https://www.entech.us/sigmaaldrich/CarbonFootprintStats.asmx?WSDL#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 's:schema' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'https://www.entech.us/sigmaaldrich/CarbonFootprintStats.asmx?WSDL#types?schema1'.
  line 30 of https://www.entech.us/sigmaaldrich/CarbonFootprintStats.asmx?WSDL#types?schema1

[ERROR] undefined element declaration 's:schema'
  line 30 of https://www.entech.us/sigmaaldrich/CarbonFootprintStats.asmx?WSDL

Is the problem that I need to have them edit the WSDL to remove s:schema? 我需要让他们编辑WSDL以删除s:schema的问题吗? The WSDL passes validation, which is even more strange. WSDL通过了验证,这更加奇怪。

I know it is possible to still pull the data as many online SOAP client testing tools and even Eclipse allow me to navigate and execute the methods. 我知道仍然可以提取数据,因为许多在线SOAP客户端测试工具,甚至Eclipse都允许我导航和执行方法。

Thanks in advance for any guidance! 预先感谢您的指导!

When you look at the xsd on line 30 you see the following line: 当您查看第30行的xsd时,您会看到以下行:

<s:element ref="s:schema"/>

在此处输入图片说明

This element is referring to a simple or complex type called s:schema . 该元素是指称为s:schema的简单或复杂类型。 It looks like a bug on that line only.The rest of the WSDL and XSD seems ok but not very well defined. 看起来像是只在那条线上的bug.WSDL和XSD的其余部分似乎还可以,但定义得不太好。 For example the responses are just empty <s:any/> tags. 例如,响应只是空的<s:any/>标签。

They need to clarify why they tried to declare a element to reference something that does not exist. 他们需要弄清楚为什么他们试图声明一个元素来引用不存在的东西。 It really looks like a bug. 它确实看起来像个错误。

The WSDL is NOT WSI compliant by the way. WSDL不符合WSI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM