cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r707605 [1/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
Author: sergeyb
Date: Fri Oct 24 04:45:29 2008
New Revision: 707605

URL: http://svn.apache.org/viewvc?rev=707605&view=rev
Log:
JAX-RS : starting to push for 1.0 final support

Modified:
    cxf/trunk/rt/frontend/jaxrs/pom.xml
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalHttpHeaders.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageBodyWorkers.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalRequest.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalUriInfo.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/URITemplate.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAegisProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomEntryProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomFeedProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/BinaryDataProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SourceProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/StringProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansElementProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansJSONProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/ClassResourceInfoTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/OperationResourceInfoTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomEntryProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomFeedProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/BinaryDataProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookInterface.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreNoSubResource.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreTemplates.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookSuperClass.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/TestResource.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBook.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Book.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookInterface.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreJaxrsJaxws.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Chapter.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java

Modified: cxf/trunk/rt/frontend/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/pom.xml?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/pom.xml (original)
+++ cxf/trunk/rt/frontend/jaxrs/pom.xml Fri Oct 24 04:45:29 2008
@@ -60,7 +60,7 @@
         <dependency>
             <groupId>javax.ws.rs</groupId>
             <artifactId>jsr311-api</artifactId>
-            <version>0.8</version>
+            <version>1.0</version>
         </dependency>
         <dependency>
             <groupId>${pom.groupId}</groupId>

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java Fri Oct 24 04:45:29 2008
@@ -39,7 +39,6 @@
     private static final String SMAX_AGE = "s-maxage";
 
     public CacheControl fromString(String c) {
-        boolean isPublic = true;
         boolean isPrivate = false;
         List<String> privateFields = new ArrayList<String>();
         boolean noCache = false;
@@ -69,7 +68,6 @@
             } else if (token.startsWith(PROXY_REVALIDATE)) {
                 proxyRevalidate = true;
             } else if (token.startsWith(PRIVATE)) {
-                isPublic = false;
                 isPrivate = true;
                 addFields(privateFields, token);
             }  else if (token.startsWith(NO_CACHE)) {
@@ -81,7 +79,6 @@
         CacheControl cc = new CacheControl();
         cc.setMaxAge(maxAge);
         cc.setSMaxAge(sMaxAge);
-        cc.setPublic(isPublic);
         cc.setPrivate(isPrivate);
         cc.getPrivateFields().addAll(privateFields);
         cc.setMustRevalidate(mustRevalidate);
@@ -96,7 +93,7 @@
 
     public String toString(CacheControl c) {
         StringBuilder sb = new StringBuilder();
-        if (c.isPublic()) {
+        if (!c.isPrivate()) {
             sb.append(PUBLIC).append(';');
         } else {
             sb.append(PRIVATE).append('=');

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java Fri Oct 24 04:45:29 2008
@@ -25,6 +25,7 @@
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.ws.rs.core.Cookie;
@@ -61,9 +62,9 @@
         return cl;
     }
 
-    public String getLanguage() {
+    public Locale getLanguage() {
         String l = headers.getFirst(HttpHeaders.CONTENT_LANGUAGE);
-        return l == null ? "UTF-8" : l;
+        return l == null || l.length() == 0 ? null : new Locale(l);
     }
 
     public MediaType getMediaType() {
@@ -77,31 +78,35 @@
         return map;
     }
 
-    public List<String> getAcceptableLanguages() {
+    public List<Locale> getAcceptableLanguages() {
         List<String> values = getRequestHeader(HttpHeaders.ACCEPT_LANGUAGE);
         if (values == null || values.isEmpty()) {
             return Collections.emptyList();
         }
-        List<String> newLs = new ArrayList<String>(); 
+        List<Locale> newLs = new ArrayList<Locale>(); 
         String[] ls =  values.get(0).split(",");
-        Map<String, Float> prefs = new HashMap<String, Float>();
+        Map<Locale, Float> prefs = new HashMap<Locale, Float>();
         for (String l : ls) {
-            String[] pair = l.split(";"); 
-            newLs.add(pair[0]);
+            String[] pair = l.split(";");
+            
+            Locale locale = new Locale(pair[0].trim());
+            
+            newLs.add(locale);
             if (pair.length > 1) {
                 String[] pair2 = pair[1].split("=");
                 if (pair2.length > 1) {
-                    prefs.put(pair[0], JAXRSUtils.getMediaTypeQualityFactor(pair2[1]));
+                    prefs.put(locale, JAXRSUtils.getMediaTypeQualityFactor(pair2[1].trim()));
                 } else {
-                    prefs.put(pair[0], 1F);
+                    prefs.put(locale, 1F);
                 }
             } else {
-                prefs.put(pair[0], 1F);
+                prefs.put(locale, 1F);
             }
         }
         if (newLs.size() == 1) {
             return newLs;
         }
+        
         Collections.sort(newLs, new AcceptLanguageComparator(prefs));
         return newLs;
         
@@ -111,18 +116,18 @@
         return headers.get(name);
     }
 
-    private static class AcceptLanguageComparator implements Comparator<String> {
-        private Map<String, Float> prefs;
+    private static class AcceptLanguageComparator implements Comparator<Locale> {
+        private Map<Locale, Float> prefs;
         
-        public AcceptLanguageComparator(Map<String, Float> prefs) {
+        public AcceptLanguageComparator(Map<Locale, Float> prefs) {
             this.prefs = prefs;
         }
 
-        public int compare(String lang1, String lang2) {
+        public int compare(Locale lang1, Locale lang2) {
             float p1 = prefs.get(lang1);
             float p2 = prefs.get(lang2);
             int result = Float.compare(p1, p2);
-            return result == 0 ? result : ~result;
+            return result == 0 ? result : result * -1;
         }
     }
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java Fri Oct 24 04:45:29 2008
@@ -23,14 +23,16 @@
 import java.lang.reflect.Type;
 
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ext.ContextResolver;
+import javax.ws.rs.ext.ExceptionMapper;
 import javax.ws.rs.ext.MessageBodyReader;
-import javax.ws.rs.ext.MessageBodyWorkers;
 import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Providers;
 
 import org.apache.cxf.jaxrs.provider.ProviderFactory;
 import org.apache.cxf.message.Message;
 
-public class MessageBodyWorkersImpl implements MessageBodyWorkers {
+public class MessageBodyWorkersImpl implements Providers {
 
     private Message m;
     public MessageBodyWorkersImpl(Message m) {
@@ -49,4 +51,12 @@
                    type, genericType, annotations, mediaType, m);
     }
 
+    public <T> ContextResolver<T> getContextResolver(Class<T> contextType, MediaType mediaType) {
+        return ProviderFactory.getInstance().createContextResolver(contextType, m, mediaType);
+    }
+
+    public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) {
+        return ProviderFactory.getInstance().createExceptionMapper(type, m);
+    }
+
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java Fri Oct 24 04:45:29 2008
@@ -19,11 +19,15 @@
 
 package org.apache.cxf.jaxrs.impl;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.ws.rs.core.EntityTag;
+import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Request;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.ResponseBuilder;
@@ -54,7 +58,7 @@
 
 
     public ResponseBuilder evaluatePreconditions(EntityTag eTag) {
-        String ifMatch = getHeaderValue("If-Match");
+        String ifMatch = getHeaderValue(HttpHeaders.IF_MATCH);
         
         if (ifMatch == null || ifMatch.equals("*")) {
             return null;
@@ -69,14 +73,35 @@
             // ignore
         }
         
-        return Response.status(412).tag(eTag);
+        return Response.status(Response.Status.PRECONDITION_FAILED).tag(eTag);
     }
 
 
 
     public ResponseBuilder evaluatePreconditions(Date lastModified) {
-        // TODO : these dates wreck my head
-        return null;
+        String ifModifiedSince = getHeaderValue(HttpHeaders.IF_MODIFIED_SINCE);
+        
+        if (ifModifiedSince == null) {
+            return null;
+        }
+        
+        SimpleDateFormat dateFormat = 
+            new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
+        dateFormat.setLenient(false);
+        Date dateSince = null;
+        try {
+            dateSince = dateFormat.parse(ifModifiedSince);
+        } catch (ParseException ex) {
+            // invalid header value, request should continue
+            return null;
+        }
+        
+        if (dateSince.before(lastModified)) {
+            // request should continue
+            return null;
+        }
+        
+        return Response.status(Response.Status.NOT_MODIFIED);
     }
 
 
@@ -104,4 +129,10 @@
         return values.get(0);
     }
 
+
+
+    public String getMethod() {
+        return m.get(Message.HTTP_REQUEST_METHOD).toString();
+    }
+
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java Fri Oct 24 04:45:29 2008
@@ -22,9 +22,11 @@
 import java.net.URI;
 import java.util.Date;
 import java.util.List;
+import java.util.Locale;
 
 import javax.ws.rs.core.CacheControl;
 import javax.ws.rs.core.EntityTag;
+import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.NewCookie;
@@ -32,7 +34,6 @@
 import javax.ws.rs.core.Response.ResponseBuilder;
 import javax.ws.rs.core.Variant;
 
-
 public final class ResponseBuilderImpl extends ResponseBuilder {
     private int status = 200;
     private Object entity;
@@ -97,29 +98,42 @@
     }
 
     public ResponseBuilder tag(String tag) {
-        metadata.putSingle("ETag", tag.toString());
+        metadata.putSingle(HttpHeaders.ETAG, tag.toString());
         return this;
     }
 
     public ResponseBuilder lastModified(Date lastModified) {
-        metadata.putSingle("Last-Modified", lastModified.toString());
+        metadata.putSingle(HttpHeaders.LAST_MODIFIED, lastModified.toString());
         return this;
     }
 
     public ResponseBuilder cacheControl(CacheControl cacheControl) {
-        metadata.putSingle("Cache-Control", cacheControl.toString());
+        metadata.putSingle(HttpHeaders.CACHE_CONTROL, 
+                           cacheControl.toString());
         return this;
     }
 
     public ResponseBuilder cookie(NewCookie cookie) {
-        metadata.putSingle("Set-Cookie", cookie.toString());
+        metadata.putSingle(HttpHeaders.SET_COOKIE, cookie.toString());
         return this;
     }
+
+    @Override
+    public ResponseBuilder expires(Date expires) {
+        metadata.putSingle(HttpHeaders.EXPIRES, expires.toString());
+        return null;
+    }
+
+    @Override
+    public ResponseBuilder language(Locale language) {
+        metadata.putSingle(HttpHeaders.CONTENT_LANGUAGE, language.toString());
+        return null;
+    }
     
     @Override
     public ResponseBuilder cookie(NewCookie... cookies) {
         for (NewCookie cookie : cookies) {
-            metadata.add("Set-Cookie", cookie.toString());
+            metadata.add(HttpHeaders.SET_COOKIE, cookie.toString());
         }
         return this;
     }
@@ -139,7 +153,8 @@
             language(variant.getLanguage());
         }
         if (variant.getEncoding() != null) {
-            metadata.putSingle("Content-Encoding", variant.getEncoding());
+            metadata.putSingle(HttpHeaders.CONTENT_ENCODING, 
+                               variant.getEncoding());
         }
         return this;
     }
@@ -163,6 +178,5 @@
         entity = null;
         status = 200;
     }
-
     
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java Fri Oct 24 04:45:29 2008
@@ -22,7 +22,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.ws.rs.core.ApplicationConfig;
+import javax.ws.rs.core.Application;
 import javax.ws.rs.core.CacheControl;
 import javax.ws.rs.core.Cookie;
 import javax.ws.rs.core.EntityTag;
@@ -93,7 +93,7 @@
 
 
     @Override
-    public <T> T createEndpoint(ApplicationConfig applicationConfig, Class<T> endpointType) 
+    public <T> T createEndpoint(Application applicationConfig, Class<T> endpointType) 
         throws IllegalArgumentException, UnsupportedOperationException {
         throw new UnsupportedOperationException();
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java Fri Oct 24 04:45:29 2008
@@ -40,10 +40,9 @@
     private String userInfo;
     private int port;
     private String host;
-    private List<PathSegment> paths;
-    private MultivaluedMap<String, String> matrix;
+    private List<PathSegment> paths = new ArrayList<PathSegment>();
     private String fragment;
-    private MultivaluedMap<String, String> query;
+    private MultivaluedMap<String, String> query = new MetadataMap<String, String>();
     
        
     public UriBuilderImpl() {
@@ -53,9 +52,9 @@
         setUriParts(uri);
     }
 
+    
     @Override
-    public URI build() throws UriBuilderException {
-        
+    public URI build(Object... values) throws IllegalArgumentException, UriBuilderException {
         try {
             return new URI(scheme, 
                            userInfo, 
@@ -67,19 +66,6 @@
         } catch (URISyntaxException ex) {
             throw new UriBuilderException("URI can not be built", ex);
         }
-        
-    }
-
-    @Override
-    public URI build(Map<String, Object> parts) throws IllegalArgumentException, UriBuilderException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public URI build(Object... values) throws IllegalArgumentException, UriBuilderException {
-        // TODO Auto-generated method stub
-        return null;
     }
 
 //CHECKSTYLE:OFF
@@ -90,12 +76,6 @@
 //CHECKSTYLE:ON
     
     @Override
-    public UriBuilder encode(boolean enable) {
-        //this.encode = enable;
-        return this;
-    }
-
-    @Override
     public UriBuilder fragment(String theFragment) throws IllegalArgumentException {
         this.fragment = theFragment;
         return this;
@@ -108,35 +88,12 @@
     }
 
     @Override
-    public UriBuilder matrixParam(String name, String value) throws IllegalArgumentException {
-        matrix.putSingle(name, value);
-        return this;
-    }
-
-    @Override
-    public UriBuilder path(String... segments) throws IllegalArgumentException {
-        if (paths == null) {
-            paths = new ArrayList<PathSegment>();
-        }
-        for (String segment : segments) {
-            paths.add(new PathSegmentImpl(segment, false));
-        }
-        return this;
-    }
-
-    @Override
     public UriBuilder path(Class resource) throws IllegalArgumentException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
-    public UriBuilder path(Method... methods) throws IllegalArgumentException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
     public UriBuilder path(Class resource, String method) throws IllegalArgumentException {
         // TODO Auto-generated method stub
         return null;
@@ -149,27 +106,6 @@
     }
 
     @Override
-    public UriBuilder queryParam(String name, String value) throws IllegalArgumentException {
-        if (query == null) {
-            query = new MetadataMap<String, String>();
-        }
-        query.add(name, value);
-        return this;
-    }
-
-    @Override
-    public UriBuilder replaceMatrixParams(String m) throws IllegalArgumentException {
-        matrix = JAXRSUtils.getStructuredParams(m, ";", true);
-        return this;
-    }
-
-    @Override
-    public UriBuilder replaceQueryParams(String q) throws IllegalArgumentException {
-        this.query = JAXRSUtils.getStructuredParams(q, "&", true);
-        return this;
-    }
-
-    @Override
     public UriBuilder scheme(String s) throws IllegalArgumentException {
         scheme = s;
         return this;
@@ -229,19 +165,95 @@
     }
 
     @Override
-    public boolean isEncode() {
+    public URI buildFromEncoded(Object... values) throws IllegalArgumentException, UriBuilderException {
+        try {
+            return new URI(scheme, 
+                           userInfo, 
+                           host, 
+                           port, 
+                           buildPath(), 
+                           buildQuery(), 
+                           fragment);
+        } catch (URISyntaxException ex) {
+            throw new UriBuilderException("URI can not be built", ex);
+        }
+    }
+
+    @Override
+    public URI buildFromEncodedMap(Map<String, ? extends Object> arg0) 
+        throws IllegalArgumentException, UriBuilderException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public URI buildFromMap(Map<String, ? extends Object> arg0) 
+        throws IllegalArgumentException, UriBuilderException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public UriBuilder matrixParam(String name, Object... values) throws IllegalArgumentException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public UriBuilder path(String path) throws IllegalArgumentException {
+        List<PathSegment> segments = JAXRSUtils.getPathSegments(path, false);
+        paths.addAll(segments);
+        return this;
+    }
+
+    @Override
+    public UriBuilder path(Method method) throws IllegalArgumentException {
         // TODO Auto-generated method stub
-        return false;
+        return null;
+    }
+
+    @Override
+    public UriBuilder queryParam(String name, Object... values) throws IllegalArgumentException {
+        List<String> queryList = new ArrayList<String>();
+        for (Object value : values) {
+            queryList.add(value.toString());
+        }
+        query.put(name, queryList);
+        return this;
+    }
+
+    @Override
+    public UriBuilder replaceMatrix(String matrix) throws IllegalArgumentException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public UriBuilder replaceMatrixParam(String name, Object... values) throws IllegalArgumentException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public UriBuilder replacePath(String path) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public UriBuilder replaceQuery(String queryValue) throws IllegalArgumentException {
+        // TODO Auto-generated method stub
+        return null;
     }
 
     @Override
-    public UriBuilder replacePath(String... segments) throws IllegalArgumentException {
+    public UriBuilder segment(String... segments) throws IllegalArgumentException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
-    public UriBuilder extension(String arg0) {
+    public UriBuilder replaceQueryParam(String name, Object... values) throws IllegalArgumentException {
         // TODO Auto-generated method stub
         return null;
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java Fri Oct 24 04:45:29 2008
@@ -128,28 +128,20 @@
         return value;
     }
 
-    public List<String> getAncestorResourceURIs() {
+    public List<Object> getMatchedResources() {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public List<Object> getAncestorResources() {
+    public List<String> getMatchedURIs() {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public List<String> getAncestorResourceURIs(boolean arg0) {
+    public List<String> getMatchedURIs(boolean decode) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public String getPathExtension() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public UriBuilder getPlatonicRequestUriBuilder() {
-        // TODO Auto-generated method stub
-        return null;
-    }
+    
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImpl.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImpl.java Fri Oct 24 04:45:29 2008
@@ -24,6 +24,7 @@
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Locale;
 import java.util.Set;
 
 import javax.ws.rs.core.MediaType;
@@ -33,7 +34,7 @@
 public class VariantListBuilderImpl extends VariantListBuilder {
     
     private Set<String> encodings = new HashSet<String>();
-    private Set<String> languages = new HashSet<String>();
+    private Set<Locale> languages = new HashSet<Locale>();
     private Set<MediaType> mediaTypes = new HashSet<MediaType>();
     private List<Variant> variants = new ArrayList<Variant>();
     
@@ -62,12 +63,6 @@
     }
 
     @Override
-    public VariantListBuilder languages(String... ls) {
-        languages.addAll(Arrays.asList(ls));
-        return this;
-    }
-
-    @Override
     public VariantListBuilder mediaTypes(MediaType... types) {
         mediaTypes.addAll(Arrays.asList(types));
         return this;
@@ -111,7 +106,7 @@
     }
     
     private void handleLanguages(MediaType type) {
-        for (String lang : languages) {
+        for (Locale lang : languages) {
             if (encodings.size() > 0) {
                 for (String enc : encodings) {
                     variants.add(new Variant(type, lang, enc));
@@ -121,5 +116,10 @@
             }
         }
     }
-    
+
+    @Override
+    public VariantListBuilder languages(Locale... ls) {
+        languages.addAll(Arrays.asList(ls));
+        return this;
+    }
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalHttpHeaders.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalHttpHeaders.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalHttpHeaders.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalHttpHeaders.java Fri Oct 24 04:45:29 2008
@@ -21,6 +21,7 @@
 package org.apache.cxf.jaxrs.impl.tl;
 
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.ws.rs.core.Cookie;
@@ -39,7 +40,7 @@
         return get().getCookies();
     }
 
-    public String getLanguage() {
+    public Locale getLanguage() {
         return get().getLanguage();
     }
 
@@ -51,7 +52,7 @@
         return get().getRequestHeaders();
     }
 
-    public List<String> getAcceptableLanguages() {
+    public List<Locale> getAcceptableLanguages() {
         return get().getAcceptableLanguages();
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageBodyWorkers.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageBodyWorkers.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageBodyWorkers.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageBodyWorkers.java Fri Oct 24 04:45:29 2008
@@ -23,12 +23,14 @@
 import java.lang.reflect.Type;
 
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ext.ContextResolver;
+import javax.ws.rs.ext.ExceptionMapper;
 import javax.ws.rs.ext.MessageBodyReader;
-import javax.ws.rs.ext.MessageBodyWorkers;
 import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Providers;
 
-public class ThreadLocalMessageBodyWorkers extends AbstractThreadLocalProxy<MessageBodyWorkers>
-       implements MessageBodyWorkers {
+public class ThreadLocalMessageBodyWorkers extends AbstractThreadLocalProxy<Providers>
+       implements Providers {
 
     public <T> MessageBodyReader<T> getMessageBodyReader(Class<T> type, 
                                                          Type genericType, 
@@ -44,4 +46,12 @@
         return get().getMessageBodyWriter(type, genericType, annotations, mediaType);
     }
 
+    public <T> ContextResolver<T> getContextResolver(Class<T> contextType, MediaType mediaType) {
+        return get().getContextResolver(contextType, mediaType);
+    }
+
+    public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) {
+        return get().getExceptionMapper(type);
+    }
+
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalRequest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalRequest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalRequest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalRequest.java Fri Oct 24 04:45:29 2008
@@ -46,4 +46,8 @@
         return get().selectVariant(vars);
     }
 
+    public String getMethod() {
+        return get().getMethod();
+    }
+
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalUriInfo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalUriInfo.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalUriInfo.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalUriInfo.java Fri Oct 24 04:45:29 2008
@@ -39,14 +39,7 @@
         return get().getAbsolutePathBuilder();
     }
 
-    public List<String> getAncestorResourceURIs() {
-        return get().getAncestorResourceURIs();
-    }
-
-    public List<Object> getAncestorResources() {
-        return get().getAncestorResources();
-    }
-
+    
     public URI getBaseUri() {
         return get().getBaseUri();
     }
@@ -95,16 +88,16 @@
         return get().getPathParameters(decode);
     }
 
-    public List<String> getAncestorResourceURIs(boolean decode) {
-        return get().getAncestorResourceURIs(decode);
+    public List<Object> getMatchedResources() {
+        return get().getMatchedResources();
     }
 
-    public String getPathExtension() {
-        return get().getPathExtension();
+    public List<String> getMatchedURIs() {
+        return get().getMatchedURIs();
     }
 
-    public UriBuilder getPlatonicRequestUriBuilder() {
-        return get().getPlatonicRequestUriBuilder();
+    public List<String> getMatchedURIs(boolean decode) {
+        return get().getMatchedURIs(decode);
     }
 
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java Fri Oct 24 04:45:29 2008
@@ -26,9 +26,9 @@
 import java.util.Collections;
 import java.util.List;
 
-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 org.apache.cxf.jaxrs.lifecycle.ResourceProvider;
 import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
@@ -134,12 +134,12 @@
         resourceProvider = rp;
     }
     
-    public ProduceMime getProduceMime() {
-        return (ProduceMime)AnnotationUtils.getClassAnnotation(getServiceClass(), ProduceMime.class);
+    public Produces getProduceMime() {
+        return (Produces)AnnotationUtils.getClassAnnotation(getServiceClass(), Produces.class);
     }
     
-    public ConsumeMime getConsumeMime() {
-        return (ConsumeMime)AnnotationUtils.getClassAnnotation(getServiceClass(), ConsumeMime.class);
+    public Consumes getConsumeMime() {
+        return (Consumes)AnnotationUtils.getClassAnnotation(getServiceClass(), Consumes.class);
     }
     
     public Path getPath() {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java Fri Oct 24 04:45:29 2008
@@ -22,10 +22,10 @@
 import java.lang.reflect.Method;
 import java.util.List;
 
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.DefaultValue;
 import javax.ws.rs.Encoded;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 
 import org.apache.cxf.jaxrs.utils.AnnotationUtils;
@@ -110,8 +110,8 @@
     }
     
     private void checkMediaTypes() {
-        ConsumeMime cm = 
-            (ConsumeMime)AnnotationUtils.getMethodAnnotation(annotatedMethod, ConsumeMime.class);
+        Consumes cm = 
+            (Consumes)AnnotationUtils.getMethodAnnotation(annotatedMethod, Consumes.class);
         if (cm != null) {
             consumeMimes = JAXRSUtils.sortMediaTypes(JAXRSUtils.getMediaTypes(cm.value()));
         } else if (classResourceInfo != null) {
@@ -119,8 +119,8 @@
                                JAXRSUtils.getConsumeTypes(classResourceInfo.getConsumeMime()));
         }
         
-        ProduceMime pm = 
-            (ProduceMime)AnnotationUtils.getMethodAnnotation(annotatedMethod, ProduceMime.class);
+        Produces pm = 
+            (Produces)AnnotationUtils.getMethodAnnotation(annotatedMethod, Produces.class);
         if (pm != null) {
             produceMimes = JAXRSUtils.sortMediaTypes(JAXRSUtils.getMediaTypes(pm.value()));
         } else if (classResourceInfo != null) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/URITemplate.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/URITemplate.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/URITemplate.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/URITemplate.java Fri Oct 24 04:45:29 2008
@@ -164,6 +164,6 @@
             pathValue = "/" + pathValue;
         }
         
-        return new URITemplate(pathValue, path.limited());
+        return new URITemplate(pathValue);
     }
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAegisProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAegisProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAegisProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAegisProvider.java Fri Oct 24 04:45:29 2008
@@ -36,6 +36,7 @@
 import java.util.logging.Logger;
 
 import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.ext.ContextResolver;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.MessageBodyWriter;
@@ -60,11 +61,11 @@
     @Context protected ContextResolver<AegisContext> resolver;
     private Schema schema;
     
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] anns) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] anns, MediaType mt) {
         return isSupported(type, genericType, anns);
     }
     
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return isSupported(type, genericType, annotations);
     }
 
@@ -72,7 +73,7 @@
         schema = createSchema(locations);    
     }
     
-    public long getSize(Object o) {
+    public long getSize(Object o, Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return -1;
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java Fri Oct 24 04:45:29 2008
@@ -71,12 +71,12 @@
     @Context protected ContextResolver<JAXBContext> resolver;
     private Schema schema;
     
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] anns) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] anns, MediaType mt) {
         return isSupported(type, genericType, anns)
                || AnnotationUtils.getAnnotation(anns, XmlJavaTypeAdapter.class) != null;
     }
     
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return isSupported(type, genericType, annotations);
     }
 
@@ -84,7 +84,7 @@
         schema = createSchema(locations);    
     }
     
-    public long getSize(Object o) {
+    public long getSize(Object o, Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return -1;
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomEntryProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomEntryProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomEntryProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomEntryProvider.java Fri Oct 24 04:45:29 2008
@@ -25,8 +25,8 @@
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 
-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.MessageBodyReader;
@@ -38,8 +38,8 @@
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.writer.Writer;
 
-@ProduceMime({"application/atom+xml", "application/atom+xml;type=entry", "application/json" })
-@ConsumeMime({"application/atom+xml", "application/atom+xml;type=entry" })
+@Produces({"application/atom+xml", "application/atom+xml;type=entry", "application/json" })
+@Consumes({"application/atom+xml", "application/atom+xml;type=entry" })
 @Provider
 public class AtomEntryProvider 
     implements MessageBodyReader<Entry>, MessageBodyWriter<Entry> {
@@ -47,11 +47,12 @@
     private static final Abdera ATOM_ENGINE = new Abdera();
     private static final String JSON_TYPE = "application/json";
     
-    public long getSize(Entry feed) {
+    public long getSize(Entry feed,
+                        Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return -1;
     }
 
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return Entry.class.isAssignableFrom(type);
     }
 
@@ -67,7 +68,7 @@
         
     }
 
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return Entry.class.isAssignableFrom(type);
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomFeedProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomFeedProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomFeedProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomFeedProvider.java Fri Oct 24 04:45:29 2008
@@ -25,8 +25,8 @@
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 
-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.MessageBodyReader;
@@ -38,8 +38,8 @@
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.writer.Writer;
 
-@ProduceMime({"application/atom+xml", "application/atom+xml;type=feed", "application/json" })
-@ConsumeMime({"application/atom+xml", "application/atom+xml;type=feed" })
+@Produces({"application/atom+xml", "application/atom+xml;type=feed", "application/json" })
+@Consumes({"application/atom+xml", "application/atom+xml;type=feed" })
 @Provider
 public class AtomFeedProvider 
     implements MessageBodyWriter<Feed>, MessageBodyReader<Feed> {
@@ -47,11 +47,11 @@
     private static final String JSON_TYPE = "application/json";
     private static final Abdera ATOM_ENGINE = new Abdera();
         
-    public long getSize(Feed feed) {
+    public long getSize(Feed feed, Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return -1;
     }
 
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return Feed.class.isAssignableFrom(type);
     }
 
@@ -67,7 +67,7 @@
         
     }
 
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return Feed.class.isAssignableFrom(type);
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/BinaryDataProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/BinaryDataProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/BinaryDataProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/BinaryDataProvider.java Fri Oct 24 04:45:29 2008
@@ -45,7 +45,7 @@
     
     private static final int BUFFER_SIZE = 4096;
 
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return byte[].class.isAssignableFrom(type)
                || InputStream.class.isAssignableFrom(type)
                || Reader.class.isAssignableFrom(type);
@@ -66,14 +66,14 @@
         throw new IOException("Unrecognized class");
     }
 
-    public long getSize(Object t) {
+    public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         if (byte[].class.isAssignableFrom(t.getClass())) {
             return ((byte[])t).length;
         }
         return -1;
     }
 
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return byte[].class.isAssignableFrom(type)
             || InputStream.class.isAssignableFrom(type)
             || File.class.isAssignableFrom(type)

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProvider.java Fri Oct 24 04:45:29 2008
@@ -28,7 +28,7 @@
 import java.util.Arrays;
 import java.util.List;
 
-import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
@@ -38,12 +38,12 @@
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
 
-@ConsumeMime("application/x-www-form-urlencoded")
+@Consumes("application/x-www-form-urlencoded")
 @Provider
 public final class FormEncodingReaderProvider implements MessageBodyReader<Object> {
 
     public boolean isReadable(Class<?> type, Type genericType, 
-                              Annotation[] annotations) {
+                              Annotation[] annotations, MediaType mt) {
         return type.isAssignableFrom(MultivaluedMap.class);
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java Fri Oct 24 04:45:29 2008
@@ -29,8 +29,8 @@
 import java.util.List;
 import java.util.Map;
 
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
@@ -48,8 +48,8 @@
 import org.codehaus.jettison.mapped.MappedXMLInputFactory;
 import org.codehaus.jettison.mapped.MappedXMLOutputFactory;
 
-@ProduceMime("application/json")
-@ConsumeMime("application/json")
+@Produces("application/json")
+@Consumes("application/json")
 @Provider
 public final class JSONProvider extends AbstractJAXBProvider  {
     

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java Fri Oct 24 04:45:29 2008
@@ -24,8 +24,8 @@
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 
-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.MessageBodyReader;
@@ -34,8 +34,8 @@
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 
-@ProduceMime("text/plain")
-@ConsumeMime("text/plain")
+@Produces("text/plain")
+@Consumes("text/plain")
 public class PrimitiveTextProvider 
     implements MessageBodyReader<Object>, MessageBodyWriter<Object> {
 
@@ -45,7 +45,7 @@
             || Boolean.class.isAssignableFrom(type);
     }
     
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return isSupported(type);
     }
 
@@ -55,11 +55,11 @@
                     IOUtils.readStringFromStream(is).toString(), type);
     }
 
-    public long getSize(Object t) {
+    public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return -1;
     }
 
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return isSupported(type);
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java Fri Oct 24 04:45:29 2008
@@ -28,8 +28,8 @@
 import java.util.Comparator;
 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.ext.ContextResolver;
 import javax.ws.rs.ext.ExceptionMapper;
@@ -93,7 +93,17 @@
     }
 
     @SuppressWarnings("unchecked")
-    public <T> ContextResolver<T> createContextResolver(Type contextType, Message m) {
+    public <T> ContextResolver<T> createContextResolver(Type contextType, 
+                                                        Message m) {
+        // TODO : get media type from message  
+        return createContextResolver(contextType, m, null);
+        
+    }
+    
+    @SuppressWarnings("unchecked")
+    public <T> ContextResolver<T> createContextResolver(Type contextType, 
+                                                        Message m,
+                                                        MediaType type) {
         for (ProviderInfo<ContextResolver> cr : userContextResolvers) {
             Type[] types = cr.getProvider().getClass().getGenericInterfaces();
             for (Type t : types) {
@@ -115,7 +125,7 @@
     }
     
     @SuppressWarnings("unchecked")
-    public <T> ExceptionMapper<T> createExceptionMapper(Class<?> exceptionType, Message m) {
+    public <T extends Throwable> ExceptionMapper<T> createExceptionMapper(Class<?> exceptionType, Message m) {
         for (ProviderInfo<ExceptionMapper> em : userExceptionMappers) {
             Type[] types = em.getProvider().getClass().getGenericInterfaces();
             for (Type t : types) {
@@ -302,12 +312,12 @@
                                                Type genericType,
                                                Annotation[] annotations,
                                                MediaType mediaType) {
-        if (!ep.isReadable(type, genericType, annotations)) {
+        if (!ep.isReadable(type, genericType, annotations, mediaType)) {
             return false;
         }
         
         List<MediaType> supportedMediaTypes =
-            JAXRSUtils.getConsumeTypes(ep.getClass().getAnnotation(ConsumeMime.class));
+            JAXRSUtils.getConsumeTypes(ep.getClass().getAnnotation(Consumes.class));
         
         List<MediaType> availableMimeTypes = 
             JAXRSUtils.intersectMimeTypes(Collections.singletonList(mediaType),
@@ -352,12 +362,12 @@
                                                Type genericType,
                                                Annotation[] annotations,
                                                MediaType mediaType) {
-        if (!ep.isWriteable(type, genericType, annotations)) {
+        if (!ep.isWriteable(type, genericType, annotations, mediaType)) {
             return false;
         }
         
         List<MediaType> supportedMediaTypes =
-            JAXRSUtils.getProduceTypes(ep.getClass().getAnnotation(ProduceMime.class));
+            JAXRSUtils.getProduceTypes(ep.getClass().getAnnotation(Produces.class));
         
         List<MediaType> availableMimeTypes = 
             JAXRSUtils.intersectMimeTypes(Collections.singletonList(mediaType),
@@ -432,13 +442,13 @@
             MessageBodyReader e1 = p1.getProvider();
             MessageBodyReader e2 = p2.getProvider();
             
-            ConsumeMime c = e1.getClass().getAnnotation(ConsumeMime.class);
+            Consumes c = e1.getClass().getAnnotation(Consumes.class);
             String[] mimeType1 = {"*/*"};
             if (c != null) {
                 mimeType1 = c.value();               
             }
             
-            ConsumeMime c2 = e2.getClass().getAnnotation(ConsumeMime.class);
+            Consumes c2 = e2.getClass().getAnnotation(Consumes.class);
             String[] mimeType2 = {"*/*"};
             if (c2 != null) {
                 mimeType2 = c2.value();               
@@ -467,13 +477,13 @@
             MessageBodyWriter e1 = p1.getProvider();
             MessageBodyWriter e2 = p2.getProvider();
             
-            ProduceMime c = e1.getClass().getAnnotation(ProduceMime.class);
+            Produces c = e1.getClass().getAnnotation(Produces.class);
             String[] mimeType1 = {"*/*"};
             if (c != null) {
                 mimeType1 = c.value();               
             }
             
-            ProduceMime c2 = e2.getClass().getAnnotation(ProduceMime.class);
+            Produces c2 = e2.getClass().getAnnotation(Produces.class);
             String[] mimeType2 = {"*/*"};
             if (c2 != null) {
                 mimeType2 = c2.value();               

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SourceProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SourceProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SourceProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SourceProvider.java Fri Oct 24 04:45:29 2008
@@ -47,11 +47,11 @@
 public class SourceProvider implements 
     MessageBodyReader<Object>, MessageBodyWriter<Source> {
 
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return Source.class.isAssignableFrom(type);
     }
     
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return Source.class.isAssignableFrom(type);
     }
     
@@ -94,7 +94,8 @@
         }
     }
     
-    public long getSize(Source source) {
+    public long getSize(Source source, Class<?> type, Type genericType, Annotation[] annotations, 
+                        MediaType mt) {
         return -1;
     }
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/StringProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/StringProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/StringProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/StringProvider.java Fri Oct 24 04:45:29 2008
@@ -38,15 +38,15 @@
 public final class StringProvider 
     implements MessageBodyWriter<String>, MessageBodyReader<String>  {
 
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return type == String.class;
     }
     
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return type == String.class;
     }
     
-    public long getSize(String s) {
+    public long getSize(String s, Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return s.length();
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansElementProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansElementProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansElementProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansElementProvider.java Fri Oct 24 04:45:29 2008
@@ -29,8 +29,8 @@
 import java.lang.reflect.Type;
 import java.net.HttpURLConnection;
 
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
@@ -44,8 +44,8 @@
 /**
  * Provider for XMLBeans data objects.
  */
-@ProduceMime("application/xml")
-@ConsumeMime("application/xml")
+@Produces("application/xml")
+@Consumes("application/xml")
 @Provider
 public class XMLBeansElementProvider implements MessageBodyReader<XmlObject>, MessageBodyWriter<XmlObject> {
 
@@ -68,18 +68,19 @@
     }
 
     /** {@inheritDoc} */
-    public long getSize(XmlObject t) {
+    public long getSize(XmlObject t, Class<?> type, Type genericType, Annotation[] annotations, 
+                        MediaType mt) {
         // return length not known
         return -1;
     }
 
     /** {@inheritDoc} */
-    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return isXmlBean(type);
     }
 
     /** {@inheritDoc} */
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
         return isXmlBean(type);
     }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansJSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansJSONProvider.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansJSONProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansJSONProvider.java Fri Oct 24 04:45:29 2008
@@ -29,8 +29,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
@@ -47,8 +47,8 @@
 /**
  * JSON provider for XMLBeans data objects.
  */
-@ProduceMime("application/json")
-@ConsumeMime("application/json")
+@Produces("application/json")
+@Consumes("application/json")
 @Provider
 public final class XMLBeansJSONProvider extends XMLBeansElementProvider {
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java Fri Oct 24 04:45:29 2008
@@ -27,16 +27,17 @@
 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.CookieParam;
 import javax.ws.rs.DefaultValue;
 import javax.ws.rs.Encoded;
+import javax.ws.rs.FormParam;
 import javax.ws.rs.HeaderParam;
 import javax.ws.rs.HttpMethod;
 import javax.ws.rs.MatrixParam;
 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.core.Context;
 import javax.ws.rs.core.HttpHeaders;
@@ -44,7 +45,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 org.apache.cxf.jaxrs.model.OperationResourceInfo;
 
@@ -70,7 +71,7 @@
         classes.add(SecurityContext.class);
         classes.add(HttpHeaders.class);
         classes.add(ContextResolver.class);
-        classes.add(MessageBodyWorkers.class);
+        classes.add(Providers.class);
         classes.add(Request.class);
         classes.add(HttpServletRequest.class);
         classes.add(HttpServletResponse.class);
@@ -85,6 +86,7 @@
         classes.add(MatrixParam.class);
         classes.add(HeaderParam.class);
         classes.add(CookieParam.class);
+        classes.add(FormParam.class);
         return classes;
     }
     
@@ -92,8 +94,8 @@
         Set<Class> classes = new HashSet<Class>();
         classes.add(HttpMethod.class);
         classes.add(Path.class);
-        classes.add(ProduceMime.class);
-        classes.add(ConsumeMime.class);
+        classes.add(Produces.class);
+        classes.add(Consumes.class);
         return classes;
     }
     
@@ -125,18 +127,21 @@
     }
     
     public static String getAnnotationValue(Annotation a) {
+        String value = null;
         if (a.annotationType() == PathParam.class) {
-            return ((PathParam)a).value();
+            value = ((PathParam)a).value();
         } else if (a.annotationType() == QueryParam.class) {
-            return ((QueryParam)a).value();
+            value = ((QueryParam)a).value();
         } else if (a.annotationType() == MatrixParam.class) {
-            return ((MatrixParam)a).value();
+            value = ((MatrixParam)a).value();
         } else if (a.annotationType() == HeaderParam.class) {
-            return ((HeaderParam)a).value();
+            value = ((HeaderParam)a).value();
         } else if (a.annotationType() == CookieParam.class) {
-            return ((CookieParam)a).value();
+            value = ((CookieParam)a).value();
+        } else if (a.annotationType() == FormParam.class) {
+            value = ((FormParam)a).value();
         }
-        return null;
+        return value;
     }
     
     @SuppressWarnings("unchecked")

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java Fri Oct 24 04:45:29 2008
@@ -47,7 +47,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 org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.logging.LogUtils;
@@ -290,7 +290,7 @@
             proxy = new ThreadLocalContextResolver();
         } else if (Request.class.isAssignableFrom(type)) {
             proxy = new ThreadLocalRequest();
-        }  else if (MessageBodyWorkers.class.isAssignableFrom(type)) {
+        }  else if (Providers.class.isAssignableFrom(type)) {
             proxy = new ThreadLocalMessageBodyWorkers();
         } else if (HttpServletRequest.class.isAssignableFrom(type)) {
             proxy = new ThreadLocalHttpServletRequest();

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Fri Oct 24 04:45:29 2008
@@ -45,12 +45,12 @@
 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.CookieParam;
 import javax.ws.rs.HeaderParam;
 import javax.ws.rs.MatrixParam;
 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.Context;
@@ -66,7 +66,7 @@
 import javax.ws.rs.ext.ContextResolver;
 import javax.ws.rs.ext.ExceptionMapper;
 import javax.ws.rs.ext.MessageBodyReader;
-import javax.ws.rs.ext.MessageBodyWorkers;
+import javax.ws.rs.ext.Providers;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
@@ -256,23 +256,24 @@
 
     
     
-    public static List<MediaType> getConsumeTypes(ConsumeMime cm) {
+    public static List<MediaType> getConsumeTypes(Consumes cm) {
         return cm == null ? Collections.singletonList(ALL_TYPES)
                           : getMediaTypes(cm.value());
     }
     
-    public static List<MediaType> getProduceTypes(ProduceMime pm) {
+    public static List<MediaType> getProduceTypes(Produces pm) {
         return pm == null ? Collections.singletonList(ALL_TYPES)
                           : getMediaTypes(pm.value());
     }
     
     public static int compareMediaTypes(MediaType mt1, MediaType mt2) {
         
-        if (mt1.equals(mt2)) {
+        if (mt1.getType().equals(mt2.getType())
+            && mt1.getSubtype().equals(mt2.getSubtype())) {
             float q1 = getMediaTypeQualityFactor(mt1.getParameters().get("q"));
             float q2 = getMediaTypeQualityFactor(mt2.getParameters().get("q"));
             int result = Float.compare(q1, q2);
-            return result == 0 ? result : ~result;
+            return result == 0 ? result : result * -1;
         }
         
         if (mt1.isWildcardType() && !mt2.isWildcardType()) {
@@ -490,7 +491,7 @@
             o = new RequestImpl(m);
         } else if (SecurityContext.class.isAssignableFrom(clazz)) {
             o = new SecurityContextImpl(m);
-        } else if (MessageBodyWorkers.class.isAssignableFrom(clazz)) {
+        } else if (Providers.class.isAssignableFrom(clazz)) {
             o = new MessageBodyWorkersImpl(m);
         } else if (ContextResolver.class.isAssignableFrom(clazz)) {
             o = createContextResolver(genericType, m);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java Fri Oct 24 04:45:29 2008
@@ -23,12 +23,12 @@
 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.HeaderParam;
 import javax.ws.rs.MatrixParam;
 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.core.Context;
 import javax.ws.rs.core.HttpHeaders;
@@ -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 javax.xml.bind.annotation.XmlRootElement;
 
@@ -68,7 +68,7 @@
     @Context private HttpHeaders headers;
     @Context private Request request;
     @Context private SecurityContext sContext;
-    @Context private MessageBodyWorkers bodyWorkers;
+    @Context private Providers bodyWorkers;
     
     @Resource private HttpServletRequest servletRequest;
     @Resource private HttpServletResponse servletResponse;
@@ -136,7 +136,7 @@
         return request;
     }
     
-    public MessageBodyWorkers getBodyWorkers() {
+    public Providers getBodyWorkers() {
         return bodyWorkers;
     }
     
@@ -172,28 +172,28 @@
         return cr;
     }
 
-    @ProduceMime("text/xml")
-    @ConsumeMime("text/xml")
+    @Produces("text/xml")
+    @Consumes("text/xml")
     public void test() {
         // complete
     }
     
-    @ProduceMime("text/xml")   
+    @Produces("text/xml")   
     public void getItAsXML() {
         // complete
     }
-    @ProduceMime("text/plain")   
+    @Produces("text/plain")   
     public void getItPlain() {
         // complete
     }
     
-    @ProduceMime("text/xml")   
+    @Produces("text/xml")   
     public void testQuery(@QueryParam("query") String queryString, 
                           @QueryParam("query") int queryInt) {
         // complete
     }
     
-    @ProduceMime("text/xml")   
+    @Produces("text/xml")   
     public void testMultipleQuery(@QueryParam("query")  String queryString, 
                                   @QueryParam("query2") String queryString2,
                                   @QueryParam("query3") Long queryString3,
@@ -202,7 +202,7 @@
         // complete
     }
     
-    @ProduceMime("text/xml")   
+    @Produces("text/xml")   
     public void testMatrixParam(@MatrixParam("p1")  String queryString, 
                                 @MatrixParam("p2") String queryString2) {
         // complete
@@ -212,7 +212,7 @@
                            @Context HttpHeaders hs,
                            @Context Request r,
                            @Context SecurityContext s,
-                           @Context MessageBodyWorkers workers,
+                           @Context Providers workers,
                            @HeaderParam("Foo") String h) {
         // complete
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java Fri Oct 24 04:45:29 2008
@@ -32,7 +32,7 @@
     public void testFromSimpleString() {
         CacheControl c = CacheControl.valueOf(
             "public;must-revalidate");
-        assertTrue(c.isPublic() && !c.isPrivate() && !c.isNoStore()
+        assertTrue(!c.isPrivate() && !c.isNoStore()
                    && c.isMustRevalidate() && !c.isProxyRevalidate());
         assertTrue(!c.isNoCache()
                    && !c.isNoTransform() && c.getNoCacheFields().size() == 0
@@ -44,7 +44,7 @@
         CacheControl c = CacheControl.valueOf(
             "private=\"foo\";no-cache=\"bar\";no-store;no-transform;"
             + "must-revalidate;proxy-revalidate;max-age=2;s-maxage=3");
-        assertTrue(!c.isPublic() && c.isPrivate() && c.isNoStore()
+        assertTrue(c.isPrivate() && c.isNoStore()
                    && c.isMustRevalidate() && c.isProxyRevalidate() && c.isNoCache());
         assertTrue(c.isNoTransform() && c.getNoCacheFields().size() == 1
                    && c.getPrivateFields().size() == 1);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java Fri Oct 24 04:45:29 2008
@@ -19,8 +19,10 @@
 
 package org.apache.cxf.jaxrs.impl;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
+import java.util.Locale;
 
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MultivaluedMap;
@@ -55,21 +57,75 @@
     }
     
     @Test
-    public void testGetLanguage() throws Exception {
+    public void testGetNullLanguage() throws Exception {
         
         Message m = control.createMock(Message.class);
         m.get(Message.PROTOCOL_HEADERS);
         EasyMock.expectLastCall().andReturn(createHeaders());
         control.replay();
         HttpHeaders h = new HttpHeadersImpl(m);
-        assertEquals("UTF-8", h.getLanguage());
+        assertNull(h.getLanguage());
+    }
+    
+    @Test
+    public void testGetLanguage() throws Exception {
+        
+        Message m = control.createMock(Message.class);
+        m.get(Message.PROTOCOL_HEADERS);
+        MetadataMap<String, String> headers = createHeaders();
+        headers.putSingle(HttpHeaders.CONTENT_LANGUAGE, "en");
+        EasyMock.expectLastCall().andReturn(headers);
+        control.replay();
+        HttpHeaders h = new HttpHeadersImpl(m);
+        assertEquals(new Locale("en"), h.getLanguage());
+    }
+    
+    @Test
+    public void testSingleAcceptableLanguages() throws Exception {
+        
+        Message m = control.createMock(Message.class);
+        m.get(Message.PROTOCOL_HEADERS);
+        MetadataMap<String, String> headers = createHeaders();
+        headers.putSingle(HttpHeaders.ACCEPT_LANGUAGE, "en");
+        EasyMock.expectLastCall().andReturn(headers);
+        control.replay();
+        HttpHeaders h = new HttpHeadersImpl(m);
+        List<Locale> languages = h.getAcceptableLanguages();
+        assertEquals(1, languages.size());
+        assertEquals(new Locale("en"), languages.get(0));
     }
     
+    @Test
+    public void testMultipleAcceptableLanguages() throws Exception {
         
-    private Map<String, List<String>> createHeaders() {
+        Message m = control.createMock(Message.class);
+        m.get(Message.PROTOCOL_HEADERS);
+        MetadataMap<String, String> headers = 
+            createHeader(HttpHeaders.ACCEPT_LANGUAGE, 
+                         "en;q=0.7, en-gb;q=0.8, da");
+        EasyMock.expectLastCall().andReturn(headers);
+        control.replay();
+        HttpHeaders h = new HttpHeadersImpl(m);
+        List<Locale> languages = h.getAcceptableLanguages();
+        assertEquals(3, languages.size());
+        assertEquals(new Locale("da"), languages.get(0));
+        assertEquals(new Locale("en-gb"), languages.get(1));
+        assertEquals(new Locale("en"), languages.get(2));
+    }
+    
+        
+    private MetadataMap<String, String> createHeaders() {
         MetadataMap<String, String> hs = new MetadataMap<String, String>();
         hs.putSingle("Accept", "text/*");
         hs.putSingle("Content-Type", "*/*");
         return hs;
     }
+    
+    private MetadataMap<String, String> createHeader(String name, String... values) {
+        MetadataMap<String, String> hs = new MetadataMap<String, String>();
+        List<String> list = new ArrayList<String>();
+        list.addAll(Arrays.asList(values));
+        hs.put(name, list);
+        return hs;
+    }
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java Fri Oct 24 04:45:29 2008
@@ -33,7 +33,6 @@
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 public class RequestImplTest extends Assert {
@@ -46,6 +45,7 @@
         m = new MessageImpl();
         metadata = new MetadataMap<String, String>();
         m.put(Message.PROTOCOL_HEADERS, metadata);
+        m.put(Message.HTTP_REQUEST_METHOD, "GET");
     }
     
     @After
@@ -68,6 +68,14 @@
     }
     
     @Test
+    public void testGetMethod() {
+        assertEquals("Wrong method", 
+                   "GET", new RequestImpl(m).getMethod());
+        
+    }
+    
+    
+    @Test
     public void testStrictEtags() {
         metadata.putSingle("If-Match", new EntityTag("123").toString());
         
@@ -87,9 +95,9 @@
     
     @Test
     public void testBeforeDate() throws Exception {
-        metadata.putSingle("If-Modified-Since", "Sat, 29 Oct 1994 19:43:31 GMT");
+        metadata.putSingle("If-Modified-Since", "Tue, 21 Oct 2008 14:00:00 GMT");
         Date serverDate = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH)
-            .parse("Sun, 29 Oct 1994 19:43:31 GMT");
+            .parse("Tue, 21 Oct 2008 17:00:00 GMT");
         
         ResponseBuilder rb = 
             new RequestImpl(m).evaluatePreconditions(serverDate);
@@ -97,18 +105,18 @@
     }
     
     @Test
-    @Ignore
     public void testAfterDate() throws Exception {
-        metadata.putSingle("If-Modified-Since", "Sat, 29 Oct 1994 19:43:31 GMT");
-        Date serverDate = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH)
-            .parse("Fri, 28 Oct 1994 19:43:31 GMT");
+        metadata.putSingle("If-Modified-Since", "Tue, 21 Oct 2008 14:00:00 GMT");
+        Date lastModified = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH)
+            .parse("Mon, 20 Oct 2008 14:00:00 GMT");
         
         
         ResponseBuilder rb = 
-            new RequestImpl(m).evaluatePreconditions(serverDate);
+            new RequestImpl(m).evaluatePreconditions(lastModified);
         assertNotNull("Precondition is not met", rb);
         
         Response r = rb.build();
         assertEquals("If-Modified-Since precondition was not met", 304, r.getStatus());
     }
+   
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java?rev=707605&r1=707604&r2=707605&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java Fri Oct 24 04:45:29 2008
@@ -33,17 +33,19 @@
         assertEquals("URI is not built correctly", newUri, uri);
     }
     
+    
     @Test
     public void testAddPath() throws Exception {
         URI uri = new URI("http://foo/bar");
         URI newUri = new UriBuilderImpl().uri(uri).path("baz").build();
         assertEquals("URI is not built correctly", newUri, 
                      new URI("http://foo/bar/baz"));
-        newUri = new UriBuilderImpl().uri(uri).path("baz", "/1", "/2").build();
+        newUri = new UriBuilderImpl().uri(uri).path("baz").path("1").path("2").build();
         assertEquals("URI is not built correctly", newUri, 
                      new URI("http://foo/bar/baz/1/2"));
     }
     
+    
     @Test
     public void testSchemeHostPortQueryFragment() throws Exception {
         URI uri;



Mime
View raw message