Hi Dan,

Is there a way to do something similar to this on the client side?  For
example, instead of marshalling the response to a Java object, is there a
way to gain access to the XMLInputStream before the data is marshaled and
write the response to a file?  This would minimize the memory usage that I
currently have using the DomInHandler and LoggerHandler.

-----Original Message-----
From: Dan Diephouse [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 28, 2006 1:26 PM
To: [email protected]
Subject: Re: [xfire-user] Probably FAQs...

Hi Jem,

Answers inline...

On 12/28/06, Day, Jem BGI SF <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've tried looking through the code and docs and can't (obviously) find
> an answer to my questions - maybe I'm just getting old :-(
>
> 1. I'm looking for a way to invoke a method that returns XML content
> rather than Java objects for serialization into the soap body (i.e.
> retrieved from an XML database/store).


If you wanted to access the stream readers, you could implement a
service like this:

public class MyService {
public XMLStreamReader invoke(XMLStreamReader) {
}
}

The returning XMLStreamReader would then be copied to the
XMLStreamWriter. For returning data you might want to consider writing
your own custom type. I think there is an example here:

http://xfire.codehaus.org/Custom+Types

> 2. I'm also looking for a way to 'stream' resultant objects rather than
> building a large collection of objects and then marshalling them in one
> go. i.e. if I have a service method that returns a collection (or list)
> I'd like to be able to marshal the objects as they are being realized.

Well I think you have two options here. First you could use the
incoming XMLStreamReader and then convert portions of that to
databound objects. Second, you could use a custom type and return a
reference to the data as outlined in the example I mentioned above.

Hope that helps.

 Regards,
 Dan

-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to