| Author |
how to implement adapter pattern for JAXB classes in java.
|
muthukumar mahadevan
Greenhorn
Joined: Sep 21, 2011
Posts: 10
|
|
Hi dudes,
I am using REST web service as Client. To handle the REST Response i am using JAXB.
Could you guide me to implement the converted jaxb classes in java by using the adapter design pattern..
Thanks in advance...
|
 |
Shiva.Om Kumar
Ranch Hand
Joined: Jun 14, 2010
Posts: 68
|
|
Adapter on Wiki
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
|
|
Hi!
The "classic approach" is to create one or more XML schemas that describe the data your web service will send and receive.
Then one use the XJC JAXB schema compiler to generate the JAXB bean classes. The XJC schema compiler can be used from Maven or Ant, so it can be part of your build process.
Finally, the JAXB bean classes are used in the code either to interpret received XML or to prepare an object representation of response data, which is later marshalled into XML.
Ask for more details!
Best wishes!
|
My free books and tutorials: http://www.slideshare.net/krizsan
|
 |
muthukumar mahadevan
Greenhorn
Joined: Sep 21, 2011
Posts: 10
|
|
Oh! Thanks a lot.
i got some clear idea now. ill try my level best.
|
 |
 |
|
|
subject: how to implement adapter pattern for JAXB classes in java.
|
|
|