Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "error in accessing the webservice " Watch "error in accessing the webservice " New topic
Author

error in accessing the webservice

Satchidananda Mohanty
Ranch Hand

Joined: Mar 12, 2008
Posts: 77

Hi,

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'
line

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.

Thanks,


Zeet

SCJP 6.0
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
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
Greenhorn

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:



Thanks
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.

Thanks,
Damian Cardozo
Greenhorn

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

Damian
Utkarsh Jauhari
Greenhorn

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.

Regards,
Utkarsh
g tsuji
Ranch Hand

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