File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes how to implement adapter pattern for JAXB classes in java. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "how to implement adapter pattern for JAXB classes in java." Watch "how to implement adapter pattern for JAXB classes in java." New topic
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
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to implement adapter pattern for JAXB classes in java.