wood burning stoves 2.0*
The moose likes Web Services and the fly likes Binding java class to schema using castor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Binding java class to schema using castor" Watch "Binding java class to schema using castor" New topic
Author

Binding java class to schema using castor

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 232
Hi All,
I have developed a spring web service that uses castor to bind/unbind the request/response objects.
I currently define an enumeration type within my xsd, that restricts the different sport types that
can be searched for (i.e. not sportSearchRequest element sport).
I would like to bind sportCodeTypeEnum to a java class via the mapping file sport-service-mapping.xml.
This will keep my java code inline with the schema. Is this possible?

sport-service-schema.xsd
================


sport-service-mapping.xml


sport-service-context.xml

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 232
Hi All,
just found some info on PayloadValidatingInterceptor. Would the following be the correct approach to validate
sport-service-schema.xsd?



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Binding java class to schema using castor
 
Similar Threads
schema error : undefined value for 'type' encountered
xml schema: child elements in "choice"
Defining XSD for an XML file with constraint on the contents of a tag
WSDL2JAVA Apache axis
Error in xml schema