cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5309) Support Bean Validation API for JAX-RS
Date Tue, 08 Oct 2013 13:26:42 GMT

    [ https://issues.apache.org/jira/browse/CXF-5309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13789196#comment-13789196
] 

Sergey Beryozkin commented on CXF-5309:
---------------------------------------

Hi, try a custom invoker:

http://cxf.apache.org/docs/jax-rs-filters.html#JAX-RSFilters-Custominvokers

This is where you will get all the type info, and do the validation. Custom invokers can be
used with and without Spring, and we will need a non-Spring validation support as well, so
it will work for all users. Similar idea will also work for JAX-WS.

Or may be you can implement the validation in the input CXF interceptor, PRE-INVOKE phase,
all the invocation parameters are already available there, 

{code:java}
List<Object> methodParams = MessageContentsList getContentsList(m); 
{code}

JAX-RS target method is available as "org.apache.cxf.resource.method" property. JAX-RS OperationResourceInfo
class (with the access to all of JAX-RS specific info for the current method and its class
owner) is available from "message.getExchange().get(OperationResourceInfo.class)". Using a
CXF interceptor may make it simpler to reuse some of the code with the JAX-WS runtime at the
next stage

Sergey




> Support Bean Validation API for JAX-RS
> --------------------------------------
>
>                 Key: CXF-5309
>                 URL: https://issues.apache.org/jira/browse/CXF-5309
>             Project: CXF
>          Issue Type: Sub-task
>          Components: JAX-RS, JAX-WS Runtime
>            Reporter: Sergey Beryozkin
>




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message