简体   繁体   中英

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.

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? The WSDL passes validation, which is even more strange.

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.

Thanks in advance for any guidance!

When you look at the xsd on line 30 you see the following line:

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

在此处输入图片说明

This element is referring to a simple or complex type called 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. For example the responses are just empty <s:any/> tags.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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