File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error in accessing the webservice

 
Satchidananda Mohanty
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Satchidananda Mohanty
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 78
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! that's bad news... but thanks for replying!

Damian
 
Utkarsh Jauhari
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 650
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...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
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
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:
http://stackoverflow.com/questions/18898261/undefined-element-declaration-xsschema

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):


Regards,

Rob.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic