You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rumm Nikolaus <ni...@leasfinanz.co.at> on 2005/03/25 19:36:54 UTC

Accessing unparsed XML

I am using Axis for a SOAP client in Java. We need both the parsed
document (for storing parts of it in a database) and the unparsed XML
document (for transforming it into a PDF file using FOP).

Is there any way to access the raw XML response ?

Currently we use Axis in the noob-way (via the generated port objects)
and not using SOAPEnvelope...

Regards
Nikolaus


Re: Accessing unparsed XML

Posted by QM <qm...@brandxdev.net>.
On Fri, Mar 25, 2005 at 07:36:54PM +0100, Rumm Nikolaus wrote:
: I am using Axis for a SOAP client in Java. We need both the parsed
: document (for storing parts of it in a database) and the unparsed XML
: document (for transforming it into a PDF file using FOP).
: 
: Is there any way to access the raw XML response ?

Instead of raw XML, what about the DOM tree (which can easily be serialized
back into raw XML)?

Look into Axis Handlers.  These are not too unlike servlet filters: you
insert them between the request and the service endpoint object (via
server-config.wsdd) and they can inspect/alter the request/response data.

I don't have the exact method names in front of me, but look in the Axis
docs (or just Google) for "Handler."  Handler objects have access to the
MessageContext, which holds (IIRC) the SoapEnvelope object, which in turn
holds the SOAP headers/body.

-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/