You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Håkon Sagehaug <ha...@googlemail.com> on 2008/08/25 17:31:27 UTC

Getting the raw xml from client.invoke()

Hi all,

I was wondering if it's possible to get the raw xml from the
Client.invoke(...) method

cheers, Håkon

-- 
Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)

Re: Getting the raw xml from client.invoke()

Posted by Amar Das <am...@gmail.com>.
Thanks Daniel, I am trying to add an interceptor, do you think I will be
able to change the xml string n the interception and pass to the service
call ?
 Something line "&lt;" in place of "<" in the xml.

Amar

On Thu, Apr 12, 2012 at 12:43 PM, Daniel Kulp <dk...@apache.org> wrote:

> On Tuesday, April 10, 2012 09:52:00 AM amardas wrote:
> > Hi Daniel,
> >
> > Do you have smaple code to allow raw xml passed to a service call?
>
> The only way to get the raw XML stuff is to use a Provider based service or
> to use a javax.xml.transform.Source object as the parameter.    You
> definitely won't be able to use a "String" for that as that will be treated
> as an xsi:string type thing.
>
> Note: if you are starting from a WSDL, you could try adding the "-db
> source"
> flags to the command to generate code that would use the Source as
> params/returns.   Not sure if that's what you want though.
>
>
> Dan
>
>
>
> >
> > Thanks,
> > Amar
> >
> > --
> > View this message in context:
> >
> http://cxf.547215.n5.nabble.com/Getting-the-raw-xml-from-client-invoke-tp
> > 553179p5630510.html Sent from the cxf-user mailing list archive at
> > Nabble.com.
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Re: Getting the raw xml from client.invoke()

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, April 10, 2012 09:52:00 AM amardas wrote:
> Hi Daniel,
> 
> Do you have smaple code to allow raw xml passed to a service call?

The only way to get the raw XML stuff is to use a Provider based service or 
to use a javax.xml.transform.Source object as the parameter.    You 
definitely won't be able to use a "String" for that as that will be treated 
as an xsi:string type thing.

Note: if you are starting from a WSDL, you could try adding the "-db source" 
flags to the command to generate code that would use the Source as 
params/returns.   Not sure if that's what you want though.


Dan



> 
> Thanks,
> Amar
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Getting-the-raw-xml-from-client-invoke-tp
> 553179p5630510.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Getting the raw xml from client.invoke()

Posted by amardas <am...@gmail.com>.
Hi Daniel,

Do you have smaple code to allow raw xml passed to a service call?

Thanks,
Amar

--
View this message in context: http://cxf.547215.n5.nabble.com/Getting-the-raw-xml-from-client-invoke-tp553179p5630510.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Getting the raw xml from client.invoke()

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 25 August 2008 11:31:27 am Håkon Sagehaug wrote:
> Hi all,
>
> I was wondering if it's possible to get the raw xml from the
> Client.invoke(...) method
>
> cheers, Håkon

By default, no.   We don't keep the XML around at all in the normal case.   We 
StAX parse the stream so the raw xml data gets discarded as soon as its read.   
You can configure something like the SAAJInInterceptor to parse it to an SAAJ 
model and then throw your own interceptor that would set it onto a property 
on the message that you could then retrieve.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog