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 "Agarwal, Naresh" <na...@informatica.com> on 2003/12/13 20:08:05 UTC

Problem in getting unparsed raw XML from AXIS

Hi
 
Is there a way to get raw and unparsed request XML from AXIS (for message style services)?
 
I tried getting it by using the following in invoke method of a "handler provider" (a provider, which is implemented as a handler) 
 
msgContext.getCurrentMessage().writeTo(outStream) 
 
But it seems that the AXIS is parsing the XML before I'm extracting it. I want to parse the XML myself and thus want to get the unparsed XML to eliminate the overhead of parsing done by AXIS.
 
thanks,
Naresh

Re: Problem in getting unparsed raw XML from AXIS

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
you should be able to get unparsed stream if you put your code in 
servlet before it is handled to AXIS - did you try this approach?

thanks,

alek

Dimuthu Leelarathne wrote:

>Hi Naresh,
>
>Right now I don't think there is a way you can get untouched stream,
>because Axis begins processing a SOAP message by parsing it using SAX and
>then it stores these SAX events. Then Axis work on these stored SAX
>events.
>So if you really, really want to do this - you have to start parsing
>before SAX parser is called.
>
>So even when we use message style, practically what we get is already
>parsed XML in a DOM structure.
>
>Anyway this is a good question, because it's my personal belief that we
>should do something about this.
>
>Regards,
>Dimuthu.
>  
>


-- 
The best way to predict the future is to invent it - Alan Kay



Re: Problem in getting unparsed raw XML from AXIS

Posted by Dimuthu Leelarathne <mu...@opensource.lk>.
Hi Naresh,

Right now I don't think there is a way you can get untouched stream,
because Axis begins processing a SOAP message by parsing it using SAX and
then it stores these SAX events. Then Axis work on these stored SAX
events.
So if you really, really want to do this - you have to start parsing
before SAX parser is called.

So even when we use message style, practically what we get is already
parsed XML in a DOM structure.

Anyway this is a good question, because it's my personal belief that we
should do something about this.

Regards,
Dimuthu.
-- 
Lanka Software Foundation. Proud to be a part of it. 
http://www.opensource.lk

> Hi
>
> Is there a way to get raw and unparsed request XML from AXIS (for
> message style services)?
>
> I tried getting it by using the following in invoke method of a "handler
> provider" (a provider, which is implemented as a handler)
>
> msgContext.getCurrentMessage().writeTo(outStream)
>
> But it seems that the AXIS is parsing the XML before I'm extracting it.
> I want to parse the XML myself and thus want to get the unparsed XML to
> eliminate the overhead of parsing done by AXIS.
>
> thanks,
> Naresh




RE: Problem in getting unparsed raw XML from AXIS

Posted by Bhuvan Gupta <bh...@fiorano.com>.
Naresh, 

If you want to parse the request your self , 
then any specific reason for using AXIS ? you can simply use a webserver to 
receive the HTTP request, get the SOAP request out of it and  then parse it
your self.

Thanks 

-----Original Message-----
From: Agarwal, Naresh [mailto:nagarwal@informatica.com] 
Sent: Saturday, December 13, 2003 11:08 AM
To: axis-user@ws.apache.org
Subject: Problem in getting unparsed raw XML from AXIS

Hi
 
Is there a way to get raw and unparsed request XML from AXIS (for message
style services)?
 
I tried getting it by using the following in invoke method of a "handler
provider" (a provider, which is implemented as a handler) 
 
msgContext.getCurrentMessage().writeTo(outStream) 
 
But it seems that the AXIS is parsing the XML before I'm extracting it. I
want to parse the XML myself and thus want to get the unparsed XML to
eliminate the overhead of parsing done by AXIS.
 
thanks,
Naresh