Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Binding java class to schema using castor

 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
just found some info on PayloadValidatingInterceptor. Would the following be the correct approach to validate
sport-service-schema.xsd?



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic