Hi,

 

I have been using castor in our project from past 4 months.

How do I present to the end user a common format error message for the
following error messages.

ValidationException: The field '_conceptCode' (whose xml name is
'ConceptCode') is a required field of class
'com.wsgc.services.inventory.schema.wrapper.findinventory.FindItemAvailabili
ty;
   - location of error: XPATH: /FindItemAvailability
        at
org.exolab.castor.xml.FieldValidator.validate(FieldValidator.java:209)
        at
org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate(XMLClassDescripto
rImpl.java:1048)
        at org.exolab.castor.xml.Validator.validate(Validator.java:127)
        at
org.exolab.castor.xml.FieldValidator.validateInstance(FieldValidator.java:32
5)
        at
org.exolab.castor.xml.FieldValidator.validate(FieldValidator.java:270)
 
I'd prefer something like:
"Error due to empty concept tag, attribute is missing".
 
I have to perform similar xsd validations,where castor is throwing
unmarshalling exceptions if the elements are not present.
 
I want a common message format how to extract the required details from the
entire exception message
 
Thanks in advance,
aparvatala

 

Reply via email to