wood burning stoves 2.0*
The moose likes Web Services and the fly likes error in accessing the webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "error in accessing the webservice " Watch "error in accessing the webservice " New topic

error in accessing the webservice

Satchidananda Mohanty
Ranch Hand

Joined: Mar 12, 2008
Posts: 77


I am using netbeans 7.0 and java 6 update 21. While trying to access the webservice client it shows the following errors.

parsing WSDL...

[WARNING] src-resolve: Cannot resolve the name 's1:char' to a(n) 'type definition' component.
line 37 of file:/F:/maxtest/src/conf/xml-resources/web-service-references/xxxxxxxxxxx.asmx.wsdl#types?schema1

[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 'file:/F:/maxtest/src/conf/xml-resources/web-service-references/xxxxxxxxx.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 'file:/F:/maxtest/src/conf/xml-resources/web-service-references/xxxxxxxxxxxxxxxxx.asmx.wsdl#types?schema1'.
line 287 of file:/F:/maxtest/src/conf/xml-resources/web-service-references/xxxxxxxxxxx.asmx.wsdl#types?schema1

[ERROR] undefined element declaration 's:schema'
line 287 of file:/F:/maxtest/src/conf/xml-resources/web-service-references/xxxxxxxxxxxxxxxxxxxxxxxxxx.asmx.wsdl

[ERROR] undefined element declaration 's:schema'
line 304 of file:/F:/maxtest/src/conf/xml-resources/web-service-references/xxxxxxxxxxxxxxxxxxxxxxxxx.asmx.wsdl

[ERROR] undefined element declaration 's:schema'
line 362 of file:/F:/maxtest/src/conf/xml-resources/web-service-references/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.asmx.wsdl

[ERROR] undefined element declaration 's:schema'

and the error pop up is web service client can not created by JAXWS:wsimport utility reason:undefined element declaration 's:schema'

error pop up
In the same application i have used the another webservice before and it works fine.

Please help.



SCJP 6.0
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
There seems to be something wrong with the WSDL. Have you tried to validate it?
Regretfully, I cannot say much more without having seen the WSDL - can you post it here?
Best wishes!

My free books and tutorials: http://www.slideshare.net/krizsan
Satchidananda Mohanty
Ranch Hand

Joined: Mar 12, 2008
Posts: 77

Dear Ivan,

Thanks a lot for your reply.
unfortunately I could not share the url over here . but I can share that with you in private message.

According to you I have validated the xml and it shows the following details.

XML validation started.
Checking file:/F:/maxtest/src/conf/xml-resources/web-service-references/xxxxxxxxxxxxxxxxxxxxxxxxxx.asmx.wsdl...
cvc-elt.1: Cannot find the declaration of element 'wsdl:definitions'. [2]
XML validation finished.

Damian Cardozo

Joined: Aug 04, 2011
Posts: 10
Hello Satchidananda, were you ever able to fix this? I'm having the same issue. It seems that wsimport has problems parsing this:

Satchidananda Mohanty
Ranch Hand

Joined: Mar 12, 2008
Posts: 77

Hello Damian ,

I could not fixed that issue. Because problem was there in the wsdl file with my client. And that version of ASP supports method overloading which is a big problem with my java environment.

Damian Cardozo

Joined: Aug 04, 2011
Posts: 10
Hello! that's bad news... but thanks for replying!

Utkarsh Jauhari

Joined: Jan 12, 2013
Posts: 2
Hi Damian,

I am facing the same issue and getting undefined 's:schema' error. Could you please help us if this issue has been resolved. Or if you have any other alternative for this problem.

g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 499
...and getting undefined 's:schema' error.

You cannot expect otherwise if you have not import the namespace corresponding to http://www.w3.org/2001/XMLSchema.

The schema defines the targetNamespace which is usually not the namespace of the XMLSchema. That's why you use ref to refer the vocabulary of another namespace which happens to be the XMLSchema.

To import it, something like this would be a start.

If validation is needed, you need further have to code an EntityResolver to fetch the schema of schemas, locally or over the net. That's the general setting. The detail? you're on your own.

ps: The query string after ...XMLSchema above is an artifact of the post handling of the forum, not of mine.
Rob Chillingworth

Joined: Sep 27, 2007
Posts: 2
I know this is a little late, but I was having the same issue as above, but using Rational Application Developer. After much searching, I found this article:

Basically, you need to explicitly use a couple of binding references, and that will at least get rid of the errors, so that wsimport will generate / compile the code.

customization.xjb file:

Then run this command (with your service wsdl location):


I agree. Here's the link: http://aspose.com/file-tools
subject: error in accessing the webservice
Similar Threads
Problem generating Client stubs using METRO 2.0 Library and Netbeans 6.9(JAX-WS style)
wsimport failure with .NET 2.0 wsdl
NetBeans Web Service client attempt
Problem when create client for web services because of XSD import url
how to import 2 xsd's which have same namespace?