Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring-ws marshalling/unmarshalling

 
Mina Daoud
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi experts,

I am quite new to spring-WS so please bare with me.
Currently my employer use Spring-WS heavily and use JDom to unmarshall the request soap message. The problem here is every single endpoint has few lines to read the request fields. For example, this is the beginning of the method:

So it is 7 lines for 2 fields, what about 10 fields!! I decided to look at the options i can go for, i found that spring supports JIBX, Castor, and XStream but as i am newbie i am bit lost and don't know which one to select!
Based on your experience guys, which option is the more flexible and reduce as much as possible the repeated code?

Thanks,
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a lot of XML binding technologies out there see this list:

XML Binding Technologies

Each have their nuances pros/cons I have personally used jibx, jaxb and xmlbeans and they all were able to get the job done. Which ever one you use I would definitely take a look at Spring OXM for marshalling and unmarshalling.

Spring OXM Example
 
Mina Daoud
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill Gorder wrote:There are a lot of XML binding technologies out there see this list:

XML Binding Technologies

Each have their nuances pros/cons I have personally used jibx, jaxb and xmlbeans and they all were able to get the job done. Which ever one you use I would definitely take a look at Spring OXM for marshalling and unmarshalling.

Spring OXM Example


Thanks for the useful links! I had a look and i decided to use xmlBeans as it has full schema support!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic