You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Guy Pardon <gu...@me.com> on 2012/02/15 12:29:39 UTC
Re: JAXWS client with XPath
Thanks,
But isn't there a way to avoid an interceptor here? I mean, getting access to the resulting SOAP response message in the client?
Guy
On 15-feb-2012, at 10:44, Freeman Fang wrote:
Hi,
You can write a customer inInterceptor for client side to do anything you want, of course include the XPath filter operation.
If your requirement is too complex, Apache Camel[1] is more suitable to do it.
[1]http://camel.apache.org/
Freeman
On 2012-2-15, at 下午4:19, Guy Pardon wrote:
> Hi,
>
> Any pointers on how I can write a JAXWS client that uses XPath to filter the response from a service? For instance, to extract only the known content, like in consumer-driven contracts.
>
> Thanks
> Guy
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: JAXWS client with XPath
Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, February 15, 2012 12:29:39 PM Guy Pardon wrote:
> Thanks,
>
> But isn't there a way to avoid an interceptor here? I mean, getting access
> to the resulting SOAP response message in the client?
By default, we stream and thus the resulting SOAP message doesn't exist. You
can configure in the SAAJInInterceptor to build up the SAAJ model, but you
would then still need a very small interceptor that would just do:
message.put("some.key", message.getContent(Docuement.class))
(I think)
to copy it from contents and into the message properties that would be passed
back to the client.
Dan
>
> Guy
>
> On 15-feb-2012, at 10:44, Freeman Fang wrote:
>
> Hi,
>
> You can write a customer inInterceptor for client side to do anything you
> want, of course include the XPath filter operation. If your requirement is
> too complex, Apache Camel[1] is more suitable to do it.
>
> [1]http://camel.apache.org/
>
> Freeman
>
> On 2012-2-15, at 下午4:19, Guy Pardon wrote:
> > Hi,
> >
> > Any pointers on how I can write a JAXWS client that uses XPath to filter
> > the response from a service? For instance, to extract only the known
> > content, like in consumer-driven contracts.
> >
> > Thanks
> > Guy
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: JAXWS client with XPath
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Guy
On 15/02/12 11:29, Guy Pardon wrote:
>
> Thanks,
>
> But isn't there a way to avoid an interceptor here? I mean, getting access to the resulting SOAP response message in the client?
>
I think for JAX-WS you need to use Dispatcher<DOMSource> and use it with
CXF XPathUtils which accepts a Node in one of its methods.
Sergey
> Guy
>
> On 15-feb-2012, at 10:44, Freeman Fang wrote:
>
> Hi,
>
> You can write a customer inInterceptor for client side to do anything you want, of course include the XPath filter operation.
> If your requirement is too complex, Apache Camel[1] is more suitable to do it.
>
> [1]http://camel.apache.org/
>
> Freeman
> On 2012-2-15, at 下午4:19, Guy Pardon wrote:
>
>> Hi,
>>
>> Any pointers on how I can write a JAXWS client that uses XPath to filter the response from a service? For instance, to extract only the known content, like in consumer-driven contracts.
>>
>> Thanks
>> Guy
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com
Re: JAXWS client with XPath
Posted by Glen Mazza <gm...@talend.com>.
Well, a JAX-WS handler if your reason for avoiding interceptors is to
retain portability across other JAX-WS frameworks, or you can use the
Dispatch interface to get the raw SOAP message and parse it. (Links #43
and #52 here: http://www.jroller.com/gmazza/entry/blog_article_index).
Glen
On 02/15/2012 06:29 AM, Guy Pardon wrote:
> Thanks,
>
> But isn't there a way to avoid an interceptor here? I mean, getting access to the resulting SOAP response message in the client?
>
> Guy
>
> On 15-feb-2012, at 10:44, Freeman Fang wrote:
>
> Hi,
>
> You can write a customer inInterceptor for client side to do anything you want, of course include the XPath filter operation.
> If your requirement is too complex, Apache Camel[1] is more suitable to do it.
>
> [1]http://camel.apache.org/
>
> Freeman
> On 2012-2-15, at 下午4:19, Guy Pardon wrote:
>
>> Hi,
>>
>> Any pointers on how I can write a JAXWS client that uses XPath to filter the response from a service? For instance, to extract only the known content, like in consumer-driven contracts.
>>
>> Thanks
>> Guy
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
>
--
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza