cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r808885 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ 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/jav...
Date Fri, 28 Aug 2009 13:34:20 GMT
Author: sergeyb
Date: Fri Aug 28 13:34:18 2009
New Revision: 808885

URL: http://svn.apache.org/viewvc?rev=808885&view=rev
Log:
JAXRS : minor refactoring of JSON providers, fixing the issue of generated WADL being handled
by custom writers

Added:
    cxf/trunk/rt/frontend/jaxrs/src/test/resources/resources.xml   (with props)
Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.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/AegisJSONProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONUtils.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/provider/DataBindingJSONProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
    cxf/trunk/systests/src/test/resources/jaxrs_non_spring/WEB-INF/resources.xml

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
Fri Aug 28 13:34:18 2009
@@ -258,6 +258,9 @@
             props.put(PropertiesAwareDataBinding.TYPES_PROPERTY, allClasses);
             ((PropertiesAwareDataBinding)db).initialize(props);
         } else { 
+            if (s instanceof JAXRSServiceImpl) {
+                ((JAXRSServiceImpl)s).setCreateServiceModel(true);
+            }
             db.initialize(s);
         }
         factory.setUserProviders(Collections.singletonList(new DataBindingProvider(db)));
@@ -271,8 +274,8 @@
         serviceFactory.setUserResources(resources);
     }
     
-    public void setModelBeansWithServiceClass(List<UserResource> resources, Class<?>
sClass) {
-        serviceFactory.setUserResourcesWithServiceClass(resources, sClass);
+    public void setModelBeansWithServiceClass(List<UserResource> resources, Class<?>...
sClasses) {
+        serviceFactory.setUserResourcesWithServiceClass(resources, sClasses);
     }
     
     public void setModelRef(String modelRef) {
@@ -282,10 +285,10 @@
         }
     }
     
-    public void setModelRefWithServiceClass(String modelRef, Class<?> sClass) {
+    public void setModelRefWithServiceClass(String modelRef, Class<?>... sClasses)
{
         List<UserResource> resources = ResourceUtils.getUserResources(modelRef, getBus());
         if (resources != null) {
-            serviceFactory.setUserResourcesWithServiceClass(resources, sClass);
+            serviceFactory.setUserResourcesWithServiceClass(resources, sClasses);
         }
     }
     

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java Fri Aug
28 13:34:18 2009
@@ -38,7 +38,6 @@
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
-import org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor;
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
 import org.apache.cxf.jaxrs.model.MethodInvocationInfo;
 import org.apache.cxf.jaxrs.model.OperationResourceInfo;
@@ -122,7 +121,7 @@
             if (excResponse == null) {
                 ProviderFactory.getInstance(exchange.getInMessage()).clearThreadLocalProxies();
                 ClassResourceInfo criRoot =
-                    (ClassResourceInfo)exchange.get(JAXRSInInterceptor.ROOT_RESOURCE_CLASS);
+                    (ClassResourceInfo)exchange.get(JAXRSUtils.ROOT_RESOURCE_CLASS);
                 if (criRoot != null) {
                     criRoot.clearThreadLocalProxies();
                 }
@@ -141,7 +140,7 @@
             try {
                 Message msg = exchange.getInMessage();
                 MultivaluedMap<String, String> values = getTemplateValues(msg);
-                String subResourcePath = (String)msg.get(JAXRSInInterceptor.RELATIVE_PATH);
+                String subResourcePath = (String)msg.get(JAXRSUtils.RELATIVE_PATH);
                 String httpMethod = (String)msg.get(Message.HTTP_REQUEST_METHOD);
                 String contentType = (String)msg.get(Message.CONTENT_TYPE);
                 if (contentType == null) {
@@ -173,8 +172,7 @@
 
 
                 exchange.put(OperationResourceInfo.class, subOri);
-                msg.put(JAXRSInInterceptor.RELATIVE_PATH,
-                        values.getFirst(URITemplate.FINAL_MATCH_GROUP));
+                msg.put(JAXRSUtils.RELATIVE_PATH, values.getFirst(URITemplate.FINAL_MATCH_GROUP));
                 msg.put(URITemplate.TEMPLATE_PARAMETERS, values);
                 // work out request parameters for the sub-resouce class. Here we
                 // presume Inputstream has not been consumed yet by the root resource class.

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
Fri Aug 28 13:34:18 2009
@@ -153,12 +153,14 @@
         }
     }
     
-    public void setUserResourcesWithServiceClass(List<UserResource> resources, Class<?>
sClass) {
+    public void setUserResourcesWithServiceClass(List<UserResource> resources, Class<?>
...sClasses) {
         Map<String, UserResource> map = userResourcesAsMap(resources);
-        ClassResourceInfo cri = ResourceUtils.createServiceClassResourceInfo(
-            map, map.get(sClass.getName()), sClass, true, enableStatic);
-        if (cri != null) {
-            classResourceInfos.add(cri);
+        for (Class<?> sClass : sClasses) {
+            ClassResourceInfo cri = ResourceUtils.createServiceClassResourceInfo(
+                map, map.get(sClass.getName()), sClass, true, enableStatic);
+            if (cri != null) {
+                classResourceInfos.add(cri);
+            }
         }
     }
     

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java Fri
Aug 28 13:34:18 2009
@@ -21,6 +21,7 @@
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -57,6 +58,7 @@
     private Invoker invoker;
     private Map<QName, Endpoint> endpoints = new HashMap<QName, Endpoint>();
     private String address;
+    private boolean createServiceModel;
     
     public JAXRSServiceImpl() {
     }
@@ -70,6 +72,15 @@
         executor = SynchronousExecutor.getInstance();    
     }
     
+    public JAXRSServiceImpl(List<ClassResourceInfo> cri, boolean createModel) {
+        this(cri);
+        this.createServiceModel = createModel;
+    }
+    
+    public void setCreateServiceModel(boolean create) {
+        createServiceModel = create;
+    }
+    
     public String getBeanName() {
         return getName().toString();
     }
@@ -89,6 +100,9 @@
     }
     
     public List<ServiceInfo> getServiceInfos() {
+        if (!createServiceModel) {
+            return Collections.emptyList();
+        }
         // try to convert to WSDL-centric model so that CXF DataBindings can get initialized
         // might become useful too if we support wsdl2
         

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
Fri Aug 28 13:34:18 2009
@@ -49,9 +49,6 @@
 
 public class JAXRSInInterceptor extends AbstractPhaseInterceptor<Message> {
 
-    public static final String RELATIVE_PATH = "relative.path";
-    public static final String ROOT_RESOURCE_CLASS = "root.resource.class";
-
     private static final Logger LOG = LogUtils.getL7dLogger(JAXRSInInterceptor.class);
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSInInterceptor.class);
     
@@ -125,7 +122,7 @@
             throw new WebApplicationException(Response.Status.NOT_FOUND);
         }
 
-        message.getExchange().put(ROOT_RESOURCE_CLASS, resource);
+        message.getExchange().put(JAXRSUtils.ROOT_RESOURCE_CLASS, resource);
 
         String httpMethod = (String)message.get(Message.HTTP_REQUEST_METHOD);
         OperationResourceInfo ori = null;     
@@ -197,7 +194,7 @@
         LOG.fine("Found operation: " + ori.getMethodToInvoke().getName());
         
         message.getExchange().put(OperationResourceInfo.class, ori);
-        message.put(RELATIVE_PATH, values.getFirst(URITemplate.FINAL_MATCH_GROUP));
+        message.put(JAXRSUtils.RELATIVE_PATH, values.getFirst(URITemplate.FINAL_MATCH_GROUP));
         message.put(URITemplate.TEMPLATE_PARAMETERS, values);
       
         //2. Process parameters

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=808885&r1=808884&r2=808885&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
Fri Aug 28 13:34:18 2009
@@ -77,7 +77,7 @@
         } finally {
             ProviderFactory.getInstance(message).clearThreadLocalProxies();
             ClassResourceInfo cri =
-                (ClassResourceInfo)message.getExchange().get(JAXRSInInterceptor.ROOT_RESOURCE_CLASS);
+                (ClassResourceInfo)message.getExchange().get(JAXRSUtils.ROOT_RESOURCE_CLASS);
             if (cri != null) {
                 cri.clearThreadLocalProxies();
             }
@@ -159,6 +159,14 @@
             return;
         }
         
+        Object ignoreWritersProp = message.getExchange().get(JAXRSUtils.IGNORE_MESSAGE_WRITERS);
+        boolean ignoreWriters = 
+            ignoreWritersProp == null ? false : Boolean.valueOf(ignoreWritersProp.toString());
+        if (ignoreWriters) {
+            writeResponseToStream(message.getContent(OutputStream.class), responseObj);
+            return;
+        }
+        
         List<MediaType> availableContentTypes = computeAvailableContentTypes(message,
response);  
         
         Method invoked = null;
@@ -381,4 +389,13 @@
     private boolean isResponseAlreadyCommited(Message m) {
         return Boolean.TRUE.equals(m.getExchange().get(AbstractHTTPDestination.RESPONSE_COMMITED));
     }
+    
+    private void writeResponseToStream(OutputStream os, Object responseObj) {
+        try {
+            byte[] bytes = responseObj.toString().getBytes("UTF-8");
+            os.write(bytes, 0, bytes.length);
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
 }

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=808885&r1=808884&r2=808885&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
Fri Aug 28 13:34:18 2009
@@ -71,6 +71,7 @@
 import org.apache.cxf.jaxrs.model.ParameterType;
 import org.apache.cxf.jaxrs.model.URITemplate;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
@@ -87,6 +88,8 @@
     private static final String JAXB_DEFAULT_NAMESPACE = "##default";
     private static final String JAXB_DEFAULT_NAME = "##default";
     
+    private boolean ignoreMessageWriters = true;
+    
     public Response handleRequest(Message m, ClassResourceInfo resource) {
         
         if (!"GET".equals(m.get(Message.HTTP_REQUEST_METHOD))) {
@@ -132,6 +135,8 @@
         sbMain.append(sbResources.toString());
         sbMain.append("</application>");
         
+        m.getExchange().put(JAXRSUtils.IGNORE_MESSAGE_WRITERS, ignoreMessageWriters);
+        
         HttpHeaders headers = new HttpHeadersImpl(m);
         MediaType type = headers.getAcceptableMediaTypes().contains(MediaType.APPLICATION_XML_TYPE)
                       ? MediaType.APPLICATION_XML_TYPE : WADL_TYPE;  
@@ -595,6 +600,10 @@
         String prefix = getPrefix(namespace, clsMap);
         return new QName(namespace, name, prefix);
     }
-    
-    
+
+    public void setIgnoreMessageWriters(boolean ignoreMessageWriters) {
+        this.ignoreMessageWriters = ignoreMessageWriters;
+    }
+
+
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AegisJSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AegisJSONProvider.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AegisJSONProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AegisJSONProvider.java
Fri Aug 28 13:34:18 2009
@@ -46,11 +46,16 @@
     
     private List<String> arrayKeys;
     private boolean serializeAsArray;
+    private boolean dropRootElement; 
     private ConcurrentHashMap<String, String> namespaceMap = new ConcurrentHashMap<String,
String>();
     
     public AegisJSONProvider() {
     }
     
+    public void setDropRootElement(boolean dropRootElement) {
+        this.dropRootElement = dropRootElement;
+    }
+    
     public void setArrayKeys(List<String> keys) {
         this.arrayKeys = keys;
     }
@@ -72,7 +77,7 @@
     protected XMLStreamWriter createStreamWriter(QName typeQName, OutputStream os) throws
Exception {
         namespaceMap.putIfAbsent(typeQName.getNamespaceURI(), "ns1");
         XMLStreamWriter writer = JSONUtils.createStreamWriter(os, typeQName, writeXsiType,
namespaceMap, 
-                                                              serializeAsArray, arrayKeys);
+                                                              serializeAsArray, arrayKeys,
dropRootElement);
         return writer;
     }
     
@@ -92,5 +97,6 @@
         namespaceMap.putIfAbsent(qname.getNamespaceURI(), "ns1");
         return qname;
     }
+
     
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProvider.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProvider.java
Fri Aug 28 13:34:18 2009
@@ -47,6 +47,12 @@
     private ConcurrentHashMap<String, String> namespaceMap = new ConcurrentHashMap<String,
String>();
     private boolean writeXsiType = true;
     private boolean readXsiType = true;
+    private boolean dropRootElement;
+    private boolean ignoreMixedContent; 
+    
+    public void setDropRootElement(boolean dropRootElement) {
+        this.dropRootElement = dropRootElement;
+    }
     
     public void setWriteXsiType(boolean write) {
         writeXsiType = write;
@@ -82,8 +88,9 @@
         } else {
             qname = getQName(InjectionUtils.getActualType(genericType));
         }
-        return JSONUtils.createStreamWriter(os, qname, writeXsiType, namespaceMap, 
-                                            serializeAsArray, arrayKeys);
+        XMLStreamWriter writer = JSONUtils.createStreamWriter(os, qname, writeXsiType, namespaceMap,

+                                            serializeAsArray, arrayKeys, dropRootElement);
+        return JSONUtils.createIgnoreMixedContentWriterIfNeeded(writer, ignoreMixedContent);
     }
     
     @Override
@@ -109,5 +116,9 @@
         namespaceMap.putIfAbsent(qname.getNamespaceURI(), "ns1");
         return qname;
     }
+
+    public void setIgnoreMixedContent(boolean ignoreMixedContent) {
+        this.ignoreMixedContent = ignoreMixedContent;
+    }
     
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
Fri Aug 28 13:34:18 2009
@@ -29,10 +29,9 @@
 import java.lang.reflect.Type;
 import java.util.Collection;
 import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Produces;
@@ -51,19 +50,17 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.schemas.SchemaHandler;
-import org.apache.cxf.staxutils.DelegatingXMLStreamWriter;
-import org.codehaus.jettison.mapped.MappedXMLInputFactory;
 
 @Produces("application/json")
 @Consumes("application/json")
 @Provider
 public class JSONProvider extends AbstractJAXBProvider  {
     
-    private Map<String, String> namespaceMap = new HashMap<String, String>();
+    private ConcurrentHashMap<String, String> namespaceMap = 
+        new ConcurrentHashMap<String, String>();
     private boolean serializeAsArray;
     private List<String> arrayKeys;
     private boolean unwrapped;
@@ -72,6 +69,9 @@
     private boolean dropRootElement;
     private boolean dropCollectionWrapperElement;
     private boolean ignoreMixedContent; 
+    private boolean writeXsiType = true;
+    private boolean readXsiType = true;
+    
     @Context
     public void setMessageContext(MessageContext mc) {
         super.setContext(mc);
@@ -130,7 +130,7 @@
     }
     
     public void setNamespaceMap(Map<String, String> namespaceMap) {
-        this.namespaceMap = namespaceMap;
+        this.namespaceMap.putAll(namespaceMap);
     }
 
     public Object readFrom(Class<Object> type, Type genericType, Annotation[] anns,
MediaType mt, 
@@ -173,8 +173,7 @@
 
     protected XMLStreamReader createReader(Class<?> type, InputStream is) 
         throws Exception {
-        MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
-        return factory.createXMLStreamReader(is);
+        return JSONUtils.createStreamReader(is, readXsiType, namespaceMap);
     }
     
     protected InputStream getInputStream(Class<Object> cls, Type type, InputStream
is) throws Exception {
@@ -299,9 +298,6 @@
         
         XMLStreamWriter writer = createWriter(actualObject, actualClass, genericType, enc,

                                               os, isCollection);
-        if (ignoreMixedContent) {
-            writer = new IgnoreMixedContentWriter(writer);
-        }
         ms.marshal(actualObject, writer);
         writer.close();
     }
@@ -309,10 +305,10 @@
     protected XMLStreamWriter createWriter(Object actualObject, Class<?> actualClass,

         Type genericType, String enc, OutputStream os, boolean isCollection) throws Exception
{
         QName qname = getQName(actualClass, genericType, actualObject, true);
-        XMLStreamWriter xsw = JSONUtils.createStreamWriter(os, qname, false, 
-                                                           namespaceMap, serializeAsArray,
arrayKeys);
-        
-        return isCollection || dropRootElement ? new JSONCollectionWriter(xsw, qname) : xsw;

+        XMLStreamWriter writer = JSONUtils.createStreamWriter(os, qname, writeXsiType, 
+                                             namespaceMap, serializeAsArray, arrayKeys,
+                                             isCollection || dropRootElement);
+        return JSONUtils.createIgnoreMixedContentWriterIfNeeded(writer, ignoreMixedContent);
     }
     
     protected void marshal(Object actualObject, Class<?> actualClass, 
@@ -350,80 +346,12 @@
         return prefix;
     }
     
-    protected static class JSONCollectionWriter extends DelegatingXMLStreamWriter {
-        private QName ignoredQName;
-        public JSONCollectionWriter(XMLStreamWriter writer, QName qname) {
-            super(writer);
-            ignoredQName = qname;
-        }
-        
-        @Override
-        public void writeStartElement(String prefix, String local, String uri) throws XMLStreamException
{
-            if (ignoredQName.getLocalPart().equals(local) 
-                && ignoredQName.getNamespaceURI().equals(uri)) {
-                return;
-            }
-            super.writeStartElement(prefix, local, uri);
-        }
+    public void setWriteXsiType(boolean writeXsiType) {
+        this.writeXsiType = writeXsiType;
     }
     
-    protected static class IgnoreMixedContentWriter extends DelegatingXMLStreamWriter {
-        String lastText;
-        boolean isMixed;
-        List<Boolean> mixed = new LinkedList<Boolean>();
-        
-        public IgnoreMixedContentWriter(XMLStreamWriter writer) {
-            super(writer);
-        }
-
-        public void writeCharacters(String text) throws XMLStreamException {
-            if (StringUtils.isEmpty(text.trim())) {
-                lastText = text; 
-            } else if (lastText != null) {
-                lastText += text;
-            } else if (!isMixed) {
-                super.writeCharacters(text);                                
-            } else {
-                lastText = text;
-            }
-        }
-        
-        public void writeStartElement(String prefix, String local, String uri) throws XMLStreamException
{
-            if (lastText != null) {
-                isMixed = true;
-            }
-            mixed.add(0, isMixed);
-            lastText = null;
-            isMixed = false;
-            super.writeStartElement(prefix, local, uri);
-        }
-        public void writeStartElement(String uri, String local) throws XMLStreamException
{
-            if (lastText != null) {
-                isMixed = true;
-            }
-            mixed.add(0, isMixed);
-            lastText = null;
-            isMixed = false;
-            super.writeStartElement(uri, local);
-        }
-        public void writeStartElement(String local) throws XMLStreamException {
-            if (lastText != null) {
-                isMixed = true;
-            }
-            mixed.add(0, isMixed);
-            lastText = null;
-            isMixed = false;
-            super.writeStartElement(local);
-        }
-        public void writeEndElement() throws XMLStreamException {
-            if (lastText != null && (!isMixed || !StringUtils.isEmpty(lastText.trim())))
{
-                super.writeCharacters(lastText.trim());                
-            }
-            super.writeEndElement();
-            isMixed = mixed.get(0);
-            mixed.remove(0);
-        }
-
-        
+    public void setReadXsiType(boolean readXsiType) {
+        this.readXsiType = readXsiType;
     }
+
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONUtils.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONUtils.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONUtils.java
Fri Aug 28 13:34:18 2009
@@ -24,15 +24,20 @@
 import java.nio.charset.Charset;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.xml.namespace.NamespaceContext;
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
 import org.apache.cxf.common.WSDLConstants;
+import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.staxutils.DelegatingXMLStreamWriter;
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
 import org.codehaus.jettison.AbstractXMLStreamWriter;
 import org.codehaus.jettison.mapped.Configuration;
@@ -50,12 +55,14 @@
     }
     
     public static XMLStreamWriter createStreamWriter(OutputStream os, 
-                                                     QName qname, boolean writeXsiType,
-                                                     Map<String, String> namespaceMap,
+                                                     QName qname, 
+                                                     boolean writeXsiType,
+                                                     ConcurrentHashMap<String, String>
namespaceMap,
                                                      boolean serializeAsArray,
-                                                     List<String> arrayKeys) throws
Exception {
+                                                     List<String> arrayKeys,
+                                                     boolean dropRootElement) throws Exception
{
         if (writeXsiType) {
-            namespaceMap.put(XSI_URI, XSI_PREFIX);
+            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
         }
         Configuration c = new Configuration(namespaceMap);
         MappedNamespaceConvention convention = new MappedNamespaceConvention(c);
@@ -72,9 +79,18 @@
                 xsw.seriliazeAsArray(key);
             }
         }
-        return xsw;
+        XMLStreamWriter writer = !writeXsiType || dropRootElement 
+            ? new IgnoreContentJettisonWriter(xsw, writeXsiType, 
+                                              dropRootElement ? qname : null) : xsw;
+        
+        return writer;
     }    
     
+    public static XMLStreamWriter createIgnoreMixedContentWriterIfNeeded(XMLStreamWriter
writer, 
+                                                                         boolean ignoreMixedContent)
{
+        return ignoreMixedContent ? new IgnoreMixedContentWriter(writer) : writer; 
+    }
+    
     private static String getKey(MappedNamespaceConvention convention, QName qname) throws
Exception {
         return convention.createKey(qname.getPrefix(), 
                                     qname.getNamespaceURI(),
@@ -84,9 +100,9 @@
     }
     
     public static XMLStreamReader createStreamReader(InputStream is, boolean readXsiType,
-                                               Map<String, String> namespaceMap) throws
Exception {
+        ConcurrentHashMap<String, String> namespaceMap) throws Exception {
         if (readXsiType) {
-            namespaceMap.put(XSI_URI, XSI_PREFIX);
+            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
         }
         MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
         return new JettisonReader(namespaceMap, factory.createXMLStreamReader(is));
@@ -136,4 +152,94 @@
             };
         }
     }
+    
+    private static class IgnoreContentJettisonWriter extends DelegatingXMLStreamWriter {
+        
+        private boolean writeXsiType;
+        private QName ignoredQName;
+        
+        public IgnoreContentJettisonWriter(XMLStreamWriter writer, boolean writeXsiType,
QName qname) {
+            super(writer);
+            this.writeXsiType = writeXsiType;
+            ignoredQName = qname;
+        }
+        
+        public void writeAttribute(String prefix, String uri,
+                                   String local, String value) throws XMLStreamException
{
+            if (!writeXsiType && "type".equals(local) && "xsi".equals(prefix))
{
+                return;
+            }
+            super.writeAttribute(prefix, uri, local, value);
+            
+        }
+        
+        @Override
+        public void writeStartElement(String prefix, String local, String uri) throws XMLStreamException
{
+            if (ignoredQName != null && ignoredQName.getLocalPart().equals(local)

+                && ignoredQName.getNamespaceURI().equals(uri)) {
+                return;
+            }
+            super.writeStartElement(prefix, local, uri);
+        }
+    }
+    
+    private static class IgnoreMixedContentWriter extends DelegatingXMLStreamWriter {
+        String lastText;
+        boolean isMixed;
+        List<Boolean> mixed = new LinkedList<Boolean>();
+        
+        public IgnoreMixedContentWriter(XMLStreamWriter writer) {
+            super(writer);
+        }
+
+        public void writeCharacters(String text) throws XMLStreamException {
+            if (StringUtils.isEmpty(text.trim())) {
+                lastText = text; 
+            } else if (lastText != null) {
+                lastText += text;
+            } else if (!isMixed) {
+                super.writeCharacters(text);                                
+            } else {
+                lastText = text;
+            }
+        }
+        
+        public void writeStartElement(String prefix, String local, String uri) throws XMLStreamException
{
+            if (lastText != null) {
+                isMixed = true;
+            }
+            mixed.add(0, isMixed);
+            lastText = null;
+            isMixed = false;
+            super.writeStartElement(prefix, local, uri);
+        }
+        public void writeStartElement(String uri, String local) throws XMLStreamException
{
+            if (lastText != null) {
+                isMixed = true;
+            }
+            mixed.add(0, isMixed);
+            lastText = null;
+            isMixed = false;
+            super.writeStartElement(uri, local);
+        }
+        public void writeStartElement(String local) throws XMLStreamException {
+            if (lastText != null) {
+                isMixed = true;
+            }
+            mixed.add(0, isMixed);
+            lastText = null;
+            isMixed = false;
+            super.writeStartElement(local);
+        }
+        public void writeEndElement() throws XMLStreamException {
+            if (lastText != null && (!isMixed || !StringUtils.isEmpty(lastText.trim())))
{
+                super.writeCharacters(lastText.trim());                
+            }
+            super.writeEndElement();
+            isMixed = mixed.get(0);
+            mixed.remove(0);
+        }
+
+        
+    }
 }

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=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Fri
Aug 28 13:34:18 2009
@@ -97,6 +97,11 @@
 public final class JAXRSUtils {
 
     public static final MediaType ALL_TYPES = new MediaType();
+    public static final String RELATIVE_PATH = "relative.path";
+    public static final String ROOT_RESOURCE_CLASS = "root.resource.class";
+    public static final String IGNORE_MESSAGE_WRITERS = "ignore.message.writers";
+    
+    
     private static final Logger LOG = LogUtils.getL7dLogger(JAXRSUtils.class);
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSUtils.class);
     private static final String PROPOGATE_EXCEPTION = "org.apache.cxf.propogate.exception";

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProviderTest.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingJSONProviderTest.java
Fri Aug 28 13:34:18 2009
@@ -65,7 +65,7 @@
     @SuppressWarnings("unchecked")
     @Test
     public void testSDOWrite() throws Exception {
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c2));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c2), true);
         DataBinding binding = new SDODataBinding();
         binding.initialize(s);
         DataBindingJSONProvider p = new DataBindingJSONProvider();
@@ -89,7 +89,7 @@
     public void testSDORead() throws Exception {
         String data = "{\"p0.Structure\":{\"@xsi.type\":\"p0:Structure\",\"p0.text\":\"sdo\",\"p0.int\":3"
             + ",\"p0.dbl\":123.5,\"p0.texts\":\"text1\"}}";
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c2));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c2), true);
         DataBinding binding = new SDODataBinding();
         binding.initialize(s);
         DataBindingJSONProvider p = new DataBindingJSONProvider();
@@ -106,7 +106,7 @@
     
     @Test
     public void testJAXBWrite() throws Exception {
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         DataBinding binding = new JAXBDataBinding();
         binding.initialize(s);
         DataBindingJSONProvider p = new DataBindingJSONProvider();
@@ -123,7 +123,7 @@
     @Test
     public void testJAXBRead() throws Exception {
         String data = "{\"Book\":{\"id\":127,\"name\":\"CXF\",\"state\":\"\"}}";
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         DataBinding binding = new JAXBDataBinding();
         binding.initialize(s);
         DataBindingJSONProvider p = new DataBindingJSONProvider();
@@ -138,7 +138,7 @@
     
     @Test
     public void testAegisWrite() throws Exception {
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         s.put("writeXsiType", true);
         AegisDatabinding binding = new AegisDatabinding();
         binding.initialize(s);
@@ -154,7 +154,7 @@
     @Test
     @Ignore
     public void testAegisCollectionWrite() throws Exception {
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         s.put("writeXsiType", true);
         AegisDatabinding binding = new AegisDatabinding();
         binding.initialize(s);
@@ -180,7 +180,7 @@
     
     @SuppressWarnings("unchecked")
     public void doTestAegisRead(String data) throws Exception {
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         s.put("readXsiType", true);
         AegisDatabinding binding = new AegisDatabinding();
         binding.initialize(s);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
Fri Aug 28 13:34:18 2009
@@ -62,7 +62,7 @@
     
     @Test
     public void testAegisWrite() throws Exception {
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         s.put("writeXsiType", true);
         AegisDatabinding binding = new AegisDatabinding();
         binding.initialize(s);
@@ -83,7 +83,7 @@
         String data = "<ns1:Book xmlns:ns1=\"http://resources.jaxrs.cxf.apache.org\" "
             + "xmlns:ns2=\"http://www.w3.org/2001/XMLSchema-instance\" ns2:type=\"ns1:Book\">"
             + "<ns1:id>127</ns1:id><ns1:name>CXF</ns1:name><ns1:state></ns1:state></ns1:Book>";
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         s.put("readXsiType", true);
         AegisDatabinding binding = new AegisDatabinding();
         binding.initialize(s);
@@ -98,7 +98,7 @@
     
     @Test
     public void testJAXBWrite() throws Exception {
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         DataBinding binding = new JAXBDataBinding();
         binding.initialize(s);
         DataBindingProvider p = new DataBindingProvider(binding);
@@ -114,7 +114,7 @@
     @Test
     public void testJAXBRead() throws Exception {
         String data = "<Book><id>127</id><name>CXF</name><state></state></Book>";
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         DataBinding binding = new JAXBDataBinding();
         binding.initialize(s);
         DataBindingProvider p = new DataBindingProvider(binding);
@@ -129,7 +129,7 @@
     @SuppressWarnings("unchecked")
     @Test
     public void testSDOWrite() throws Exception {
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c2));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c2), true);
         DataBinding binding = new SDODataBinding();
         binding.initialize(s);
         DataBindingProvider p = new DataBindingProvider(binding);
@@ -157,7 +157,7 @@
             + "xsi:type=\"p0:Structure\">"
             + "<p0:text>sdo</p0:text><p0:int>3</p0:int><p0:dbl>123.5</p0:dbl><p0:texts>text1</p0:texts>"
             + "</p0:Structure>";
-        Service s = new JAXRSServiceImpl(Collections.singletonList(c2));
+        Service s = new JAXRSServiceImpl(Collections.singletonList(c2), true);
         DataBinding binding = new SDODataBinding();
         binding.initialize(s);
         DataBindingProvider p = new DataBindingProvider(binding);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
Fri Aug 28 13:34:18 2009
@@ -82,6 +82,31 @@
     }
     
     @Test
+    public void testUserResourceFromFile() throws Exception {
+        List<UserResource> list = 
+            ResourceUtils.getUserResources("classpath:/resources.xml");
+        assertNotNull(list);
+        assertEquals(1, list.size());
+        UserResource resource = list.get(0);
+        assertEquals("java.util.Map", resource.getName());
+        assertEquals("map", resource.getPath());
+        assertEquals("application/xml", resource.getProduces());
+        assertEquals("application/json", resource.getConsumes());
+        UserOperation oper = resource.getOperations().get(0);
+        assertEquals("putAll", oper.getName());
+        assertEquals("/putAll", oper.getPath());
+        assertEquals("PUT", oper.getVerb());
+        assertEquals("application/json", oper.getProduces());
+        assertEquals("application/xml", oper.getConsumes());
+        
+        Parameter p = oper.getParameters().get(0);
+        assertEquals("map", p.getName());
+        assertEquals("emptyMap", p.getDefaultValue());
+        assertTrue(p.isEncoded());
+        assertEquals("REQUEST_BODY", p.getType().toString());
+    }
+    
+    @Test
     public void testGetAllJaxbClasses() {
         ClassResourceInfo cri1 = 
             ResourceUtils.createClassResourceInfo(BookInterface.class, BookInterface.class,
true, true);

Added: cxf/trunk/rt/frontend/jaxrs/src/test/resources/resources.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/resources/resources.xml?rev=808885&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/resources/resources.xml (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/resources/resources.xml Fri Aug 28 13:34:18 2009
@@ -0,0 +1,9 @@
+<model xmlns="http://cxf.apache.org/jaxrs">
+ <resource name="java.util.Map" 
+    path="map" produces="application/xml" consumes="application/json">
+    <operation name="putAll" verb="PUT" path="/putAll" 
+       produces="application/json" consumes="application/xml">
+       <param name="map" type="REQUEST_BODY" encoded="true" defaultValue="emptyMap"/>
+    </operation>
+ </resource>
+</model>
\ No newline at end of file

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/resources/resources.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/resources/resources.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/resources/resources.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/trunk/systests/src/test/resources/jaxrs_non_spring/WEB-INF/resources.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_non_spring/WEB-INF/resources.xml?rev=808885&r1=808884&r2=808885&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_non_spring/WEB-INF/resources.xml (original)
+++ cxf/trunk/systests/src/test/resources/jaxrs_non_spring/WEB-INF/resources.xml Fri Aug 28
13:34:18 2009
@@ -1,6 +1,6 @@
 <model xmlns="http://cxf.apache.org/jaxrs">
  <resource name="org.apache.cxf.systest.jaxrs.BookStoreNoAnnotations" 
-    path="bookstore" producesTypes="application/xml" consumesTypes="application/xml">
+    path="bookstore" produces="application/xml" consumes="application/xml">
     <operation name="getBook" verb="GET" path="/books/{id}">
        <param name="id" type="PATH" encoded="false"/>
     </operation>



Mime
View raw message