cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r884079 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/ rt/frontend/jaxrs/src/main...
Date Wed, 25 Nov 2009 12:48:58 GMT
Author: sergeyb
Date: Wed Nov 25 12:48:57 2009
New Revision: 884079

URL: http://svn.apache.org/viewvc?rev=884079&view=rev
Log:
CXF-2556 and starting with refactoring of Atom providers

Added:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAtomProvider.java
  (with props)
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Book.java
  (with props)
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Chapter.java
  (with props)
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/ObjectFactory.java
  (with props)
Removed:
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/Book.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/Chapter.java
Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Description.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.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/servlet/CXFNonSpringJaxrsServlet.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringProviderTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
    cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_atom/WEB-INF/beans.xml

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Description.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Description.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Description.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/Description.java Wed
Nov 25 12:48:57 2009
@@ -24,11 +24,29 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+/**
+ * Can be used to document resource classes and methods
+ * 
+ * See {@link <a href="http://www.w3.org/Submission/wadl/#x3-80002.3">WADL Documentation</a>}.
+ */
 @Target({ElementType.TYPE, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Description {
+    /**
+     * This value, if set, will be set as WADL doc content
+     */
     String value() default "";
+    /**
+     * Maps to WADL doc/@xml:lang attribute 
+     **/
     String lang() default "";
+    /**
+     * Maps to WADL doc/@title attribute 
+     **/
     String title() default "";
+    /**
+     * This uri, if set, will be used to retrieve 
+     * the content which will be set as WADL doc content
+     */
     String docuri() default "";
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
Wed Nov 25 12:48:57 2009
@@ -113,8 +113,9 @@
             Response response = null;
             if (objs.get(0) instanceof Response) {
                 response = (Response)responseObj;
-            } else {    
-                response = Response.ok(responseObj).build();
+            } else {
+                int status = getStatus(message, 200);
+                response = Response.status(status).entity(responseObj).build();
             }
             
             Exchange exchange = message.getExchange();
@@ -137,11 +138,15 @@
             serializeMessage(message, response, ori, true);        
             
         } else {
-            Object customStatus = message.getExchange().get(Message.RESPONSE_CODE);
-            int status = customStatus == null ? 204 : (Integer)customStatus;
+            int status = getStatus(message, 204);
             message.put(Message.RESPONSE_CODE, status);
         }
     }
+
+    private int getStatus(Message message, int defaultValue) {
+        Object customStatus = message.getExchange().get(Message.RESPONSE_CODE);
+        return customStatus == null ? defaultValue : (Integer)customStatus;
+    }
     
     @SuppressWarnings("unchecked")
     private void serializeMessage(Message message, 

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Wed Nov 25 12:48:57 2009
@@ -88,7 +88,7 @@
 
     public static final String WADL_QUERY = "_wadl"; 
     public static final MediaType WADL_TYPE = MediaType.valueOf("application/vnd.sun.wadl+xml");

-    public static final String WADL_NS = "http://research.sun.com/wadl/2006/10";    
+    public static final String WADL_NS = "http://wadl.dev.java.net/2009/02";    
     
     private static final Logger LOG = LogUtils.getL7dLogger(WadlGenerator.class);
     private static final String JAXB_DEFAULT_NAMESPACE = "##default";
@@ -495,10 +495,12 @@
         if (classes.isEmpty()) {
             return null;
         }
-        JAXBUtils.scanPackages(classes, null);
+        Set<Class<?>> classesToBeBound = new HashSet<Class<?>>(classes);
+        JAXBUtils.scanPackages(classesToBeBound, null);
+
         JAXBContext ctx;
         try {
-            ctx = JAXBContext.newInstance(classes.toArray(new Class[classes.size()]));
+            ctx = JAXBContext.newInstance(classesToBeBound.toArray(new Class[classes.size()]));
             return ctx;
         } catch (JAXBException ex) {
             LOG.fine("No JAXB context can be created");

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAtomProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAtomProvider.java?rev=884079&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAtomProvider.java
(added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAtomProvider.java
Wed Nov 25 12:48:57 2009
@@ -0,0 +1,74 @@
+/**
+ * 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.provider;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+
+import org.apache.abdera.Abdera;
+import org.apache.abdera.model.Document;
+import org.apache.abdera.model.Element;
+import org.apache.abdera.writer.Writer;
+
+public abstract class AbstractAtomProvider<T extends Element> 
+    implements MessageBodyWriter<T>, MessageBodyReader<T> {
+
+    private static final Abdera ATOM_ENGINE = new Abdera();
+        
+    private boolean formattedOutput;
+    
+    public long getSize(T element, Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
+        return -1;
+    }
+
+    public void writeTo(T element, Class<?> clazz, Type type, Annotation[] a, 
+                        MediaType mt, MultivaluedMap<String, Object> headers, OutputStream
os) 
+        throws IOException {
+        if (MediaType.APPLICATION_JSON_TYPE.isCompatible(mt)) {
+            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("json");
+            element.writeTo(w, os);   
+        } else if (formattedOutput) {
+            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("prettyxml");
+            element.writeTo(w, os);
+        } else {
+            element.writeTo(os);
+        }
+    }
+
+    public T readFrom(Class<T> clazz, Type t, Annotation[] a, MediaType mt, 
+                         MultivaluedMap<String, String> headers, InputStream is) 
+        throws IOException {
+        Document<T> doc = ATOM_ENGINE.getParser().parse(is);
+        return doc.getRoot();
+    }
+
+    public void setFormattedOutput(boolean formattedOutput) {
+        this.formattedOutput = formattedOutput;
+    }
+
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAtomProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractAtomProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

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=884079&r1=884078&r2=884079&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
Wed Nov 25 12:48:57 2009
@@ -74,7 +74,6 @@
 import org.apache.cxf.jaxb.JAXBContextProxy;
 import org.apache.cxf.jaxb.JAXBUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
-import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.utils.AnnotationUtils;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
@@ -110,7 +109,6 @@
     protected List<String> inDropElements;
     protected Map<String, String> inElementsMap;
     protected Map<String, String> inAppendMap;
-    protected Map<String, String> inAppendAttributesMap;
     private boolean attributesToElements;
     
     private MessageContext mc;
@@ -569,10 +567,6 @@
         this.inAppendMap = inElements;
     }
     
-    public void setInAppendAttributes(Map<String, String> inElements) {
-        this.inAppendAttributesMap = inElements;
-    }
-    
     public void setInTransformElements(Map<String, String> inElements) {
         this.inElementsMap = inElements;
     }
@@ -606,9 +600,9 @@
             reader = StaxUtils.createFilteredReader(createNewReaderIfNeeded(reader, is),
                                                new StaxStreamFilter(dropElements.toArray(new
QName[]{})));    
         }
-        if (inElementsMap != null || inAppendMap != null || inAppendAttributesMap != null)
{
+        if (inElementsMap != null || inAppendMap != null) {
             reader = new InTransformReader(createNewReaderIfNeeded(reader, is),
-                                           inElementsMap, inAppendMap, inAppendAttributesMap);
+                                           inElementsMap, inAppendMap);
         }
         return reader;
     }
@@ -864,24 +858,6 @@
         }
     }
     
-    private static class AttributeValue {
-        private String name;
-        private String value;
-        
-        public AttributeValue(String n, String v) {
-            this.name = n;
-            this.value = v;
-        }
-        
-        public String getName() {
-            return name;
-        }
-        
-        public String getValue() {
-            return value;
-        }
-    }
-    
     protected static class InTransformReader extends DepthXMLStreamReader {
         
         private static final String INTERN_NAMES = "org.codehaus.stax2.internNames";
@@ -890,64 +866,19 @@
         private Map<QName, QName> inElementsMap = new HashMap<QName, QName>(5);
         private Map<QName, QName> inAppendMap = new HashMap<QName, QName>(5);
         private Map<String, String> nsMap = new HashMap<String, String>(5);
-        private MultivaluedMap<QName, AttributeValue> inAttributes;
         private QName currentQName;
         private QName previousQName;
-        private List<AttributeValue> currentAttributes;
         private int previousDepth = -1;
         
         public InTransformReader(XMLStreamReader reader, 
                                  Map<String, String> inMap,
-                                 Map<String, String> appendMap,
-                                 Map<String, String> appendAttrMap) {
+                                 Map<String, String> appendMap) {
             super(reader);
             convertToMapOfQNames(inMap, inElementsMap, nsMap);
             convertToMapOfQNames(appendMap, inAppendMap, null);
-            convertToMapOfAttributes(appendAttrMap);
-        }
-        
-        private void convertToMapOfAttributes(Map<String, String> map) {
-            if (map != null) {
-                inAttributes = new MetadataMap<QName, AttributeValue>();
-                for (Map.Entry<String, String> entry : map.entrySet()) {
-                    QName lname = convertStringToQName(entry.getKey());
-                    String[] values = entry.getValue().split(":");
-                    inAttributes.add(lname, new AttributeValue(values[0], values[1]));
-                }
-            }
         }
         
-        public int getAttributeCount() {
-            return currentAttributes == null ? super.getAttributeCount() 
-                : currentAttributes.size() + super.getAttributeCount();
-        }
-
-        public String getAttributeLocalName(int ind) {
-            if (currentAttributes == null) {
-                return super.getAttributeLocalName(ind);
-            } else {
-                int count = super.getAttributeCount();
-                return ind < count ? super.getAttributeLocalName(ind) 
-                    : currentAttributes.get(ind - count).getName(); 
-            }
-        }
-
-        public String getAttributeNamespace(int ind) {
-            return currentAttributes == null ? reader.getAttributeNamespace(ind) : "";
-        }
-
-        public String getAttributeValue(int ind) {
-            if (currentAttributes == null) {
-                return super.getAttributeValue(ind);
-            } else {
-                int count = super.getAttributeCount();
-                return ind < count ? super.getAttributeValue(ind) 
-                    : currentAttributes.get(ind - count).getValue(); 
-            }
-        }
-
         public int next() throws XMLStreamException {
-            currentAttributes = null;
             if (currentQName != null) {
                 return XMLStreamConstants.START_ELEMENT;
             } else if (previousDepth != -1 && previousDepth == getDepth() + 1) {
@@ -993,9 +924,6 @@
         public String getNamespaceURI() {
          
             QName theName = readCurrentElement();
-            if (inAttributes != null) {
-                currentAttributes = inAttributes.remove(theName);
-            }
             QName appendQName = inAppendMap.remove(theName);
             if (appendQName != null) {
                 previousDepth = getDepth();

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=884079&r1=884078&r2=884079&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
Wed Nov 25 12:48:57 2009
@@ -19,63 +19,27 @@
 
 package org.apache.cxf.jaxrs.provider;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 
 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;
-import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.abdera.Abdera;
-import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Entry;
-import org.apache.abdera.writer.Writer;
 
 @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> {
-
-    private static final Abdera ATOM_ENGINE = new Abdera();
-    private static final String JSON_TYPE = "application/json";
+public class AtomEntryProvider extends AbstractAtomProvider<Entry> {
     
-    public long getSize(Entry feed,
-                        Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
-        return -1;
-    }
-
     public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
         return Entry.class.isAssignableFrom(type);
     }
-
-    public void writeTo(Entry entry, Class<?> clazz, Type type, Annotation[] a, 
-                        MediaType mt, MultivaluedMap<String, Object> headers, OutputStream
os) 
-        throws IOException {
-        if (JSON_TYPE.equals(mt.toString())) {
-            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("json");
-            entry.writeTo(w, os);   
-        } else {
-            entry.writeTo(os);
-        }
-        
-    }
-
+    
     public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
         return Entry.class.isAssignableFrom(type);
     }
-
-    public Entry readFrom(Class<Entry> clazz, Type t, Annotation[] a, MediaType mt,

-                          MultivaluedMap<String, String> headers, InputStream is) 
-        throws IOException {
-        Document<Entry> doc = ATOM_ENGINE.getParser().parse(is);
-        return doc.getRoot();
-    }
+    
 }

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=884079&r1=884078&r2=884079&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
Wed Nov 25 12:48:57 2009
@@ -19,63 +19,25 @@
 
 package org.apache.cxf.jaxrs.provider;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 
 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;
-import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.abdera.Abdera;
-import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Feed;
-import org.apache.abdera.writer.Writer;
 
 @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> {
-
-    private static final String JSON_TYPE = "application/json";
-    private static final Abdera ATOM_ENGINE = new Abdera();
-        
-    public long getSize(Feed feed, Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
-        return -1;
-    }
-
+public class AtomFeedProvider extends AbstractAtomProvider<Feed> {
     public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
         return Feed.class.isAssignableFrom(type);
     }
-
-    public void writeTo(Feed feed, Class<?> clazz, Type type, Annotation[] a, 
-                        MediaType mt, MultivaluedMap<String, Object> headers, OutputStream
os) 
-        throws IOException {
-        if (JSON_TYPE.equals(mt.toString())) {
-            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("json");
-            feed.writeTo(w, os);   
-        } else {
-            feed.writeTo(os);
-        }
-        
-    }
-
+    
     public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
         return Feed.class.isAssignableFrom(type);
     }
-
-    public Feed readFrom(Class<Feed> clazz, Type t, Annotation[] a, MediaType mt, 
-                         MultivaluedMap<String, String> headers, InputStream is) 
-        throws IOException {
-        Document<Feed> doc = ATOM_ENGINE.getParser().parse(is);
-        return doc.getRoot();
-    }
-
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
Wed Nov 25 12:48:57 2009
@@ -218,7 +218,7 @@
     }    
     
     
-    private Object createSingletonInstance(Class<?> cls, ServletConfig sc) throws ServletException
{
+    protected Object createSingletonInstance(Class<?> cls, ServletConfig sc) throws
ServletException {
         Constructor c = ResourceUtils.findResourceConstructor(cls, false);
         if (c == null) {
             throw new ServletException("No valid constructor found for " + cls.getName());
@@ -233,7 +233,9 @@
         Object[] values = isDefault ? new Object[]{} 
             : new Object[]{c.getParameterTypes()[0] == ServletConfig.class ? sc : sc.getServletContext()};

         try {
-            return c.newInstance(values);
+            Object instance = c.newInstance(values);
+            configureSingleton(instance);
+            return instance;
         } catch (InstantiationException ex) {
             ex.printStackTrace();
             throw new ServletException("Resource class " + cls.getName()
@@ -249,6 +251,10 @@
         }
     }
     
+    protected void configureSingleton(Object instance) {
+        
+    }
+    
     protected void createServerFromApplication(String cName) throws ServletException {
         Class<?> appClass = loadClass(cName, "Application");
         Application app = null;

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
Wed Nov 25 12:48:57 2009
@@ -33,6 +33,8 @@
 
 import org.apache.cxf.jaxrs.ext.Description;
 import org.apache.cxf.jaxrs.fortest.jaxb.packageinfo.Book2;
+import org.apache.cxf.jaxrs.model.wadl.jaxb.Book;
+import org.apache.cxf.jaxrs.model.wadl.jaxb.Chapter;
 
 @Path("/bookstore/{id}")
 @Consumes({"application/xml", "application/json" })

Added: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Book.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Book.java?rev=884079&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Book.java
(added)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Book.java
Wed Nov 25 12:48:57 2009
@@ -0,0 +1,71 @@
+/**
+ * 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.model.wadl.jaxb;
+
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "thebook", namespace = "http://superbooks")
+@XmlType(name = "book", namespace = "http://superbooks")
+public class Book {
+
+    private int id;
+    @XmlElement(name = "thechapter", namespace = "http://superbooks")
+    private Chapter chapter;
+    
+    public Book() {
+    }
+    
+    public Book(int id) {
+        this.id = id;
+    }
+    
+    @GET
+    @Path("/book")
+    public int getId() {
+        return id;
+    }
+    
+    public void setId(int ident) {
+        id = ident;
+    }
+    
+    @Path("/chapter/{cid}")
+    public Chapter getChapter(@PathParam("cid") int cid) {
+        return chapter;
+    }
+    
+    @Path("/form1")
+    @POST
+    public void form1(MultivaluedMap map) {
+    }
+    
+    @Path("/form2")
+    @POST
+    public void form2(@FormParam("field1") String f1, @FormParam("field2") String f2) {
+    }
+    
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Book.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Book.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Chapter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Chapter.java?rev=884079&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Chapter.java
(added)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Chapter.java
Wed Nov 25 12:48:57 2009
@@ -0,0 +1,47 @@
+/**
+ * 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.model.wadl.jaxb;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "thechapter", namespace = "http://superbooks")
+@XmlType(name = "chapter", namespace = "http://superbooks")
+public class Chapter {
+
+    private int id;
+    public Chapter() {
+    }
+    public Chapter(int id) {
+        this.id = id;
+    }
+    
+    @GET
+    @Path("/id")
+    public int getId() {
+        return id;
+    }
+    
+    public void setId(int ident) {
+        id = ident;
+    }
+
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Chapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/Chapter.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/ObjectFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/ObjectFactory.java?rev=884079&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/ObjectFactory.java
(added)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/ObjectFactory.java
Wed Nov 25 12:48:57 2009
@@ -0,0 +1,47 @@
+/**
+ * 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.model.wadl.jaxb;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+@XmlRegistry
+public class ObjectFactory {
+    private static final QName BOOK_QNAME = new QName("http://superbooks", "thebook");
+    private static final QName CHAPTER_QNAME = new QName("http://superbooks", "thechapter");
+    
+    public Book createBook() {
+        return new Book();
+    }
+    public Chapter createChapter() {
+        return new Chapter();
+    }
+    
+    @XmlElementDecl(namespace = "http://superbooks", name = "thebook")
+    public JAXBElement<Book> createBook(Book value) {
+        return new JAXBElement<Book>(BOOK_QNAME, Book.class, null, value);
+    }
+    
+    @XmlElementDecl(namespace = "http://superbooks", name = "thechapter")
+    public JAXBElement<Chapter> createChapter(Chapter value) {
+        return new JAXBElement<Chapter>(CHAPTER_QNAME, Chapter.class, null, value);
+    }
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/ObjectFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/jaxb/ObjectFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java
Wed Nov 25 12:48:57 2009
@@ -395,25 +395,6 @@
         assertEquals("b", tag.getGroup());
     }
     
-    @Test
-    @SuppressWarnings("unchecked")
-    public void testInAppendAttributes() throws Exception {
-        String data = "<?xml version='1.0' encoding='UTF-8'?>"
-            + "<ns1:tagholder xmlns:ns1=\"http://tags\">"
-            + "<ns1:thetag><group>B</group><name>A</name></ns1:thetag></ns1:tagholder>";
-        JAXBElementProvider provider = new JAXBElementProvider();
-        Map<String, String> map = new HashMap<String, String>();
-        map.put("{http://tags}tagholder", "attr:custom");
-        provider.setInAppendAttributes(map);
-        ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
-        Object o = provider.readFrom((Class)TagVO2Holder.class, TagVO2Holder.class,
-                      new Annotation[0], MediaType.TEXT_XML_TYPE, new MetadataMap<String,
String>(), is);
-        TagVO2Holder holder = (TagVO2Holder)o;
-        assertEquals("custom", holder.getAttribute());
-        TagVO2 tag2 = holder.getTagValue();
-        assertEquals("A", tag2.getName());
-        assertEquals("B", tag2.getGroup());
-    }
     
     @Test
     @SuppressWarnings("unchecked")

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
Wed Nov 25 12:48:57 2009
@@ -54,7 +54,7 @@
 import org.junit.Assert;
 import org.junit.Ignore;
 import org.junit.Test;
-//CHECKSTYLE:OFF
+
 public class JSONProviderTest extends Assert {
 
     @Test
@@ -602,29 +602,6 @@
         readTagVOAfterTransform(data, "{http://bar}thetag2");
     }
     
-    @Test
-    @SuppressWarnings("unchecked")
-    public void testInAppendAttributes() throws Exception {
-        String data = "{t.tagholder:{t.thetag:{\"group\":\"B\",\"name\":\"A\"}}}";
-        JSONProvider provider = new JSONProvider();
-        Map<String, String> nsmap = new HashMap<String, String>();
-        nsmap.put("http://tags", "t");
-        provider.setNamespaceMap(nsmap);
-        Map<String, String> map = new HashMap<String, String>();
-        map.put("{http://tags}tagholder", "attr:custom");
-        provider.setInAppendAttributes(map);
-        ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
-        Object o = provider.readFrom((Class)TagVO2Holder.class, TagVO2Holder.class,
-                      new Annotation[0], MediaType.APPLICATION_JSON_TYPE, 
-                      new MetadataMap<String, String>(), is);
-        TagVO2Holder holder = (TagVO2Holder)o;
-        assertEquals("custom", holder.getAttribute());
-        TagVO2 tag2 = holder.getTagValue();
-        assertEquals("A", tag2.getName());
-        assertEquals("B", tag2.getGroup());
-    }
-    
-    
     @SuppressWarnings("unchecked")
     private void readTagVO2AfterTransform(String data, String keyValue) throws Exception
{
         JSONProvider provider = new JSONProvider();
@@ -933,4 +910,3 @@
     }
 
 }
-//CHECKSTYLE:ON
\ No newline at end of file

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringProviderTest.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringProviderTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringProviderTest.java
Wed Nov 25 12:48:57 2009
@@ -36,6 +36,7 @@
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.jaxrs.model.wadl.WadlGenerator;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 
 import org.junit.BeforeClass;
@@ -86,16 +87,16 @@
         WebClient client = WebClient.create(requestURI + "?_wadl&_type=xml");
         Document doc = DOMUtils.readXml(new InputStreamReader(client.get(InputStream.class),
"UTF-8"));
         Element root = doc.getDocumentElement();
-        assertEquals("http://research.sun.com/wadl/2006/10", root.getNamespaceURI());
+        assertEquals(WadlGenerator.WADL_NS, root.getNamespaceURI());
         assertEquals("application", root.getLocalName());
         List<Element> resourcesEls = DOMUtils.getChildrenWithName(root, 
-                                            "http://research.sun.com/wadl/2006/10", "resources");
+                                                                  WadlGenerator.WADL_NS,
"resources");
         assertEquals(1, resourcesEls.size());
         Element resourcesEl =  resourcesEls.get(0);
         assertEquals(baseURI, resourcesEl.getAttribute("base"));
         List<Element> resourceEls = 
             DOMUtils.getChildrenWithName(resourcesEl, 
-                                                "http://research.sun.com/wadl/2006/10", "resource");
+                                         WadlGenerator.WADL_NS, "resource");
         assertEquals(size, resourceEls.size());
         return resourceEls;
     }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
Wed Nov 25 12:48:57 2009
@@ -22,20 +22,13 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
-import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.net.HttpURLConnection;
 import java.net.Socket;
 import java.net.URL;
 import java.net.URLConnection;
-import java.util.List;
 
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 
 import org.junit.BeforeClass;
@@ -50,57 +43,6 @@
     }
     
     @Test
-    public void testMultipleRootsWadl() throws Exception {
-        List<Element> resourceEls = getWadlResourcesInfo("http://localhost:9080/webapp/",
-                                                         "http://localhost:9080/webapp/",
2);
-        String path1 = resourceEls.get(0).getAttribute("path");
-        int bookStoreInd = path1.contains("/bookstore") ? 0 : 1;
-        int petStoreInd = bookStoreInd == 0 ? 1 : 0;
-        checkBookStoreInfo(resourceEls.get(bookStoreInd));
-        checkPetStoreInfo(resourceEls.get(petStoreInd));
-    }
-    
-    @Test
-    public void testBookStoreWadl() throws Exception {
-        List<Element> resourceEls = getWadlResourcesInfo("http://localhost:9080/webapp/",
-                                                         "http://localhost:9080/webapp/bookstore",
1);
-        checkBookStoreInfo(resourceEls.get(0));
-    }
-    
-    @Test
-    public void testPetStoreWadl() throws Exception {
-        List<Element> resourceEls = getWadlResourcesInfo("http://localhost:9080/webapp/",
-                                                         "http://localhost:9080/webapp/petstore",
1);
-        checkPetStoreInfo(resourceEls.get(0));
-    }
- 
-    private void checkBookStoreInfo(Element resource) {
-        assertEquals("/bookstore", resource.getAttribute("path"));
-    }
-    
-    private void checkPetStoreInfo(Element resource) {
-        assertEquals("/petstore/", resource.getAttribute("path"));
-    }
-    
-    private List<Element> getWadlResourcesInfo(String baseURI, String requestURI, int
size) throws Exception {
-        WebClient client = WebClient.create(requestURI + "?_wadl&_type=xml");
-        Document doc = DOMUtils.readXml(new InputStreamReader(client.get(InputStream.class),
"UTF-8"));
-        Element root = doc.getDocumentElement();
-        assertEquals("http://research.sun.com/wadl/2006/10", root.getNamespaceURI());
-        assertEquals("application", root.getLocalName());
-        List<Element> resourcesEls = DOMUtils.getChildrenWithName(root, 
-                                            "http://research.sun.com/wadl/2006/10", "resources");
-        assertEquals(1, resourcesEls.size());
-        Element resourcesEl =  resourcesEls.get(0);
-        assertEquals(baseURI, resourcesEl.getAttribute("base"));
-        List<Element> resourceEls = 
-            DOMUtils.getChildrenWithName(resourcesEl, 
-                                                "http://research.sun.com/wadl/2006/10", "resource");
-        assertEquals(size, resourceEls.size());
-        return resourceEls;
-    }
-    
-    @Test
     public void testGetBook123() throws Exception {
         
         String endpointAddress =

Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_atom/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_atom/WEB-INF/beans.xml?rev=884079&r1=884078&r2=884079&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_atom/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_atom/WEB-INF/beans.xml Wed Nov 25 12:48:57
2009
@@ -89,7 +89,9 @@
   <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="feed" class="org.apache.cxf.jaxrs.provider.AtomFeedProvider">
+      <property name="formattedOutput" value="true"/>
+  </bean>
   <bean id="entry" class="org.apache.cxf.jaxrs.provider.AtomEntryProvider"/>
   
 </beans>



Mime
View raw message