I am completely new to web service.
I need to write a leisure web service client for a web service. The web service works great on SoapUI. The WSDL file for the URL is provided to me. But when I add the wsdl file to the Eclipse project, it gives a compilation error
src-resolve.4.2: Error resolving component 'xs:schema'. It was detected that 'xs:schema' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///E:/Ashish%20Workspace/HATStoLSAMS%20Webservice/HATS2LSAMSWS/WebContent/WEB-INF/wsdl/CorpsiteService.svc.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:schema' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///E:/Ashish%20Workspace/HATStoLSAMS%20Webservice/HATS2LSAMSWS/WebContent/WEB-INF/wsdl/CorpsiteService.svc.wsdl'.
I searched a lot to get rid of this error, but nothing worked. If I ignore the errors and try to create stubs using the wsimport commands, as well as the wsdl2java commands, it gives an error
[ERROR] undefined element declaration 'xs:schema' line 1 of http:
I use the command below to create stubs
wsimport -de:\test -s E:\wssrc http://chec.local/STAR.WCF/CorpsiteService.svc?singlewsdl -wsdllocation "../../../../../WEB-INF/wsdl/CorpsiteService.svc.wsdl"
I was stuck at this point and struggled to do this all day. Any help in this regard would be really helpful.
A nigdikar
source share