cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r707605 [2/2] - in /cxf/trunk: rt/frontend/jaxrs/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ rt/fronte...
Date Fri, 24 Oct 2008 11:45:31 GMT
Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImplTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImplTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImplTest.java Fri Oct 24 04:45:29 2008
@@ -20,6 +20,7 @@
 package org.apache.cxf.jaxrs.impl;
 
 import java.util.List;
+import java.util.Locale;
 
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Variant;
@@ -34,17 +35,17 @@
         VariantListBuilderImpl vb = new VariantListBuilderImpl();
         MediaType mt1 = new MediaType("*", "*"); 
         MediaType mt2 = new MediaType("text", "xml");
-        List<Variant> variants = 
-            vb.mediaTypes(mt1, mt2).languages("en", "fr").encodings("zip", "identity").add().build();
+        List<Variant> variants = vb.mediaTypes(mt1, mt2)
+            .languages(new Locale("en"), new Locale("fr")).encodings("zip", "identity").add().build();
         assertEquals("8 variants need to be created", 8, variants.size());
-        assertTrue(verifyVariant(variants, new Variant(mt1, "en", "zip")));
-        assertTrue(verifyVariant(variants, new Variant(mt1, "en", "identity")));
-        assertTrue(verifyVariant(variants, new Variant(mt1, "fr", "zip")));
-        assertTrue(verifyVariant(variants, new Variant(mt1, "fr", "identity")));
-        assertTrue(verifyVariant(variants, new Variant(mt2, "en", "zip")));
-        assertTrue(verifyVariant(variants, new Variant(mt2, "en", "identity")));
-        assertTrue(verifyVariant(variants, new Variant(mt2, "fr", "zip")));
-        assertTrue(verifyVariant(variants, new Variant(mt2, "fr", "identity")));
+        assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("en"), "zip")));
+        assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("en"), "identity")));
+        assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("fr"), "zip")));
+        assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("fr"), "identity")));
+        assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("en"), "zip")));
+        assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("en"), "identity")));
+        assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("fr"), "zip")));
+        assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("fr"), "identity")));
     }
     
     @Test
@@ -66,35 +67,35 @@
         VariantListBuilderImpl vb = new VariantListBuilderImpl();
         MediaType mt1 = new MediaType("*", "*"); 
         MediaType mt2 = new MediaType("text", "xml");
-        List<Variant> variants = 
-            vb.mediaTypes(mt1, mt2).languages("en", "fr").add().build();
+        List<Variant> variants = vb.mediaTypes(mt1, mt2).languages(new Locale("en"), 
+                                                                   new Locale("fr")).add().build();
         assertEquals("8 variants need to be created", 4, variants.size());
-        assertTrue(verifyVariant(variants, new Variant(mt1, "en", null)));
-        assertTrue(verifyVariant(variants, new Variant(mt1, "fr", null)));
-        assertTrue(verifyVariant(variants, new Variant(mt2, "en", null)));
-        assertTrue(verifyVariant(variants, new Variant(mt2, "fr", null)));
+        assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("en"), null)));
+        assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("fr"), null)));
+        assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("en"), null)));
+        assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("fr"), null)));
     }
     
     @Test
     public void testBuildLangAndEnc() {
         VariantListBuilderImpl vb = new VariantListBuilderImpl();
-        List<Variant> variants = 
-            vb.languages("en", "fr").encodings("zip", "identity").add().build();
+        List<Variant> variants = vb.languages(new Locale("en"), 
+                                              new Locale("fr")).encodings("zip", "identity").add().build();
         assertEquals("4 variants need to be created", 4, variants.size());
-        assertTrue(verifyVariant(variants, new Variant(null, "en", "zip")));
-        assertTrue(verifyVariant(variants, new Variant(null, "en", "identity")));
-        assertTrue(verifyVariant(variants, new Variant(null, "fr", "zip")));
-        assertTrue(verifyVariant(variants, new Variant(null, "fr", "identity")));
+        assertTrue(verifyVariant(variants, new Variant(null, new Locale("en"), "zip")));
+        assertTrue(verifyVariant(variants, new Variant(null, new Locale("en"), "identity")));
+        assertTrue(verifyVariant(variants, new Variant(null, new Locale("fr"), "zip")));
+        assertTrue(verifyVariant(variants, new Variant(null, new Locale("fr"), "identity")));
     }
     
     @Test
     public void testBuildLang() {
         VariantListBuilderImpl vb = new VariantListBuilderImpl();
         List<Variant> variants = 
-            vb.languages("en", "fr").add().build();
+            vb.languages(new Locale("en"), new Locale("fr")).add().build();
         assertEquals("2 variants need to be created", 2, variants.size());
-        assertTrue(verifyVariant(variants, new Variant(null, "en", null)));
-        assertTrue(verifyVariant(variants, new Variant(null, "en", null)));
+        assertTrue(verifyVariant(variants, new Variant(null, new Locale("en"), null)));
+        assertTrue(verifyVariant(variants, new Variant(null, new Locale("en"), null)));
     }
     
     @Test

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/ClassResourceInfoTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/ClassResourceInfoTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/ClassResourceInfoTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/ClassResourceInfoTest.java Fri Oct 24 04:45:29 2008
@@ -28,9 +28,9 @@
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.Path;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.UriInfo;
@@ -41,8 +41,8 @@
 public class ClassResourceInfoTest extends Assert {
     
     @Path("/bar")
-    @ProduceMime("test/bar")
-    @ConsumeMime("test/foo")
+    @Produces("test/bar")
+    @Consumes("test/foo")
     private static class TestClass {
         @Context UriInfo u;
         @Context HttpHeaders h;

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/OperationResourceInfoTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/OperationResourceInfoTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/OperationResourceInfoTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/OperationResourceInfoTest.java Fri Oct 24 04:45:29 2008
@@ -21,8 +21,8 @@
 
 import java.util.List;
 
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 
 import org.junit.Assert;
@@ -30,14 +30,14 @@
 
 public class OperationResourceInfoTest extends Assert {
     
-    @ProduceMime("text/xml")
-    @ConsumeMime("application/xml")
+    @Produces("text/xml")
+    @Consumes("application/xml")
     static class TestClass {
-        @ProduceMime("text/plain")
+        @Produces("text/plain")
         public void doIt() {
             // empty
         };
-        @ConsumeMime("application/atom+xml")
+        @Consumes("application/atom+xml")
         public void doThat() {
             // empty
         };

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisProviderTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisProviderTest.java Fri Oct 24 04:45:29 2008
@@ -40,13 +40,13 @@
     @Test
     public void testIsWriteable() {
         MessageBodyWriter<Object> p = new AegisElementProvider();
-        assertTrue(p.isWriteable(AegisTestBean.class, null, null));
+        assertTrue(p.isWriteable(AegisTestBean.class, null, null, null));
     }
     
     @Test
     public void testIsReadable() {
         MessageBodyReader<Object> p = new AegisElementProvider();
-        assertTrue(p.isReadable(AegisTestBean.class, null, null));
+        assertTrue(p.isReadable(AegisTestBean.class, null, null, null));
     }
     
     

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomEntryProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomEntryProviderTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomEntryProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomEntryProviderTest.java Fri Oct 24 04:45:29 2008
@@ -23,8 +23,8 @@
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 
 import org.apache.abdera.model.Entry;
@@ -71,26 +71,26 @@
     
     @Test
     public void testWriteable() {
-        assertTrue(afd.isWriteable(Entry.class, null, null));
-        assertTrue(afd.isWriteable(FOMEntry.class, null, null));
-        assertFalse(afd.isWriteable(Feed.class, null, null));
+        assertTrue(afd.isWriteable(Entry.class, null, null, null));
+        assertTrue(afd.isWriteable(FOMEntry.class, null, null, null));
+        assertFalse(afd.isWriteable(Feed.class, null, null, null));
     }
     
     @Test
     public void testReadable() {
-        assertTrue(afd.isReadable(Entry.class, null, null));
-        assertTrue(afd.isReadable(FOMEntry.class, null, null));
-        assertFalse(afd.isReadable(Feed.class, null, null));
+        assertTrue(afd.isReadable(Entry.class, null, null, null));
+        assertTrue(afd.isReadable(FOMEntry.class, null, null, null));
+        assertFalse(afd.isReadable(Feed.class, null, null, null));
     }
     
     @Test
     public void testAnnotations() {
-        String[] values = afd.getClass().getAnnotation(ProduceMime.class).value();
+        String[] values = afd.getClass().getAnnotation(Produces.class).value();
         assertEquals("3 types can be produced", 3, values.length);
         assertTrue("application/atom+xml".equals(values[0])
                    && "application/atom+xml;type=entry".equals(values[1])
                    && "application/json".equals(values[2]));
-        values = afd.getClass().getAnnotation(ConsumeMime.class).value();
+        values = afd.getClass().getAnnotation(Consumes.class).value();
         assertEquals("2 types can be consumed", 2, values.length);
         assertTrue("application/atom+xml".equals(values[0])
                    && "application/atom+xml;type=entry".equals(values[1]));

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomFeedProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomFeedProviderTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomFeedProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomFeedProviderTest.java Fri Oct 24 04:45:29 2008
@@ -23,8 +23,8 @@
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
 
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
@@ -65,26 +65,26 @@
     
     @Test
     public void testWriteable() {
-        assertTrue(afd.isWriteable(Feed.class, null, null));
-        assertTrue(afd.isWriteable(FOMFeed.class, null, null));
-        assertFalse(afd.isWriteable(Entry.class, null, null));
+        assertTrue(afd.isWriteable(Feed.class, null, null, null));
+        assertTrue(afd.isWriteable(FOMFeed.class, null, null, null));
+        assertFalse(afd.isWriteable(Entry.class, null, null, null));
     }
     
     @Test
     public void testReadable() {
-        assertTrue(afd.isReadable(Feed.class, null, null));
-        assertTrue(afd.isReadable(FOMFeed.class, null, null));
-        assertFalse(afd.isReadable(Entry.class, null, null));
+        assertTrue(afd.isReadable(Feed.class, null, null, null));
+        assertTrue(afd.isReadable(FOMFeed.class, null, null, null));
+        assertFalse(afd.isReadable(Entry.class, null, null, null));
     }
     
     @Test
     public void testAnnotations() {
-        String[] values = afd.getClass().getAnnotation(ProduceMime.class).value();
+        String[] values = afd.getClass().getAnnotation(Produces.class).value();
         assertEquals("3 types can be produced", 3, values.length);
         assertTrue("application/atom+xml".equals(values[0])
                    && "application/atom+xml;type=feed".equals(values[1])
                    && "application/json".equals(values[2]));
-        values = afd.getClass().getAnnotation(ConsumeMime.class).value();
+        values = afd.getClass().getAnnotation(Consumes.class).value();
         assertEquals("2 types can be consumed", 2, values.length);
         assertTrue("application/atom+xml".equals(values[0])
                    && "application/atom+xml;type=feed".equals(values[1]));

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/BinaryDataProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/BinaryDataProviderTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/BinaryDataProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/BinaryDataProviderTest.java Fri Oct 24 04:45:29 2008
@@ -43,19 +43,19 @@
     @Test
     public void testIsWriteable() {
         MessageBodyWriter<Object> p = new BinaryDataProvider();
-        assertTrue(p.isWriteable(byte[].class, null, null)
-                   && p.isWriteable(InputStream.class, null, null)
-                   && p.isWriteable(File.class, null, null)
-                   && !p.isWriteable(int[].class, null, null));
+        assertTrue(p.isWriteable(byte[].class, null, null, null)
+                   && p.isWriteable(InputStream.class, null, null, null)
+                   && p.isWriteable(File.class, null, null, null)
+                   && !p.isWriteable(int[].class, null, null, null));
     }
     
     @Test
     public void testIsReadable() {
         MessageBodyReader<Object> p = new BinaryDataProvider();
-        assertTrue(p.isReadable(byte[].class, null, null)
-                   && p.isReadable(InputStream.class, null, null)
-                   && !p.isReadable(File.class, null, null)
-                   && !p.isReadable(int[].class, null, null));
+        assertTrue(p.isReadable(byte[].class, null, null, null)
+                   && p.isReadable(InputStream.class, null, null, null)
+                   && !p.isReadable(File.class, null, null, null)
+                   && !p.isReadable(int[].class, null, null, null));
     }
     
     @SuppressWarnings("unchecked")

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProviderTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProviderTest.java Fri Oct 24 04:45:29 2008
@@ -22,7 +22,7 @@
 import java.io.InputStream;
 import java.util.List;
 
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.core.MultivaluedMap;
 
 import org.junit.Assert;
@@ -65,12 +65,12 @@
 
     @Test
     public void testReadable() {
-        assertTrue(ferp.isReadable(MultivaluedMap.class, null, null));
+        assertTrue(ferp.isReadable(MultivaluedMap.class, null, null, null));
     }
 
     @Test
     public void testAnnotations() {
-        assertEquals("application/x-www-form-urlencoded", ferp.getClass().getAnnotation(ConsumeMime.class)
+        assertEquals("application/x-www-form-urlencoded", ferp.getClass().getAnnotation(Consumes.class)
                      .value()[0]);
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java Fri Oct 24 04:45:29 2008
@@ -34,19 +34,19 @@
     @Test
     public void testIsWriteable() {
         MessageBodyWriter<Object> p = new PrimitiveTextProvider();
-        assertTrue(p.isWriteable(byte.class, null, null)
-                   && p.isWriteable(Byte.class, null, null)
-                   && p.isWriteable(boolean.class, null, null)
-                   && p.isWriteable(Boolean.class, null, null));
+        assertTrue(p.isWriteable(byte.class, null, null, null)
+                   && p.isWriteable(Byte.class, null, null, null)
+                   && p.isWriteable(boolean.class, null, null, null)
+                   && p.isWriteable(Boolean.class, null, null, null));
     }
     
     @Test
     public void testIsReadable() {
         MessageBodyReader<Object> p = new PrimitiveTextProvider();
-        assertTrue(p.isReadable(byte.class, null, null)
-                   && p.isReadable(Byte.class, null, null)
-                   && p.isReadable(boolean.class, null, null)
-                   && p.isReadable(Boolean.class, null, null));
+        assertTrue(p.isReadable(byte.class, null, null, null)
+                   && p.isReadable(Byte.class, null, null, null)
+                   && p.isReadable(boolean.class, null, null, null)
+                   && p.isReadable(Boolean.class, null, null, null));
     }
     
     @SuppressWarnings("unchecked")

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java Fri Oct 24 04:45:29 2008
@@ -29,8 +29,8 @@
 import java.util.Arrays;
 import java.util.List;
 
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.ContextResolver;
@@ -181,20 +181,23 @@
         return index;
     }
     
-    @ConsumeMime("text/html")
-    @ProduceMime("text/html")
+    @Consumes("text/html")
+    @Produces("text/html")
     private final class TestStringProvider 
         implements MessageBodyReader<String>, MessageBodyWriter<String>  {
 
-        public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+        public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations,
+                                  MediaType m) {
             return type == String.class;
         }
         
-        public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+        public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations,
+                                   MediaType m) {
             return type == String.class;
         }
         
-        public long getSize(String s) {
+        public long getSize(String s, Class<?> type, Type genericType, Annotation[] annotations, 
+                            MediaType m) {
             return s.length();
         }
 
@@ -219,20 +222,23 @@
 
     }
     
-    @ConsumeMime("application/json")
-    @ProduceMime("application/json")
+    @Consumes("application/json")
+    @Produces("application/json")
     private final class CustomJSONProvider 
         implements MessageBodyReader<String>, MessageBodyWriter<String>  {
 
-        public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+        public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations,
+                                  MediaType m) {
             return type.getAnnotation(XmlRootElement.class) != null;
         }
         
-        public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+        public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations,
+                                   MediaType m) {
             return type.getAnnotation(XmlRootElement.class) != null;
         }
         
-        public long getSize(String s) {
+        public long getSize(String s, Class<?> type, Type genericType, Annotation[] annotations,
+                            MediaType m) {
             return s.length();
         }
 
@@ -249,20 +255,23 @@
 
     }
     
-    @ConsumeMime("application/widget")
-    @ProduceMime("application/widget")
+    @Consumes("application/widget")
+    @Produces("application/widget")
     private final class CustomWidgetProvider
         implements MessageBodyReader<String>, MessageBodyWriter<String>  {
 
-        public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+        public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations,
+                                  MediaType m) {
             return type.getAnnotation(XmlRootElement.class) != null;
         }
         
-        public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+        public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations,
+                                   MediaType m) {
             return type.getAnnotation(XmlRootElement.class) != null;
         }
         
-        public long getSize(String s) {
+        public long getSize(String s, Class<?> type, Type genericType, Annotation[] annotations,
+                            MediaType m) {
             return s.length();
         }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java Fri Oct 24 04:45:29 2008
@@ -38,17 +38,17 @@
     @Test
     public void testIsWriteable() {
         SourceProvider p = new SourceProvider();
-        assertTrue(p.isWriteable(StreamSource.class, null, null)
-                   && p.isWriteable(DOMSource.class, null, null)
-                   && p.isWriteable(Source.class, null, null));
+        assertTrue(p.isWriteable(StreamSource.class, null, null, null)
+                   && p.isWriteable(DOMSource.class, null, null, null)
+                   && p.isWriteable(Source.class, null, null, null));
     }
     
     @Test
     public void testIsReadable() {
         SourceProvider p = new SourceProvider();
-        assertTrue(p.isReadable(StreamSource.class, null, null)
-                   && p.isReadable(DOMSource.class, null, null)
-                   && p.isReadable(Source.class, null, null));
+        assertTrue(p.isReadable(StreamSource.class, null, null, null)
+                   && p.isReadable(DOMSource.class, null, null, null)
+                   && p.isReadable(Source.class, null, null, null));
     }
 
     @Test

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookInterface.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookInterface.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookInterface.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookInterface.java Fri Oct 24 04:45:29 2008
@@ -19,18 +19,18 @@
 
 package org.apache.cxf.jaxrs.resources;
 
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 
 public interface BookInterface {
     
     @GET
     @Path("/path2")
-    @ProduceMime("text/bar2")
-    @ConsumeMime("text/foo2")
+    @Produces("text/bar2")
+    @Consumes("text/foo2")
     String getAuthor();
     
     @Path("/books/{bookId}")

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreNoSubResource.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreNoSubResource.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreNoSubResource.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreNoSubResource.java Fri Oct 24 04:45:29 2008
@@ -26,10 +26,10 @@
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.Response;
 
-@ProduceMime("text/plain")
+@Produces("text/plain")
 @Path("/bookstore/{id}")
 public class BookStoreNoSubResource {
 
@@ -43,42 +43,42 @@
 
     @GET
     @Path("/books")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     public Book getBooks() {
         return null;
     }
     
     @GET
     @Path("/books/{bookId}/")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     public Book getBook(@PathParam("bookId") String id) {
         return null;
     }    
     
     @GET
     @Path("/books/{bookId}/")
-    @ProduceMime("application/json")
+    @Produces("application/json")
     public Book getBookJSON(@PathParam("bookId") String id) {
         return null;
     } 
 
     @POST
     @Path("/books")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     public Response addBook(Book book) {
         return null;
     }
 
     @PUT
     @Path("/books/")
-    @ProduceMime("application/*")
+    @Produces("application/*")
     public Response updateBook(Book book) {
         return null;
     }
 
     @Path("/books/{bookId}/")
     @DELETE
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     public Response deleteBook(@PathParam("bookId") String id) {
         return null;
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreTemplates.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreTemplates.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreTemplates.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreTemplates.java Fri Oct 24 04:45:29 2008
@@ -25,7 +25,7 @@
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.Response;
 
 @Path("{id}")
@@ -47,7 +47,7 @@
     
     @PUT
     @Path("{bookId}")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     public Response updateBook(@PathParam("id") String id, @PathParam("bookId") String bookId) {
         return null;
     }    

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookSuperClass.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookSuperClass.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookSuperClass.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookSuperClass.java Fri Oct 24 04:45:29 2008
@@ -19,19 +19,19 @@
 
 package org.apache.cxf.jaxrs.resources;
 
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 
 
 public abstract class BookSuperClass {
 
     @GET
     @Path("/path")
-    @ProduceMime("text/bar")
-    @ConsumeMime("text/foo")
+    @Produces("text/bar")
+    @Consumes("text/foo")
     public abstract String getDescription();
     
     @Path("/books/{bookId}/{new}")

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/TestResource.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/TestResource.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/TestResource.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/TestResource.java Fri Oct 24 04:45:29 2008
@@ -22,7 +22,7 @@
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 
 @Path("/{a}/{b}/{c}/d")
 public class TestResource {
@@ -34,14 +34,14 @@
     
     @GET
     @Path("/")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     public String listMethod() {
         return "This is a list method";
     }
     
     @GET
     @Path("/{e}")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     public String readMethod() {
         return "This is a list method";
     }
@@ -53,15 +53,15 @@
     }
     
     @GET
-    @Path(value = "/{e}", limited = false)
-    @ProduceMime("application/json")
+    @Path(value = "/{e}")
+    @Produces("application/json")
     public String unlimitedPath() {
         return "This is a list method";
     }
     
     @GET
     @Path("/{e}/bar/baz/baz")
-    @ProduceMime("application/json")
+    @Produces("application/json")
     public String readMethod2() {
         return "This is a list method";
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java Fri Oct 24 04:45:29 2008
@@ -36,7 +36,7 @@
 import javax.ws.rs.core.SecurityContext;
 import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.MessageBodyWorkers;
+import javax.ws.rs.ext.Providers;
 import javax.xml.bind.JAXBContext;
 
 import org.apache.cxf.jaxrs.Customer;
@@ -413,11 +413,14 @@
                    JAXRSUtils.compareMediaTypes(m2, JAXRSUtils.ALL_TYPES) < 0);
         
         MediaType m3 = MediaType.valueOf("text/xml;q=0.2");
-        assertTrue("text/xml should be more preferred than than text/xml;q=0.2", 
+        assertTrue("text/xml should be more preferred than text/xml;q=0.2", 
                    JAXRSUtils.compareMediaTypes(m1, m3) < 0);
         MediaType m4 = MediaType.valueOf("text/xml;q=.3");
-        assertTrue("text/xml;q=.3 should be more preferred than than text/xml;q=0.2", 
+        assertTrue("text/xml;q=.3 should be more preferred than text/xml;q=0.2", 
                    JAXRSUtils.compareMediaTypes(m4, m3) < 0);
+        
+        assertTrue("text/xml;q=.3 should be more preferred than than text/xml;q=0.2", 
+                  JAXRSUtils.compareMediaTypes(m3, m4) > 0);
     }
     
     @Test
@@ -588,7 +591,7 @@
                                                      HttpHeaders.class, 
                                                      Request.class,
                                                      SecurityContext.class,
-                                                     MessageBodyWorkers.class,
+                                                     Providers.class,
                                                      String.class}), 
                 cri);
         ori.setHttpMethod("GET");

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBook.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBook.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBook.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBook.java Fri Oct 24 04:45:29 2008
@@ -20,7 +20,7 @@
 package org.apache.cxf.systest.jaxrs;
 
 import javax.ws.rs.GET;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 
 import org.apache.abdera.model.Entry;
 
@@ -35,7 +35,7 @@
     
     
     @GET
-    @ProduceMime("application/atom+xml")
+    @Produces("application/atom+xml")
     public Entry getAsEntry() {
         try {
             return AtomUtils.createBookEntry(book);

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java Fri Oct 24 04:45:29 2008
@@ -26,12 +26,12 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
@@ -69,7 +69,7 @@
     
     @GET
     @Path("/books/jsonfeed")
-    @ProduceMime({"application/xml", "application/json", "text/html", "application/atom+xml" })
+    @Produces({"application/xml", "application/json", "text/html", "application/atom+xml" })
     public Feed getBooksAsJsonFeed(@Context UriInfo uParam) {
         return getBooksAsFeed(uParam);    
     }
@@ -77,7 +77,7 @@
     
     @GET
     @Path("/books/feed")
-    @ProduceMime({"application/json", "application/atom+xml" })
+    @Produces({"application/json", "application/atom+xml" })
     public Feed getBooksAsFeed(@Context UriInfo uParam) {
         
         MediaType mt = headers.getMediaType();
@@ -108,7 +108,7 @@
     
     @POST
     @Path("/books/feed")
-    @ConsumeMime("application/atom+xml")
+    @Consumes("application/atom+xml")
     public Response addBookAsEntry(Entry e) {
         try {
             String text = e.getContentElement().getValue();
@@ -120,8 +120,8 @@
             // this code is broken as Response does not
             
             URI uri = 
-                uField.getBaseUriBuilder().path("bookstore", "books", "entries", 
-                                                Long.toString(b.getId())).build();
+                uField.getBaseUriBuilder().path("bookstore").path("books").path("entries") 
+                                                .path(Long.toString(b.getId())).build();
             return Response.created(uri).entity(e).build();
         } catch (Exception ex) {
             return Response.serverError().build();
@@ -130,7 +130,7 @@
     
     @GET
     @Path("/books/entries/{bookId}/")
-    @ProduceMime({"application/atom+xml", "application/json" })
+    @Produces({"application/atom+xml", "application/json" })
     public Entry getBookAsEntry(@PathParam("bookId") String id) throws BookNotFoundFault {
         System.out.println("----invoking getBook with id: " + id);
         Book book = books.get(Long.parseLong(id));

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java Fri Oct 24 04:45:29 2008
@@ -24,11 +24,12 @@
 import java.io.OutputStream;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
+import java.util.Locale;
 import java.util.Map;
 import java.util.WeakHashMap;
 
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
@@ -49,8 +50,8 @@
 import org.codehaus.jettison.badgerfish.BadgerFishXMLInputFactory;
 import org.codehaus.jettison.badgerfish.BadgerFishXMLOutputFactory;
 
-@ProduceMime("application/json")
-@ConsumeMime("application/json")
+@Produces("application/json")
+@Consumes("application/json")
 @Provider
 public final class BadgerFishProvider 
     implements MessageBodyReader<Object>, MessageBodyWriter<Object>  {
@@ -60,15 +61,15 @@
     @Context
     private HttpHeaders requestHeaders;  
     
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType m) {
         return type.getAnnotation(XmlRootElement.class) != null;
     }
     
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType m) {
         return type.getAnnotation(XmlRootElement.class) != null;
     }
 
-    public long getSize(Object o) {
+    public long getSize(Object o, Class<?> type, Type genericType, Annotation[] annotations, MediaType m) {
         return -1;
     }
     
@@ -95,7 +96,7 @@
     public void writeTo(Object obj, Class<?> clazz, Type genericType, Annotation[] annotations,  
         MediaType m, MultivaluedMap<String, Object> headers, OutputStream os) {
         try {
-            if (!"badger-fish-language".equals(requestHeaders.getLanguage())) {
+            if (!new Locale("badger-fish-language").equals(requestHeaders.getLanguage())) {
                 throw new RuntimeException();
             }
             

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Book.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Book.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Book.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Book.java Fri Oct 24 04:45:29 2008
@@ -25,7 +25,7 @@
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.xml.bind.annotation.XmlRootElement;
 
 
@@ -62,7 +62,7 @@
     
     @GET
     @Path("chapters/{chapterid}/")    
-    @ProduceMime("application/xml;charset=ISO-8859-1")
+    @Produces("application/xml;charset=ISO-8859-1")
     public Chapter getChapter(@PathParam("chapterid")int chapterid) {
         System.out.println("----invoking getChapter with chapterid: " + chapterid);
 

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookInterface.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookInterface.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookInterface.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookInterface.java Fri Oct 24 04:45:29 2008
@@ -22,12 +22,12 @@
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 
 public interface BookInterface {
 
     @GET
     @Path("/thosebooks/{bookId}/")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     Book getThatBook(@PathParam("bookId") Long id) throws BookNotFoundFault;
 }

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java Fri Oct 24 04:45:29 2008
@@ -26,7 +26,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.DefaultValue;
 import javax.ws.rs.GET;
@@ -34,7 +34,7 @@
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
@@ -73,7 +73,7 @@
     
     @GET
     @Path("books/check/{id}")
-    @ProduceMime("text/plain")
+    @Produces("text/plain")
     public boolean checkBook(@PathParam("id") Long id) {
         return books.containsKey(id);
     }
@@ -152,7 +152,7 @@
     
     @GET
     @Path("/books/{bookId}/")
-    @ProduceMime("application/json")
+    @Produces("application/json")
     public Book getBookAsJSON() throws BookNotFoundFault {
         return doGetBook(currentBookId);
     }
@@ -184,7 +184,7 @@
     
     @GET
     @Path("/booknames/{bookId}/")
-    @ProduceMime("text/*")
+    @Produces("text/*")
     public String getBookName(@PathParam("bookId") int id) throws BookNotFoundFault {
         System.out.println("----invoking getBookName with id: " + id);
         Book book = books.get(new Long(id));
@@ -199,8 +199,8 @@
 
     @POST
     @Path("/books")
-    @ProduceMime("text/xml")
-    @ConsumeMime("application/xml")
+    @Produces("text/xml")
+    @Consumes("application/xml")
     public Response addBook(Book book) {
         System.out.println("----invoking addBook, book name is: " + book.getName());
         book.setId(++bookId);
@@ -211,8 +211,8 @@
 
     @POST
     @Path("/binarybooks")
-    @ProduceMime("text/xml")
-    @ConsumeMime("application/octet-stream")
+    @Produces("text/xml")
+    @Consumes("application/octet-stream")
     public Response addBinaryBook(long[] book) {
         return Response.ok(book).build();
     }
@@ -244,7 +244,7 @@
     
     @PUT
     @Path("/bookswithjson/")
-    @ConsumeMime("application/json")
+    @Consumes("application/json")
     public Response updateBookJSON(Book book) {
         System.out.println("----invoking updateBook, book name is: " + book.getName());
         Book b = books.get(book.getId());
@@ -278,8 +278,8 @@
 
     @POST
     @Path("/booksplain")
-    @ConsumeMime("text/plain")
-    @ProduceMime("text/plain")
+    @Consumes("text/plain")
+    @Produces("text/plain")
     public Long echoBookId(long theBookId) {
         return new Long(theBookId);
     }
@@ -295,7 +295,7 @@
 
     @GET
     @Path("/cdwithmultitypes/{CDId}/")
-    @ProduceMime({"application/xml", "application/json" }) 
+    @Produces({"application/xml", "application/json" }) 
     public CD getCDWithMultiContentTypes(@PathParam("CDId") String id) {
         System.out.println("----invoking getCDWithMultiContentTypes with cdId: " + id);
         CD cd = cds.get(Long.parseLong(id));

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreJaxrsJaxws.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreJaxrsJaxws.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreJaxrsJaxws.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreJaxrsJaxws.java Fri Oct 24 04:45:29 2008
@@ -26,7 +26,7 @@
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 
 @WebService
 @Path("/bookstore")
@@ -40,6 +40,6 @@
     @WebMethod
     @POST
     @Path("/books")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     Book addBook(@WebParam(name = "book") Book book);
 }

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java Fri Oct 24 04:45:29 2008
@@ -26,11 +26,11 @@
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 
 @Path("/bookstore")
-@ProduceMime("application/json")
+@Produces("application/json")
 public class BookStoreSpring {
 
     private Map<Long, Book> books = new HashMap<Long, Book>();

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java Fri Oct 24 04:45:29 2008
@@ -21,7 +21,7 @@
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 
 import org.apache.cxf.customer.book.BookNotFoundFault;
 
@@ -29,6 +29,6 @@
     
     @GET
     @Path("/subresource")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     Book getTheBook() throws BookNotFoundFault;
 }

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Chapter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Chapter.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Chapter.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Chapter.java Fri Oct 24 04:45:29 2008
@@ -21,7 +21,7 @@
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.xml.bind.annotation.XmlRootElement;
 
 
@@ -50,7 +50,7 @@
     
     @GET
     @Path("/recurse")
-    @ProduceMime("application/xml")
+    @Produces("application/xml")
     public Chapter getItself() {
         return this;
     }

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java Fri Oct 24 04:45:29 2008
@@ -19,12 +19,12 @@
 
 package org.apache.cxf.systest.jaxrs;
 
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 
@@ -39,7 +39,7 @@
 
     @GET
     @Path("/pets/{petId}/")
-    @ProduceMime("text/xml")
+    @Produces("text/xml")
     public Response getStatus(@PathParam("petId")
                               String petId) throws Exception {
         System.out.println("----invoking getStatus on the petStore for id: " + petId);
@@ -49,8 +49,8 @@
 
     @POST
     @Path("/pets/")
-    @ConsumeMime("application/x-www-form-urlencoded")
-    @ProduceMime("text/xml")
+    @Consumes("application/x-www-form-urlencoded")
+    @Produces("text/xml")
     public Response updateStatus(MultivaluedMap<String, String> params) throws Exception {
         System.out.println("----invoking updateStatus on the petStore with stauts post param value of: "
                            + params.getFirst("status"));



Mime
View raw message