Robert: thanks for your input and I will keep your suggestions about data binding in mind. That aside, how would I do this the more manual way using OMElement? I have a specific schema to adhere to and already have a Java object model in place that I have to work with.
To keep things simple, assume each object in the Collection becomes an XML element in the response payload. I want to be sure that I leverage the strengths of AXIOM/StAX and minimize memory usage. -----Original Message----- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 06, 2008 6:59 PM To: axis-user@ws.apache.org Subject: Re: Basic Axis/Axiom usage question Axiom is a good starting way to get to know Axis2, and in fact is involved in many of the low level parts parts of Axis2. However, if its Java Collections you want, you may consider using one of the higher level databinding API's like adb, xmlbeans, jibx, jaxb etc. Those type of API's can give you Java Collections, and when used in Axis2 code generation, hook into Axiom anyways though at a level you generally don't need to worry about unless there's a bug. When using those with Axis2 you need an xml schema and WSDL, hand generated or via reverse engineering existing code. One way of looking at things is the xml payload sent over the wire is in Arrays suitable for any language, and not just for Java Collections. With databinding, the xml payload is obstenably the same while the code level implemetation varies widely. HTH, Robert On Tue, May 6, 2008 at 5:59 PM, Parham, Clinton <[EMAIL PROTECTED]> wrote: > > > > > Hello. > > > > I'm getting my feet wet with Axis & Axiom and something is just not clicking > for me. Let's say I have a web service method that accepts and returns > OMElements. The web service receives some data and builds a > java.util.Collection of results objects that I need to send back as an XML > payload in the response. > > > > What is the correct (most efficient memory-wise) way to do this? Do I merely > use factory.createOMElement / element.addAttribute to recreate the > Collection objects in XML? Or, do I use something more elaborate like > somehow wrapping the Collection with OMSourcedElementImpl and using > OMDataSource? > > > > Some guidance and pointers to a similar example would be appreciated. > > > > Thank you, > > Clinton > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]