• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to generalize service version checking?

 
Kousik Majumder
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using SOAP WS and using dozer mapping for schema to entity and vice versa conversion. For those cases where I need to write custom converter I need to add code for schema version checking to convert the value. So what is happening is that each time i need to add code when there is a new schema version is coming into picture.

Is there a way to make it generalize it so that each time I do not need to add code when the version changes?


 
Vijitha Kumara
Bartender
Posts: 3952
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may depend on how you use this and what data provided etc... How do you retrieve the version now? Can it be made configurable (or read from a properties file of some sort etc...)?
 
Kousik Majumder
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply Vijitha. If you look into below code snippet of the custom converter you will see the comments where there are schema specific checking is done. If a new schema is added then a new 'else if' logic needs to be added. That is what I want to streamline.
Is there a way to do it?

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!