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

@SchemaValidation on XSD JAX-WS 2.1.4 for WEBSERVICE :faultstring Intepretation

 
prince davies
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I turned on @SchemaValidation on my CreditAssessmentServicePortImpl
class,I am getting
<faultcode>S:Server</faultcode>
<faultstring>com.sun.istack.XMLStreamException2:
org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'.</faultstring>

There are many fields in my XSD,How do I find out which field causes this exception?
This exception stack trace does not say about which field it is.Can you please help me out to resolve this issue?





/**
* This class was generated by the JAX-WS RI.
* Oracle JAX-WS 2.1.4
* Generated source version: 2.1
*
*/






 
prince davies
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I spot that error in my XSD?
 
R Srini
Ranch Hand
Posts: 215
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. You can tell JAXP to print debug information by running your program like this:

java -Djaxp.debug=1 YourProgram param1 param2

(or maybe jaxp.debug=true)

When I needed to do this, I had the generated JAXB code available. So I debugged it one step at a time. In your case, you could consider putting breakpoints on wherever your integer fields are being parsed.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic