Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB650D4BB for ; Fri, 15 Mar 2013 17:19:30 +0000 (UTC) Received: (qmail 88491 invoked by uid 500); 15 Mar 2013 17:19:30 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 88441 invoked by uid 500); 15 Mar 2013 17:19:30 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 88434 invoked by uid 99); 15 Mar 2013 17:19:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 17:19:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 17:19:27 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 755EC2388847; Fri, 15 Mar 2013 17:17:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1457026 - in /cxf/branches/2.7.x-fixes: ./ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ Date: Fri, 15 Mar 2013 17:17:21 -0000 To: commits@cxf.apache.org From: sergeyb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130315171721.755EC2388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sergeyb Date: Fri Mar 15 17:17:20 2013 New Revision: 1457026 URL: http://svn.apache.org/r1457026 Log: Merged revisions 1457021 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1457021 | sergeyb | 2013-03-15 17:08:40 +0000 (Fri, 15 Mar 2013) | 1 line [CXF-4891] Adding a test where the content type is modified directly from MBW ........ Added: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ContentTypeModifyingMBW.java - copied unchanged from r1457021, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ContentTypeModifyingMBW.java Modified: cxf/branches/2.7.x-fixes/ (props changed) cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java Propchange: cxf/branches/2.7.x-fixes/ ------------------------------------------------------------------------------ svn:mergeinfo = /cxf/trunk:1457021 Propchange: cxf/branches/2.7.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java?rev=1457026&r1=1457025&r2=1457026&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java (original) +++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java Fri Mar 15 17:17:20 2013 @@ -63,6 +63,7 @@ public class BookServer extends Abstract p.setEnableBuffering(true); p.setReportByteArraySize(true); providers.add(p); + providers.add(new ContentTypeModifyingMBW()); JAXBElementProvider jaxbProvider = new JAXBElementProvider(); Map jaxbElementClassMap = new HashMap(); jaxbElementClassMap.put(BookNoXmlRootElement.class.getName(), "BookNoXmlRootElement"); Modified: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java?rev=1457026&r1=1457025&r2=1457026&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java (original) +++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java Fri Mar 15 17:17:20 2013 @@ -134,6 +134,13 @@ public class BookStore { } @GET + @Path("/customtext") + @Produces("text/custom") + public String getCustomBookTest() { + return "Good book"; + } + + @GET @Path("/booknames/123") @Produces("application/bar") public byte[] getBookName123() { Modified: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java?rev=1457026&r1=1457025&r2=1457026&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java (original) +++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java Fri Mar 15 17:17:20 2013 @@ -86,6 +86,18 @@ public class JAXRSClientServerBookTest e createStaticBus(); } + + + @Test + public void testGetCustomBookText() { + String address = "http://localhost:" + PORT + "/bookstore/customtext"; + WebClient wc = WebClient.create(address); + Response r = wc.accept("text/custom").get(); + String name = r.readEntity(String.class); + assertEquals("Good book", name); + assertEquals("text/custom;charset=us-ascii", r.getMediaType().toString()); + } + @Test public void testGetBookNameAsByteArray() { String address = "http://localhost:" + PORT + "/bookstore/booknames/123";