This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Services and the fly likes How should a List of MTOM DataHandler images be represented with jaxb annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How should a List of MTOM DataHandler images be represented with jaxb annotations" Watch "How should a List of MTOM DataHandler images be represented with jaxb annotations" New topic
Author

How should a List of MTOM DataHandler images be represented with jaxb annotations

Chris Riffle
Greenhorn

Joined: Dec 30, 2005
Posts: 18
I'm wanting to leverage MTOM in writing a service with 'java code first' jaxb annotations to deploy to jaxws jbosswsnative on jboss. I understand putting annotations on a 'Single' DataHandler parameter or member variabe as in




I'm hoping to have other operations that use ArrayList as input and output but haven't found examples online for recommendations on how to use jaxb annotations wtih DataHandler(s?) to accomplish this. Would it be advised to put a DataHandler inside an ArrayList as in:




To annotate a pojo to be used as a return type for a service operation -- could I use an ArrayList to store an ArrayList of images:

Thank you
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 471
    
    4
From Doc:

This annotation is used in conjunction with datatypes such as Image or Source that are bound to base64-encoded binary in XML.

1. For me: I define




Some where I use



2. I also used @MTOM feature given JAX-WS 2.x has it.
 
Consider Paul's rocket mass heater.
 
subject: How should a List of MTOM DataHandler images be represented with jaxb annotations