aspose file tools*
The moose likes Web Services and the fly likes wsdl schema validation and validation message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsdl schema validation and validation message" Watch "wsdl schema validation and validation message" New topic
Author

wsdl schema validation and validation message

Mohit Sinha
Ranch Hand

Joined: Nov 29, 2004
Posts: 125
All,

I am using the WSDL first approach for web services development using Apache CXF.
A number of element is the xml schema are mandatory and I have implemented validation using the handler.xml.

The issue I face is I am not able to get which field in the payload is causing the validation error
I get a message something like

<faultstring>cvc-datatype-valid.1.2.1: 'q' is not a valid value for 'integer'.</faultstring>



Let me know your thoughts on how can I go about trapping the exact xml element names in the error message as part of the validation.


Regards,
Mohit Sinha
Ranch Hand

Joined: Nov 29, 2004
Posts: 125
Can someone provide any pointers on how this can be achieved.
I searched a lot but did not seem to be find any helpful example.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
First I would use soapUI to test the web service - if it can issue requests and receive responses then the problem is most likely with the client.
If you need to examine requests and responses to/from the web service, then you can use WireShark or some TCP monitoring tool.
A third alternative is to implement a SOAP message logging handler on the web service side. Such a handler can log incoming and outgoing SOAP messages and thus let you discover where the problem is.
Best wishes!

My free books and tutorials: http://www.slideshare.net/krizsan
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 461
    
    4
Here is the link http://articles.carbonrider.com/2010/03/21/apache-cxf-code-first-schema-validation-demystified/

supporting Ivan's suggestion on using TCP Mon or SOAP UI.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsdl schema validation and validation message