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] [Comment Edited] (CXF-5309) Support Bean Validation API for JAX-RS
Date Tue, 15 Oct 2013 12:36:43 GMT

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

Sergey Beryozkin edited comment on CXF-5309 at 10/15/13 12:35 PM:
------------------------------------------------------------------

Sure, you can copy & paste say
http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerStreamingTest.java

into 

JAXRSClientServerValidationTest.java, with run() having only

{code:java}
protected void run() {
            JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
            // replace BookStore.class ref with the one from your test
            sf.setResourceClasses(BookStore.class);
            sf.setResourceProvider(BookStore.class,
                                   new SingletonResourceProvider(new BookStore()));
            sf.setAddress("http://localhost:" + PORT + "/");
            // add in and out validation interceptors

            sf.create();

        }
{code}

and then start using WebClient or proxy-based API to stress individual server resource methods.


So may be you can move your current test into systests/jaxrs ?

(as a side note - we can probably support client-side Bean validation in time too which would
be cool)

thanks, Sergey


was (Author: sergey_beryozkin):
Sure, you can copy & paste say
http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerStreamingTest.java

into 

JAXRSClientServerValidationTest.java, with run() having only

{code:java}
protected void run() {
            JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
            // replace BookStore.class ref with the one from your test
            sf.setResourceClasses(BookStore.class);
            sf.setResourceProvider(BookStore.class,
                                   new SingletonResourceProvider(new BookStore()));
            sf.setAddress("http://localhost:" + PORT + "/");
            // add in and out validation interceptors

            sf.create();

        }
{code}

So may be you can move your current test into systests/jaxrs ?
thanks, 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
>         Attachments: patch-validation-poc.txt
>
>




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

Mime
View raw message