cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r749596 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ rt/frontend/jaxrs/src/main/java/org...
Date Tue, 03 Mar 2009 12:27:17 GMT
Author: sergeyb
Date: Tue Mar  3 12:27:15 2009
New Revision: 749596

URL: http://svn.apache.org/viewvc?rev=749596&view=rev
Log:
JAXRS : CXF-2031,CXF-2080 plus some more fixes/clean-up 

Added:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/SystemQueryHandler.java
      - copied, changed from r746309, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/SystemQueryHandlerTest.java   (with props)
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore3.java   (with props)
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData2
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData3
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentForm
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/book.xsd   (with props)
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/bookid.xsd   (with props)
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json2.txt   (with props)
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json3.txt   (with props)
Removed:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/attachmentData
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/attachmentData2
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/attachmentData3
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/attachmentForm
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/book.xsd
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/bookid.xsd
Modified:
    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/RequestPreprocessor.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/utils/HttpUtils.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/impl/CacheControlHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.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/AtomBookStore2.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/JAXRSAtomBookTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_json.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_jsonfeed.txt
    cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml
    cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/beans.xml
    cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/web.xml

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/SystemQueryHandler.java (from r746309, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/SystemQueryHandler.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/SystemQueryHandler.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java&r1=746309&r2=749596&rev=749596&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/SystemQueryHandler.java Tue Mar  3 12:27:15 2009
@@ -24,15 +24,17 @@
 
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
 
 import org.apache.cxf.jaxrs.impl.UriInfoImpl;
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
 import org.apache.cxf.message.Message;
 
-public class MappingsHandler implements RequestHandler {
+public class SystemQueryHandler implements RequestHandler {
 
     private static final String CONTENT_QUERY = "_type";
+    private static final String METHOD_QUERY = "_method";
+    
+    
     private static final Map<String, String> SHORTCUTS;
     static {
         SHORTCUTS = new HashMap<String, String>();
@@ -44,24 +46,28 @@
     
     public Response handleRequest(Message m, ClassResourceInfo resourceClass) {
         
-        UriInfo uriInfo = new UriInfoImpl(m, null);
-        handleTypeQuery(m, uriInfo.getQueryParameters());
-        
+        MultivaluedMap<String, String> queries = new UriInfoImpl(m, null).getQueryParameters();
+        handleTypeQuery(m, queries);
+        handleMethodQuery(m, queries);
         
         return null;
     }
 
-    private boolean handleTypeQuery(Message m, 
-                                    MultivaluedMap<String, String> queries) {
+    private void handleMethodQuery(Message m, MultivaluedMap<String, String> queries) {
+        String method = queries.getFirst(METHOD_QUERY);
+        if (method != null) {
+            m.put(Message.HTTP_REQUEST_METHOD, method);
+        }
+    }
+    
+    private void handleTypeQuery(Message m, MultivaluedMap<String, String> queries) {
         String type = queries.getFirst(CONTENT_QUERY);
         if (type != null) {
             if (SHORTCUTS.containsKey(type)) {
                 type = SHORTCUTS.get(type);
             }
             updateAcceptTypeHeader(m, type);
-            return true;
         }
-        return false;
     }
     
     private void updateAcceptTypeHeader(Message m, String anotherValue) {

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=749596&r1=749595&r2=749596&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 Tue Mar  3 12:27:15 2009
@@ -22,6 +22,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import javax.ws.rs.core.CacheControl;
 import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
@@ -93,27 +94,13 @@
 
     public String toString(CacheControl c) {
         StringBuilder sb = new StringBuilder();
-        if (!c.isPrivate()) {
-            sb.append(PUBLIC).append(';');
-        } else {
-            sb.append(PRIVATE).append('=');
-            for (Iterator<String> it = c.getPrivateFields().iterator(); it.hasNext();) {
-                sb.append('\"').append(it.next()).append('\"');
-                if (it.hasNext()) {
-                    sb.append(',');
-                }
-            }
-            sb.append(';');
+        if (c.isPrivate()) {
+            sb.append(PRIVATE);
+            handleFields(c.getPrivateFields(), sb);
         }
         if (c.isNoCache()) {
-            sb.append(NO_CACHE).append('=');
-            for (Iterator<String> it = c.getNoCacheFields().iterator(); it.hasNext();) {
-                sb.append('\"').append(it.next()).append('\"');
-                if (it.hasNext()) {
-                    sb.append(',');
-                }
-            }
-            sb.append(';');
+            sb.append(NO_CACHE);
+            handleFields(c.getNoCacheFields(), sb);
         }
         if (c.isNoStore()) {
             sb.append(NO_STORE).append(';');
@@ -133,6 +120,20 @@
         if (c.getSMaxAge() != -1) {
             sb.append(SMAX_AGE).append('=').append(c.getSMaxAge()).append(';');
         }
+        Map<String, String> exts = c.getCacheExtension();
+        for (Map.Entry<String, String> entry : exts.entrySet()) {
+            sb.append(entry.getKey());
+            String v = entry.getValue();
+            if (v != null) {
+                sb.append("=");
+                if (v.indexOf(' ') != -1) {
+                    sb.append('\"').append(v).append('\"');
+                } else {
+                    sb.append(v);
+                }
+            }
+            sb.append(';');
+        }
         String s = sb.toString();
         return s.endsWith(";") ? s.substring(0, s.length() - 1) : s; 
     }
@@ -153,4 +154,16 @@
         }
     }
 
+    private static void handleFields(List<String> fields, StringBuilder sb) {
+        if (!fields.isEmpty()) {
+            sb.append('=');
+        }
+        for (Iterator<String> it = fields.iterator(); it.hasNext();) {
+            sb.append('\"').append(it.next()).append('\"');
+            if (it.hasNext()) {
+                sb.append(',');
+            }
+        }
+        sb.append(';');
+    }
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java Tue Mar  3 12:27:15 2009
@@ -25,6 +25,7 @@
 
 import javax.ws.rs.core.UriInfo;
 
+import org.apache.cxf.jaxrs.utils.HttpUtils;
 import org.apache.cxf.message.Message;
 
 public class RequestPreprocessor {
@@ -88,7 +89,8 @@
     
     private void updatePath(Message m, String path, String suffix) {
         String newPath = path.substring(0, path.length() - (suffix.length() + 1));
-        m.put(Message.REQUEST_URI, newPath);
+        HttpUtils.updatePath(m, newPath);
+        //m.put(Message.REQUEST_URI, newPath);
     }
     
 }

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=749596&r1=749595&r2=749596&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 Tue Mar  3 12:27:15 2009
@@ -38,10 +38,10 @@
 import javax.ws.rs.ext.MessageBodyWriter;
 
 import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
-import org.apache.cxf.jaxrs.ext.MappingsHandler;
 import org.apache.cxf.jaxrs.ext.ParameterHandler;
 import org.apache.cxf.jaxrs.ext.RequestHandler;
 import org.apache.cxf.jaxrs.ext.ResponseHandler;
+import org.apache.cxf.jaxrs.ext.SystemQueryHandler;
 import org.apache.cxf.jaxrs.impl.RequestPreprocessor;
 import org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper;
 import org.apache.cxf.jaxrs.model.ProviderInfo;
@@ -66,7 +66,7 @@
                                     new PrimitiveTextProvider(),
                                     new ActivationProvider(),
                                     new WebApplicationExceptionMapper(),
-                                    new MappingsHandler());
+                                    new SystemQueryHandler());
     }
     
     private List<ProviderInfo<MessageBodyReader>> messageReaders = 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java Tue Mar  3 12:27:15 2009
@@ -103,6 +103,19 @@
         return address;
     }
     
+    public static void updatePath(Message m, String path) {
+        String baseAddress = getBaseAddress(m);
+        boolean pathSlash = path.startsWith("/");
+        boolean baseSlash = baseAddress.endsWith("/");
+        if (pathSlash && baseSlash) {
+            path = path.substring(1);
+        } else if (!pathSlash && !baseSlash) {
+            path = "/" + path;
+        }
+        m.put(Message.REQUEST_URI, baseAddress + path);
+    }
+
+    
     public static String getPathToMatch(String path, String address, boolean addSlash) {
         
         int ind = path.indexOf(address);

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=749596&r1=749595&r2=749596&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 Tue Mar  3 12:27:15 2009
@@ -594,6 +594,9 @@
                                              String defaultValue) {
         
         List<String> values = new HttpHeadersImpl(m).getRequestHeader(header);
+        if (values != null && values.isEmpty()) {
+            values = null;
+        }
         String basePath = HttpUtils.getOriginalAddress(m);
         return InjectionUtils.createParameterObject(values, 
                                                     pClass, 

Added: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/SystemQueryHandlerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/SystemQueryHandlerTest.java?rev=749596&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/SystemQueryHandlerTest.java (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/SystemQueryHandlerTest.java Tue Mar  3 12:27:15 2009
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.ext;
+
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SystemQueryHandlerTest extends Assert {
+
+    @Test
+    public void testMethodQuery() {
+        Message m = new MessageImpl();
+        m.put(Message.HTTP_REQUEST_METHOD, "POST");
+        m.put(Message.QUERY_STRING, "_method=GET");
+        
+        SystemQueryHandler sqh = new SystemQueryHandler();
+        sqh.handleRequest(m, null);
+        assertEquals("GET", m.get(Message.HTTP_REQUEST_METHOD));
+    }
+    
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/SystemQueryHandlerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/SystemQueryHandlerTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

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=749596&r1=749595&r2=749596&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 Tue Mar  3 12:27:15 2009
@@ -61,4 +61,31 @@
         String parsed = CacheControl.valueOf(s).toString();
         assertEquals(s, parsed);       
     }
+    
+    @Test
+    public void testNoCacheEnabled() {
+        CacheControl cc = new CacheControl();
+        cc.setNoCache(true);
+        assertEquals("no-cache;no-transform", cc.toString());
+    }
+    
+    @Test
+    public void testNoCacheDisabled() {
+        CacheControl cc = new CacheControl();
+        cc.setNoCache(false);
+        assertEquals("no-transform", cc.toString());
+    }
+    
+    @Test
+    public void testCacheExtensionToString() {
+        CacheControl cc = new CacheControl();
+        cc.getCacheExtension().put("ext1", null);
+        cc.getCacheExtension().put("ext2", "value2");
+        cc.getCacheExtension().put("ext3", "value 3");
+        String value = cc.toString();
+        assertTrue(value.indexOf("ext1") != -1 && value.indexOf("ext1=") == -1);
+        assertTrue(value.indexOf("ext2=value2") != -1);
+        assertTrue(value.indexOf("ext3=\"value 3\"") != -1);
+    }
+    
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java Tue Mar  3 12:27:15 2009
@@ -21,13 +21,17 @@
 
 import javax.ws.rs.core.Response;
 
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+
 import org.junit.Assert;
 import org.junit.Test;
 
 public class HttpUtilsTest extends Assert {
 
     @Test
-    public void testUpdatePath() {
+    public void testPathToMatch() {
         assertEquals("/", HttpUtils.getPathToMatch("/", "/", true));
         assertEquals("/", HttpUtils.getPathToMatch("/", "/bar", true));
         assertEquals("/bar", HttpUtils.getPathToMatch("/bar", "/", true));
@@ -39,6 +43,24 @@
     }
     
     @Test
+    public void testUpdatePath() {
+        
+        Message m = new MessageImpl();
+        m.setExchange(new ExchangeImpl());
+        m.put(Message.ENDPOINT_ADDRESS, "http://localhost/");
+        HttpUtils.updatePath(m, "/bar");
+        assertEquals("/bar", m.get(Message.REQUEST_URI));
+        HttpUtils.updatePath(m, "bar");
+        assertEquals("/bar", m.get(Message.REQUEST_URI));
+        HttpUtils.updatePath(m, "bar/");
+        assertEquals("/bar/", m.get(Message.REQUEST_URI));
+        m.put(Message.ENDPOINT_ADDRESS, "http://localhost");
+        HttpUtils.updatePath(m, "bar/");
+        assertEquals("/bar/", m.get(Message.REQUEST_URI));
+    }
+    
+    
+    @Test
     public void testParameterErrorStatus() {
         assertEquals(Response.Status.NOT_FOUND,
                      HttpUtils.getParameterFailureStatus(ParameterType.PATH));

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java (original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java Tue Mar  3 12:27:15 2009
@@ -239,7 +239,8 @@
                 response.getWriter().write("<table " + (serviceListStyleSheet == null
                         ? "cellpadding=\"1\" cellspacing=\"1\" border=\"1\" width=\"100%\"" : "") + ">");
                 for (ServletDestination sd : destinations) {
-                    if (null != sd.getEndpointInfo().getName()) {
+                    if (null != sd.getEndpointInfo().getName() 
+                        && null != sd.getEndpointInfo().getInterface()) {
                         response.getWriter().write("<tr><td>");
                         response.getWriter().write("<span class=\"porttypename\">"
                                 + sd.getEndpointInfo().getInterface().getName().getLocalPart()

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=749596&r1=749595&r2=749596&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 Tue Mar  3 12:27:15 2009
@@ -47,10 +47,10 @@
 import org.apache.cxf.customer.book.BookNotFoundDetails;
 import org.apache.cxf.customer.book.BookNotFoundFault;
 
-@Path("/bookstore/")
+@Path("/")
 public class AtomBookStore {
 
-    @Context private UriInfo uField;
+    @Context protected UriInfo uField;
     private HttpHeaders headers;
     private Map<Long, Book> books = new HashMap<Long, Book>();
     private Map<Long, CD> cds = new HashMap<Long, CD>();
@@ -124,7 +124,7 @@
             // this code is broken as Response does not
             
             URI uri = 
-                uField.getBaseUriBuilder().path("bookstore").path("books").path("entries") 
+                uField.getBaseUriBuilder().path("books").path("entries") 
                                                 .path(Long.toString(b.getId())).build();
             return Response.created(uri).entity(e).build();
         } catch (Exception ex) {

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore2.java?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore2.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore2.java Tue Mar  3 12:27:15 2009
@@ -40,6 +40,11 @@
         return super.getBooksAsFeed(uParam);
         
     }
+    
+    @Context
+    public void setUriInfo(UriInfo ui) {
+        super.uField = ui;
+    }
 }
 
 

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore3.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore3.java?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore3.java (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore3.java Tue Mar  3 12:27:15 2009
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.cxf.systest.jaxrs;
+
+
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.UriInfo;
+
+@Path("/atom")
+public class AtomBookStore3 extends AtomBookStore {
+    
+    @Context
+    public void setUriInfo(UriInfo ui) {
+        super.uField = ui;
+    }
+}
+
+

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore3.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

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=749596&r1=749595&r2=749596&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 Tue Mar  3 12:27:15 2009
@@ -174,6 +174,14 @@
     }
     
     @GET
+    @Path("/bookheaders2/")
+    public Book getBookByHeader(@DefaultValue("123") @HeaderParam("BOOK2") String id) 
+        throws Exception {
+        return doGetBook(id);
+    }
+    
+    
+    @GET
     @Path("/bookquery")
     public Book getBookByURLQuery(@QueryParam("urlid") String urlValue) throws Exception {
         String url2 = new URL(urlValue).toString();

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java Tue Mar  3 12:27:15 2009
@@ -38,6 +38,7 @@
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.codehaus.jettison.json.JSONObject;
+
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -54,17 +55,17 @@
     @Test
     public void testGetBooks() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstore/books/feed"; 
+            "http://localhost:9080/bookstore/bookstore/books/feed"; 
         Feed feed = getFeed(endpointAddress, null);
-        assertEquals("http://localhost:9080/bookstore/books/feed", 
+        assertEquals("http://localhost:9080/bookstore/bookstore/books/feed", 
                      feed.getBaseUri().toString());
         assertEquals("Collection of Books", feed.getTitle());
         
-        getAndCompareJson("http://localhost:9080/bookstore/books/feed",
+        getAndCompareJson("http://localhost:9080/bookstore/bookstore/books/feed",
                                "resources/expected_atom_books_json.txt",
                                "application/json");
         
-        getAndCompareJson("http://localhost:9080/bookstore/books/jsonfeed",
+        getAndCompareJson("http://localhost:9080/bookstore/bookstore/books/jsonfeed",
                           "resources/expected_atom_books_jsonfeed.txt",
                           "application/json, text/html, application/xml;q=0.9,"
                           + " application/xhtml+xml, image/png, image/jpeg, image/gif,"
@@ -97,25 +98,25 @@
         
         
         endpointAddress =
-            "http://localhost:9080/bookstore/books/subresources/123"; 
+            "http://localhost:9080/bookstore/bookstore/books/subresources/123"; 
         entry = getEntry(endpointAddress, null);
         assertEquals("CXF in Action", entry.getTitle());
         
-        getAndCompareJson("http://localhost:9080/bookstore/books/entries/123",
+        getAndCompareJson("http://localhost:9080/bookstore/bookstore/books/entries/123",
                                "resources/expected_atom_book_json.txt",
                                "application/json");
         
-        getAndCompareJson("http://localhost:9080/bookstore/books/entries/123?_type="
+        getAndCompareJson("http://localhost:9080/bookstore/bookstore/books/entries/123?_type="
                                + "application/json",
                                "resources/expected_atom_book_json.txt",
                                "*/*");
-        getAndCompareJson("http://localhost:9080/bookstore/books/entries/123?_type="
+        getAndCompareJson("http://localhost:9080/bookstore/bookstore/books/entries/123?_type="
                                + "json",
                                "resources/expected_atom_book_json.txt",
                                "*/*");
         
         // do the same using extension mappings
-        getAndCompareJson("http://localhost:9080/bookstore/books/entries/123.json",
+        getAndCompareJson("http://localhost:9080/bookstore/bookstore/books/entries/123.json",
                                "resources/expected_atom_book_json.txt",
                                "*/*");
         
@@ -125,11 +126,22 @@
     @Test
     public void testGetBooks2() throws Exception {
         String endpointAddress =
-            "http://localhost:9080"; 
+            "http://localhost:9080/bookstore/sub/"; 
         Feed feed = getFeed(endpointAddress, null);
-        assertEquals("http://localhost:9080/", 
+        assertEquals("http://localhost:9080/bookstore/sub/", 
                      feed.getBaseUri().toString());
         assertEquals("Collection of Books", feed.getTitle());
+        
+        getAndCompareJson("http://localhost:9080/bookstore/sub/books/entries/123.json",
+                        "resources/expected_atom_book_json2.txt",
+                        "*/*");
+    }
+    
+    @Test
+    public void testGetBooks3() throws Exception {
+        getAndCompareJson("http://localhost:9080/atom/atom/books/entries/123.json",
+                        "resources/expected_atom_book_json3.txt",
+                        "*/*");
     }
     
     private void getAndCompareJson(String address, 

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java Tue Mar  3 12:27:15 2009
@@ -286,6 +286,13 @@
     }
     
     @Test
+    public void testGetBookByHeaderDefault() throws Exception {
+        getAndCompareAsStrings("http://localhost:9080/bookstore/bookheaders2",
+                               "resources/expected_get_book123.txt",
+                               "application/xml;q=0.5,text/xml", 200);
+    }
+    
+    @Test
     public void testGetBookElement() throws Exception {
         getAndCompareAsStrings("http://localhost:9080/bookstore/books/element",
                                "resources/expected_get_book123.txt",

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java Tue Mar  3 12:27:15 2009
@@ -189,7 +189,7 @@
             + "boundary=\"----=_Part_4_701508.1145579811786\"";
         post.setRequestHeader("Content-Type", ct);
         InputStream is = 
-            getClass().getResourceAsStream("/org/apache/cxf/systest/jaxrs/" + resourceName);
+            getClass().getResourceAsStream("/org/apache/cxf/systest/jaxrs/resources/" + resourceName);
         RequestEntity entity = new InputStreamRequestEntity(is);
         post.setRequestEntity(entity);
         HttpClient httpclient = new HttpClient();

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData Tue Mar  3 12:27:15 2009
@@ -0,0 +1,18 @@
+
+------=_Part_4_701508.1145579811786
+Content-Type: text/xml
+Content-ID: <rootPart>
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Book><name>CXF in Action - 2</name></Book>
+------=_Part_4_701508.1145579811786
+Content-Type: image/jpeg
+Content-Transfer-Encoding: binary
+Content-ID: <foo>
+
+foobar
+------=_Part_4_701508.1145579811786--
+Content-Type: application/xml
+Content-ID: <book2>
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Book><name>CXF in Action - 2</name></Book>
+------=_Part_4_701508.1145579811786--
\ No newline at end of file

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData2
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData2?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData2 (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData2 Tue Mar  3 12:27:15 2009
@@ -0,0 +1,18 @@
+
+------=_Part_4_701508.1145579811786
+Content-Type: text/xml
+Content-ID: <rootPart>
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><b:Book xmlns:b="http://www.example.org/books"><b:name>CXF in Action</b:name><b:id>123</b:id></b:Book>
+------=_Part_4_701508.1145579811786
+Content-Type: image/jpeg
+Content-Transfer-Encoding: binary
+Content-ID: <foo>
+
+foobar
+------=_Part_4_701508.1145579811786--
+Content-Type: application/json
+Content-ID: <book2>
+
+{"Book":{"name":"CXF in Action - 2","id":123}}
+------=_Part_4_701508.1145579811786--
\ No newline at end of file

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData3
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData3?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData3 (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentData3 Tue Mar  3 12:27:15 2009
@@ -0,0 +1,15 @@
+
+------=_Part_4_701508.1145579811786
+Content-Type: text/xml
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Book><name>CXF in Action - 2</name></Book>
+------=_Part_4_701508.1145579811786
+Content-Type: image/jpeg
+Content-Transfer-Encoding: binary
+
+foobar
+------=_Part_4_701508.1145579811786--
+Content-Type: application/xml
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Book><name>CXF in Action - 2</name></Book>
+------=_Part_4_701508.1145579811786--
\ No newline at end of file

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentForm
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentForm?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentForm (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentForm Tue Mar  3 12:27:15 2009
@@ -0,0 +1,10 @@
+
+------=_Part_4_701508.1145579811786
+Content-Disposition: form-data; name="name"
+
+CXF+in+Action+-+2
+------=_Part_4_701508.1145579811786
+Content-Disposition: form-data ; name = "id"
+
+124
+------=_Part_4_701508.1145579811786--
\ No newline at end of file

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/book.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/book.xsd?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/book.xsd (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/book.xsd Tue Mar  3 12:27:15 2009
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/books" xmlns:tns="http://www.example.org/books" xmlns:bookids="http://www.example.org/books/id" elementFormDefault="qualified">
+  <xs:import namespace="http://www.example.org/books/id"/>
+  <element name="Book">
+     <complexType>
+       <sequence>
+        <element name="name" type="xs:string"/>
+        <element name="id" type="bookids:bid"/>
+       </sequence> 
+     </complexType>
+  </element>
+</schema>
\ No newline at end of file

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/book.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/book.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/book.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/bookid.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/bookid.xsd?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/bookid.xsd (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/bookid.xsd Tue Mar  3 12:27:15 2009
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/books/id" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.example.org/books/id">
+  
+
+     <simpleType name="bid">
+       <restriction base="xs:long"/>
+     </simpleType>
+  </schema>

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/bookid.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/bookid.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/bookid.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json.txt?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json.txt (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json.txt Tue Mar  3 12:27:15 2009
@@ -9,6 +9,6 @@
   ]
  },
  "attributes":{
-  "xml:base":"http://localhost:9080/bookstore/books/entries/123"
+  "xml:base":"http://localhost:9080/bookstore/bookstore/books/entries/123"
  }
 }
\ No newline at end of file

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json2.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json2.txt?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json2.txt (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json2.txt Tue Mar  3 12:27:15 2009
@@ -0,0 +1,14 @@
+{
+ "id":"123",
+ "title":"CXF in Action",
+ "content":{
+  "attributes":{
+   "type":"application/xml"
+  },
+  "children":["<Book><id>123<\/id><name>CXF in Action<\/name><\/Book>"
+  ]
+ },
+ "attributes":{
+  "xml:base":"http://localhost:9080/bookstore/sub/books/entries/123"
+ }
+}
\ No newline at end of file

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json2.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json3.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json3.txt?rev=749596&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json3.txt (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json3.txt Tue Mar  3 12:27:15 2009
@@ -0,0 +1,14 @@
+{
+ "id":"123",
+ "title":"CXF in Action",
+ "content":{
+  "attributes":{
+   "type":"application/xml"
+  },
+  "children":["<Book><id>123<\/id><name>CXF in Action<\/name><\/Book>"
+  ]
+ },
+ "attributes":{
+  "xml:base":"http://localhost:9080/atom/atom/books/entries/123"
+ }
+}
\ No newline at end of file

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json3.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json3.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_json.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_json.txt?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_json.txt (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_json.txt Tue Mar  3 12:27:15 2009
@@ -18,7 +18,7 @@
   }
  ],
  "attributes":{
-  "xml:base":"http://localhost:9080/bookstore/books/feed"
+  "xml:base":"http://localhost:9080/bookstore/bookstore/books/feed"
  }
 }
 

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_jsonfeed.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_jsonfeed.txt?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_jsonfeed.txt (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_jsonfeed.txt Tue Mar  3 12:27:15 2009
@@ -18,7 +18,7 @@
   }
  ],
  "attributes":{
-  "xml:base":"http://localhost:9080/bookstore/books/jsonfeed"
+  "xml:base":"http://localhost:9080/bookstore/bookstore/books/jsonfeed"
  }
 }
 

Modified: cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml Tue Mar  3 12:27:15 2009
@@ -87,8 +87,8 @@
   </bean>
   
   <util:list id="theSchemas">
-    <value>classpath:/org/apache/cxf/systest/jaxrs/bookid.xsd</value>
-    <value>classpath:/org/apache/cxf/systest/jaxrs/book.xsd</value>
+    <value>classpath:/org/apache/cxf/systest/jaxrs/resources/bookid.xsd</value>
+    <value>classpath:/org/apache/cxf/systest/jaxrs/resources/book.xsd</value>
   </util:list>
   
   <util:list id="jsonTypes">

Modified: cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/beans.xml?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/beans.xml Tue Mar  3 12:27:15 2009
@@ -39,22 +39,56 @@
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
   
   <jaxrs:server id="atomservice"
-		        address="/" 
+		        address="/bookstore" 
 		        staticSubresourceResolution="true">
     <jaxrs:serviceBeans>
       <ref bean="atomstore"/>
-      <ref bean="atomstore2"/>
     </jaxrs:serviceBeans>
     <jaxrs:providers>
-        <bean class="org.apache.cxf.jaxrs.provider.AtomFeedProvider"/>
-        <bean class="org.apache.cxf.jaxrs.provider.AtomEntryProvider"/>
+        <ref bean="feed"/>
+        <ref bean="entry"/>
     </jaxrs:providers>	
     <jaxrs:extensionMappings>
       <entry key="json" value="application/json"/>
     </jaxrs:extensionMappings>		   
   </jaxrs:server>
+  
+  <jaxrs:server id="atomservice2"
+		        address="/sub" 
+		        staticSubresourceResolution="true">
+    <jaxrs:serviceBeans>
+      <ref bean="atomstore2"/>
+    </jaxrs:serviceBeans>
+    <jaxrs:providers>
+        <ref bean="feed"/>
+        <ref bean="entry"/>
+    </jaxrs:providers>	
+    <jaxrs:extensionMappings>
+      <entry key="json" value="application/json"/>
+    </jaxrs:extensionMappings>	
+  </jaxrs:server>
+  
+  <jaxrs:server id="atomservice3"
+		        address="/">
+    <jaxrs:serviceBeans>
+      <ref bean="atomstore3"/>
+    </jaxrs:serviceBeans>
+    <jaxrs:providers>
+        <ref bean="feed"/>
+        <ref bean="entry"/>
+    </jaxrs:providers>	
+    <jaxrs:extensionMappings>
+      <entry key="json" value="application/json"/>
+    </jaxrs:extensionMappings>	
+  </jaxrs:server>
+  
   <bean id="atomstore" class="org.apache.cxf.systest.jaxrs.AtomBookStore"/>
   <bean id="atomstore2" class="org.apache.cxf.systest.jaxrs.AtomBookStore2"/>
+  <bean id="atomstore3" class="org.apache.cxf.systest.jaxrs.AtomBookStore3"/>
+  
+  <bean id="feed" class="org.apache.cxf.jaxrs.provider.AtomFeedProvider"/>
+  <bean id="entry" class="org.apache.cxf.jaxrs.provider.AtomEntryProvider"/>
+  
 </beans>
 <!-- END SNIPPET: beans -->
 

Modified: cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/web.xml?rev=749596&r1=749595&r2=749596&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/web.xml (original)
+++ cxf/trunk/systests/src/test/resources/jaxrs_atom/WEB-INF/web.xml Tue Mar  3 12:27:15 2009
@@ -44,7 +44,13 @@
 
 	<servlet-mapping>
 		<servlet-name>CXFServlet</servlet-name>
-		<url-pattern>/*</url-pattern>
+		<url-pattern>/bookstore/*</url-pattern>
 	</servlet-mapping>
+	
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/atom/*</url-pattern>
+	</servlet-mapping>
+	
 </web-app>
 <!-- END SNIPPET: webxml -->



Mime
View raw message