cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: XPath expression as Request Payload in Rest Service endpoint in CXF 2.2
Date Thu, 06 Dec 2012 18:58:06 GMT
Hi
On 06/12/12 17:34, mrkambam wrote:
> Hi Sergey,
>
> I have an interesting requirement that recently propped up. We have a ReST
> endpoint defined with XPath expression as Payload. Based on this XPath
> expression, we need to query database for appropriate resources.
> We are using CXF 2.2.12 as our rest layer. Other technologies in the stack
> are JAXB/ Spring/ Hibernate.
>
> We are familiar with XML or JSON as payload but not XPath as Payload. So how
> do we transform this XPath expression to a meaningful SQL query? . Are there
> any proviisons in CXF that we can leverage?
>

Apparently JCR offers XPath to SQL path:

http://www.day.com/specs/jcr/1.0/6.6.2_XPath_and_SQL.html

I don't know how practical that is but give that a try,

By the way: who is controlling the client producing XPath ? If it is 
under your control, then I'd also recommend looking at FIQL support in CXF:

http://cxf.apache.org/docs/jax-rs-advanced-features.html#JAX-RSAdvancedFeatures-FIQLsearchqueries

a simple expression or a combination of expressions can be captured and 
then converted to SQL or other untyped expressions or to JPA2 Query, etc.

We can review how XPath expressions can be captured with URI & FIQL

Sergey

> Please share if anybody came across this scenario.
>
> Thanks,
> =Mahesh Kambam.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/XPath-expression-as-Request-Payload-in-Rest-Service-endpoint-in-CXF-2-2-tp5719851.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message