Hi Nomen,
This is possible, but quite an amount of work: You'd have to replace one
(or both of) SOAP::WSDL::Expat::MessageParser (the parser processing the
SOAP message), and (maybe) SOAP::WSDL::Transport::HTTP (which subclasses
LWP::UserAgent).
LWP::UserAgent allows setting a callback for processing chunks of HTTP
responses, and XML::Parser used by SOAP::WSDL::Expat::MessageParser
(well, actually it uses the low-level parser XML::Parser::Expat) is a
callback-based stream parser which can parse chunks of XML.
So, by replacing one both, you could build applications which either
stores the response to disk, or just process parts of it (like only
processing phone numbers from a list of complete address data sets).
I won't include this in SOAP::WSDL, though, as applications designed
that way are basically event-based (the parser has to fire an
appropriate event when the XML chunk in question has been found), while
SOAP::WSDL fosters a document based request/response scheme.
Moreover, using chunked XML parsing and LWP::UserAgent callbacks does
not yield performance gains (on reasonable hardware) for SOAP responses
<=1MB.
Martin
Am Sonntag, den 12.10.2008, 06:21 -0400 schrieb Nomen Nescio via RT:
Show quoted text> Sun Oct 12 06:20:58 2008: Request 39982 was acted upon.
> Transaction: Ticket created by nobody@dizum.com
> Queue: SOAP-WSDL
> Subject: feature request: options for dealing with large responses
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: nobody@dizum.com
> Status: new
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=39982 >
>
>
> would it be possble to support the ability to use callbacks or
> temporary files when dealing with large messages? i'd like to
> avoid having to load the entire message into memory if possible.
>
> thanks
>
>