wood burning stoves*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsdl schema validation and validation message" Watch "wsdl schema validation and validation message" New topic

wsdl schema validation and validation message

Mohit Sinha
Ranch Hand

Joined: Nov 29, 2004
Posts: 125

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.

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
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: 395
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.
subject: wsdl schema validation and validation message
Similar Threads
WSDL parse error
soap fault return empty <detail> element.
Doubt in WSDL import element
Error: no SOAPAction header!
Using a tomcat-based web service in .NET