cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1304292 [2/2] - in /cxf/trunk: distribution/ distribution/src/main/release/samples/corba/hello_world/src/main/idl/ distribution/src/main/release/samples/jax_rs/content_negotiation/ distribution/src/main/release/samples/sts/src/demo/wssec/s...
Date Fri, 23 Mar 2012 11:58:12 GMT
Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java Fri Mar 23 11:58:10 2012
@@ -18,16 +18,12 @@
  */
 package org.apache.cxf.jaxrs.model.wadl;
 
-import java.io.ByteArrayOutputStream;
 import java.io.StringReader;
-import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 
 import javax.ws.rs.core.HttpHeaders;
@@ -40,9 +36,7 @@ import org.w3c.dom.Element;
 import org.apache.cxf.common.xmlschema.XmlSchemaConstants;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.jaxrs.JAXRSServiceImpl;
-import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
-import org.apache.cxf.jaxrs.provider.JSONProvider;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
@@ -69,42 +63,6 @@ public class WadlGeneratorTest extends A
     }
     
     @Test
-    public void testWadlInJsonFormat() throws Exception {
-        WadlGenerator wg = new WadlGenerator();
-        wg.setUseJaxbContextForQnames(false);
-        wg.setIgnoreMessageWriters(false);
-        
-        wg.setExternalLinks(Collections.singletonList("json.schema"));
-        
-        ClassResourceInfo cri = 
-            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
-        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
-        Map<String, List<String>> headers = new HashMap<String, List<String>>();
-        headers.put("Accept", Collections.singletonList("application/json"));
-        m.put(Message.PROTOCOL_HEADERS, headers);
-        Response r = wg.handleRequest(m, cri);
-        assertEquals("application/json",
-                r.getMetadata().getFirst("Content-Type").toString());
-        
-        ByteArrayOutputStream os = new ByteArrayOutputStream();
-        
-        new JSONProvider<Document>().writeTo(
-                (Document)r.getEntity(), Document.class, Document.class, 
-                  new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE, 
-                  new MetadataMap<String, Object>(), os);
-        String s = os.toString();
-        String expected1 = 
-            "{\"application\":{\"grammars\":{\"include\":{\"@href\":\"http:\\/\\/localhost:8080\\/baz"
-            + "\\/json.schema\"}},\"resources\":{\"@base\":\"http:\\/\\/localhost:8080\\/baz\","
-            + "\"resource\":{\"@path\":\"\\/bookstore\\/{id}\"";
-        assertTrue(s.startsWith(expected1));
-        String expected2 =
-            "\"response\":{\"representation\":[{\"@mediaType\":\"application\\/xml\"},"
-            + "{\"@element\":\"Chapter\",\"@mediaType\":\"application\\/json\"}]}";
-        assertTrue(s.contains(expected2));
-    }
-    
-    @Test
     public void testNoWadl() {
         WadlGenerator wg = new WadlGenerator();
         assertNull(wg.handleRequest(new MessageImpl(), null));

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java Fri Mar 23 11:58:10 2012
@@ -232,41 +232,6 @@ public class ProviderFactoryTest extends
     }
     
     @Test
-    public void testCustomJsonProvider() {
-        ProviderFactory pf = ProviderFactory.getInstance();
-        JSONProvider<Book> provider = new JSONProvider<Book>();
-        pf.registerUserProvider(provider);
-        MessageBodyReader<?> customJsonReader = pf.createMessageBodyReader(Book.class, null, null, 
-                                               MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
-        assertSame(customJsonReader, provider);
-        
-        MessageBodyWriter<?> customJsonWriter = pf.createMessageBodyWriter(Book.class, null, null, 
-                                               MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
-        assertSame(customJsonWriter, provider);
-    }
-    
-    @Test
-    public void testDefaultJsonProviderCloned() {
-        ProviderFactory pf = ProviderFactory.getInstance();
-        MessageBodyReader<?> customJsonReader = pf.createMessageBodyReader(Book.class, null, null, 
-                                                MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
-        assertTrue(customJsonReader instanceof JSONProvider);
-        
-        MessageBodyReader<?> customJsonReader2 = pf.createMessageBodyReader(Book.class, null, null, 
-                                                MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
-        assertSame(customJsonReader, customJsonReader2);
-        
-        MessageBodyWriter<?> customJsonWriter = pf.createMessageBodyWriter(Book.class, null, null, 
-                                                MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
-        assertSame(customJsonReader, customJsonWriter);
-        
-        MessageBodyReader<?> jsonReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
-            Book.class, null, null, MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
-        assertTrue(jsonReader instanceof JSONProvider);
-        assertNotSame(jsonReader, customJsonReader);
-    }
-    
-    @Test
     public void testDataSourceReader() {
         ProviderFactory pf = ProviderFactory.getInstance();
         pf.registerUserProvider(new DataSourceProvider<Object>());
@@ -319,16 +284,6 @@ public class ProviderFactoryTest extends
         
         assertNull(((JAXBElementProvider<Book>)jaxbReader).getSchema());
         assertNotNull(((JAXBElementProvider<Book>)customJaxbReader).getSchema());
-        
-        MessageBodyReader<Book> customJsonReader = pf.createMessageBodyReader(Book.class, null, null, 
-                                                 MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
-        assertTrue(customJsonReader instanceof JSONProvider);
-        MessageBodyReader<Book> jsonReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
-            Book.class, null, null, MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
-        assertTrue(jsonReader instanceof JSONProvider);
-        assertNotSame(jsonReader, customJsonReader);
-        assertNull(((JSONProvider<Book>)jsonReader).getSchema());
-        assertNotNull(((JSONProvider<Book>)customJsonReader).getSchema());
     }
     
     @Test
@@ -464,29 +419,6 @@ public class ProviderFactoryTest extends
     }
     
     @Test
-    public void testSortEntityProvidersWithConfig() throws Exception {
-        ProviderFactory pf = ProviderFactory.getInstance();
-        JSONProvider<?> json1 = new JSONProvider<Object>();
-        json1.setConsumeMediaTypes(Collections.singletonList("application/json;q=0.9"));
-        pf.registerUserProvider(json1);
-        JSONProvider<?> json2 = new JSONProvider<Object>();
-        json2.setConsumeMediaTypes(Collections.singletonList("application/json"));
-        json2.setProduceMediaTypes(Collections.singletonList("application/sbc;q=0.9"));
-        pf.registerUserProvider(json2);
-        
-        List<ProviderInfo<MessageBodyReader<?>>> readers = pf.getMessageReaders();
-
-        assertTrue(indexOf(readers, json2) 
-                   < indexOf(readers, json1));
-        
-        List<ProviderInfo<MessageBodyWriter<?>>> writers = pf.getMessageWriters();
-
-        assertTrue(indexOf(writers, json1) 
-                   < indexOf(writers, json2));
-        
-    }
-    
-    @Test
     public void testGetStringProvider() throws Exception {
         verifyProvider(String.class, PrimitiveTextProvider.class, "text/plain");
     }
@@ -538,12 +470,6 @@ public class ProviderFactoryTest extends
     }    
     
     @Test
-    public void testGetJSONProviderConsumeMime() throws Exception {
-        verifyProvider(org.apache.cxf.jaxrs.resources.Book.class, JSONProvider.class, 
-                       "application/json");
-    }
-    
-    @Test
     public void testRegisterCustomJSONEntityProvider() throws Exception {
         ProviderFactory pf = ProviderFactory.getInstance();
         pf.registerUserProvider(new CustomJSONProvider());

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java (original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java Fri Mar 23 11:58:10 2012
@@ -31,6 +31,7 @@ import java.util.HashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.zip.GZIPOutputStream;
+
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.PUT;
@@ -50,7 +51,7 @@ import org.apache.commons.lang.Validate;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
-import org.apache.cxf.jaxrs.provider.JSONProvider;
+import org.apache.cxf.jaxrs.ext.provider.json.JSONProvider;
 
 @Path("/browser")
 public class BootstrapStorage {

Modified: cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/DataBindingJSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/DataBindingJSONProvider.java?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/DataBindingJSONProvider.java (original)
+++ cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/DataBindingJSONProvider.java Fri Mar 23 11:58:10 2012
@@ -35,7 +35,6 @@ import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
 import org.apache.cxf.jaxrs.provider.DataBindingProvider;
-import org.apache.cxf.jaxrs.provider.JSONUtils;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.codehaus.jettison.mapped.Configuration;

Copied: cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/JSONUtils.java (from r1303343, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONUtils.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/JSONUtils.java?p2=cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/JSONUtils.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONUtils.java&r1=1303343&r2=1304292&rev=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONUtils.java (original)
+++ cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/JSONUtils.java Fri Mar 23 11:58:10 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.ext.provider;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;

Copied: cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/PrefixRespectingMappedNamespaceConvention.java (from r1303343, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrefixRespectingMappedNamespaceConvention.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/PrefixRespectingMappedNamespaceConvention.java?p2=cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/PrefixRespectingMappedNamespaceConvention.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrefixRespectingMappedNamespaceConvention.java&r1=1303343&r2=1304292&rev=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrefixRespectingMappedNamespaceConvention.java (original)
+++ cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/PrefixRespectingMappedNamespaceConvention.java Fri Mar 23 11:58:10 2012
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.ext.provider;
 
 import org.codehaus.jettison.mapped.Configuration;
 import org.codehaus.jettison.mapped.MappedNamespaceConvention;

Modified: cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/aegis/AegisJSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/aegis/AegisJSONProvider.java?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/aegis/AegisJSONProvider.java (original)
+++ cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/aegis/AegisJSONProvider.java Fri Mar 23 11:58:10 2012
@@ -43,8 +43,8 @@ import org.w3c.dom.Document;
 import org.apache.cxf.aegis.AegisContext;
 import org.apache.cxf.aegis.AegisWriter;
 import org.apache.cxf.aegis.type.AegisType;
+import org.apache.cxf.jaxrs.ext.provider.JSONUtils;
 import org.apache.cxf.jaxrs.ext.provider.PrefixCollectingXMLStreamWriter;
-import org.apache.cxf.jaxrs.provider.JSONUtils;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.codehaus.jettison.mapped.Configuration;

Copied: cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/json/JSONProvider.java (from r1303343, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/json/JSONProvider.java?p2=cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/json/JSONProvider.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java&r1=1303343&r2=1304292&rev=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java (original)
+++ cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/ext/provider/json/JSONProvider.java Fri Mar 23 11:58:10 2012
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.ext.provider.json;
 
 
 import java.io.ByteArrayInputStream;
@@ -60,6 +60,8 @@ import org.w3c.dom.Document;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.jaxrs.ext.MessageContext;
+import org.apache.cxf.jaxrs.ext.provider.JSONUtils;
+import org.apache.cxf.jaxrs.provider.AbstractJAXBProvider;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.JAXBUtils;

Copied: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/JSONProviderTest.java (from r1303343, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/JSONProviderTest.java?p2=cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/JSONProviderTest.java&p1=cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java&r1=1303343&r2=1304292&rev=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java (original)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/JSONProviderTest.java Fri Mar 23 11:58:10 2012
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.ext.provider.json;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -44,6 +44,7 @@ import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlMixed;
@@ -56,9 +57,8 @@ import org.w3c.dom.Document;
 
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.jaxrs.fortest.jaxb.packageinfo.Book2;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
-import org.apache.cxf.jaxrs.provider.JAXBElementProviderTest.TagVO2Holder;
+import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
 import org.apache.cxf.jaxrs.resources.Book;
 import org.apache.cxf.jaxrs.resources.CollectionsResource;
 import org.apache.cxf.jaxrs.resources.ManyTags;
@@ -66,6 +66,7 @@ import org.apache.cxf.jaxrs.resources.Su
 import org.apache.cxf.jaxrs.resources.TagVO;
 import org.apache.cxf.jaxrs.resources.TagVO2;
 import org.apache.cxf.jaxrs.resources.Tags;
+import org.apache.cxf.jaxrs.resources.jaxb.Book2;
 import org.apache.cxf.staxutils.StaxUtils;
 
 import org.junit.Assert;
@@ -135,23 +136,25 @@ public class JSONProviderTest extends As
     @Test
     public void testWriteCollectionWithoutXmlRootElement() 
         throws Exception {
-        JSONProvider<List<org.apache.cxf.jaxrs.fortest.jaxb.SuperBook>> provider 
-            = new JSONProvider<List<org.apache.cxf.jaxrs.fortest.jaxb.SuperBook>>();
+        JSONProvider<List<SuperBook>> provider 
+            = new JSONProvider<List<SuperBook>>();
         provider.setCollectionWrapperName("{http://superbooks}SuperBooks");
         provider.setJaxbElementClassMap(Collections.singletonMap(
-                org.apache.cxf.jaxrs.fortest.jaxb.SuperBook.class.getName(), 
+                SuperBook.class.getName(), 
                 "{http://superbooks}SuperBook"));
-        org.apache.cxf.jaxrs.fortest.jaxb.SuperBook b = 
-            new org.apache.cxf.jaxrs.fortest.jaxb.SuperBook("CXF in Action", 123L, 124L);
-        List<org.apache.cxf.jaxrs.fortest.jaxb.SuperBook> books = 
+        SuperBook b = 
+            new SuperBook("CXF in Action", 123L, 124L);
+        List<SuperBook> books = 
             Collections.singletonList(b);
         
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         provider.writeTo(books, List.class, 
-                         org.apache.cxf.jaxrs.fortest.jaxb.SuperBook.class,
+                         SuperBook.class,
                          new Annotation[0], MediaType.APPLICATION_JSON_TYPE, 
                          new MetadataMap<String, Object>(), bos);
-        String expected = "{\"ns1.SuperBooks\":[{\"id\":123,\"name\":\"CXF in Action\",\"superId\":124}]}";
+        String expected = "{\"ns1.SuperBooks\":[{\"id\":123,\"name\":\"CXF in Action\","
+            + "\"state\":\"\",\"superId\":124}]}";
+        System.out.println(bos.toString());
         assertEquals(expected, bos.toString());
     }
     
@@ -895,7 +898,7 @@ public class JSONProviderTest extends As
         TagVO2 tag = new TagVO2("A", "B");
         TagVO2Holder holder = new TagVO2Holder();
         holder.setTag(tag);
-        List<TagVO2Holder> list = new ArrayList<JAXBElementProviderTest.TagVO2Holder>();
+        List<TagVO2Holder> list = new ArrayList<TagVO2Holder>();
         list.add(holder);
     
         //ParameterizedType required for Lists of Objects
@@ -1192,4 +1195,25 @@ public class JSONProviderTest extends As
             return books;
         }
     }
+    
+    @XmlRootElement(name = "tagholder", namespace = "http://tags")
+    public static class TagVO2Holder {
+        @XmlElement(name = "thetag", namespace = "http://tags")
+        private TagVO2 t;
+        @XmlAttribute
+        private String attr = "attribute"; 
+        
+        public void setTag(TagVO2 tag) {
+            this.t = tag;
+        }
+
+        public TagVO2 getTagValue() {
+            return t;
+        }
+
+        public String getAttribute() {
+            return attr;
+        }
+        
+    }
 }

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/ProviderFactoryJsonTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/ProviderFactoryJsonTest.java?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/ProviderFactoryJsonTest.java (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/ProviderFactoryJsonTest.java Fri Mar 23 11:58:10 2012
@@ -0,0 +1,106 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.ext.provider.json;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+
+import org.apache.cxf.jaxrs.provider.ProviderFactory;
+import org.apache.cxf.jaxrs.resources.Book;
+import org.apache.cxf.message.MessageImpl;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ProviderFactoryJsonTest extends Assert {
+
+    @Before
+    public void setUp() {
+        ProviderFactory.getInstance().clearProviders();
+    }
+    
+    @Test
+    public void testCustomJsonProvider() {
+        ProviderFactory pf = ProviderFactory.getInstance();
+        JSONProvider<Book> provider = new JSONProvider<Book>();
+        pf.registerUserProvider(provider);
+        MessageBodyReader<?> customJsonReader = pf.createMessageBodyReader(Book.class, null, null, 
+                                               MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
+        assertSame(customJsonReader, provider);
+        
+        MessageBodyWriter<?> customJsonWriter = pf.createMessageBodyWriter(Book.class, null, null, 
+                                               MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
+        assertSame(customJsonWriter, provider);
+    }
+    
+    @Test
+    public void testDefaultJsonProviderCloned() {
+        ProviderFactory pf = ProviderFactory.getInstance();
+        MessageBodyReader<?> customJsonReader = pf.createMessageBodyReader(Book.class, null, null, 
+                                                MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
+        assertTrue(customJsonReader instanceof JSONProvider);
+        
+        MessageBodyReader<?> customJsonReader2 = pf.createMessageBodyReader(Book.class, null, null, 
+                                                MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
+        assertSame(customJsonReader, customJsonReader2);
+        
+        MessageBodyWriter<?> customJsonWriter = pf.createMessageBodyWriter(Book.class, null, null, 
+                                                MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
+        assertSame(customJsonReader, customJsonWriter);
+        
+        MessageBodyReader<?> jsonReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
+            Book.class, null, null, MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
+        assertTrue(jsonReader instanceof JSONProvider);
+        assertNotSame(jsonReader, customJsonReader);
+    }
+    
+        
+    private void verifyProvider(ProviderFactory pf, Class<?> type, Class<?> provider, String mediaType) 
+        throws Exception {
+        
+        if (pf == null) {
+            pf = ProviderFactory.getInstance();
+        }
+        
+        MediaType mType = MediaType.valueOf(mediaType);
+        
+        MessageBodyReader<?> reader = pf.createMessageBodyReader(type, type, null, mType, new MessageImpl());
+        assertSame("Unexpected provider found", provider, reader.getClass());
+    
+        MessageBodyWriter<?> writer = pf.createMessageBodyWriter(type, type, null, mType, new MessageImpl());
+        assertTrue("Unexpected provider found", provider == writer.getClass());
+    }
+    
+    
+    private void verifyProvider(Class<?> type, Class<?> provider, String mediaType) 
+        throws Exception {
+        verifyProvider(null, type, provider, mediaType);
+        
+    }
+       
+    @Test
+    public void testGetJSONProviderConsumeMime() throws Exception {
+        verifyProvider(org.apache.cxf.jaxrs.resources.Book.class, JSONProvider.class, 
+                       "application/json");
+    }
+    
+}

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/ProviderFactoryJsonTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/ProviderFactoryJsonTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/WadlGeneratorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/WadlGeneratorTest.java?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/WadlGeneratorTest.java (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/WadlGeneratorTest.java Fri Mar 23 11:58:10 2012
@@ -0,0 +1,119 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.ext.provider.json;
+
+import java.io.ByteArrayOutputStream;
+import java.lang.annotation.Annotation;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.w3c.dom.Document;
+
+import org.apache.cxf.jaxrs.JAXRSServiceImpl;
+import org.apache.cxf.jaxrs.impl.MetadataMap;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.jaxrs.model.wadl.WadlGenerator;
+import org.apache.cxf.jaxrs.resources.BookStore;
+import org.apache.cxf.jaxrs.utils.ResourceUtils;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.servlet.ServletDestination;
+import org.easymock.EasyMock;
+import org.easymock.IMocksControl;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class WadlGeneratorTest extends Assert {
+
+    private IMocksControl control;
+    
+    @Before
+    public void setUp() {
+        control = EasyMock.createNiceControl();
+        control.makeThreadSafe(true);
+    }
+    
+    @Test
+    public void testWadlInJsonFormat() throws Exception {
+        WadlGenerator wg = new WadlGenerator();
+        wg.setUseJaxbContextForQnames(false);
+        wg.setIgnoreMessageWriters(false);
+        
+        wg.setExternalLinks(Collections.singletonList("json.schema"));
+        
+        ClassResourceInfo cri = 
+            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
+        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
+        Map<String, List<String>> headers = new HashMap<String, List<String>>();
+        headers.put("Accept", Collections.singletonList("application/json"));
+        m.put(Message.PROTOCOL_HEADERS, headers);
+        Response r = wg.handleRequest(m, cri);
+        assertEquals("application/json",
+                r.getMetadata().getFirst("Content-Type").toString());
+        
+        ByteArrayOutputStream os = new ByteArrayOutputStream();
+        
+        new JSONProvider<Document>().writeTo(
+                (Document)r.getEntity(), Document.class, Document.class, 
+                  new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE, 
+                  new MetadataMap<String, Object>(), os);
+        String s = os.toString();
+        String expected1 = 
+            "{\"application\":{\"grammars\":{\"include\":{\"@href\":\"http:\\/\\/localhost:8080\\/baz"
+            + "\\/json.schema\"}},\"resources\":{\"@base\":\"http:\\/\\/localhost:8080\\/baz\","
+            + "\"resource\":{\"@path\":\"\\/bookstore\\/{id}\"";
+        assertTrue(s.startsWith(expected1));
+        String expected2 =
+            "\"response\":{\"representation\":[{\"@mediaType\":\"application\\/xml\"},"
+            + "{\"@element\":\"Chapter\",\"@mediaType\":\"application\\/json\"}]}";
+        assertTrue(s.contains(expected2));
+    }
+    
+    private Message mockMessage(String baseAddress, String pathInfo, String query,
+                                List<ClassResourceInfo> cris) {
+        Message m = new MessageImpl();
+        Exchange e = new ExchangeImpl();
+        e.put(Service.class, new JAXRSServiceImpl(cris));
+        
+        m.setExchange(e);
+        control.reset();
+        ServletDestination d = control.createMock(ServletDestination.class);
+        EndpointInfo epr = new EndpointInfo(); 
+        epr.setAddress(baseAddress);
+        d.getEndpointInfo();
+        EasyMock.expectLastCall().andReturn(epr).anyTimes();
+        e.setDestination(d);
+        m.put(Message.REQUEST_URI, pathInfo);
+        m.put(Message.QUERY_STRING, query);
+        m.put(Message.HTTP_REQUEST_METHOD, "GET");
+        control.replay();
+        return m;
+    }
+}

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/WadlGeneratorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/WadlGeneratorTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book.xml?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book.xml (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book.xml Fri Mar 23 11:58:10 2012
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
+<Book>
+ 
+     <name>CXF</name>
+     <id>125</id>
+     
+</Book>

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book2.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book2.xml?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book2.xml (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book2.xml Fri Mar 23 11:58:10 2012
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
+<Book>
+ 
+     <name>CXF</name>
+     <id>125</id>
+     books
+</Book>

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book2.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/ext/provider/json/book2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Book.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Book.java?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Book.java (original)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Book.java Fri Mar 23 11:58:10 2012
@@ -21,9 +21,11 @@ package org.apache.cxf.jaxrs.resources;
 
 import javax.ws.rs.GET;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
 
 
 @XmlRootElement(name = "Book")
+@XmlSeeAlso({SuperBook.class })
 public class Book implements Comparable<Book> {
     private String name;
     private long id;
@@ -57,8 +59,8 @@ public class Book implements Comparable<
         return "";
     }
     
-    
     public void setState(String s) {
+        
     }
     
     public int hashCode() { 

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/BookStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/BookStore.java?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/BookStore.java (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/BookStore.java Fri Mar 23 11:58:10 2012
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.resources;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+
+@Path("/bookstore/{id}")
+@Consumes({"application/xml", "application/json" })
+@Produces({"application/xml", "application/json" })
+public class BookStore {
+
+    @GET
+    @Path("chapter")
+    public Chapter getChapter() {
+        return new Chapter(1);
+    }
+    
+}

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/BookStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/BookStore.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Chapter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Chapter.java?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Chapter.java (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Chapter.java Fri Mar 23 11:58:10 2012
@@ -0,0 +1,59 @@
+/**
+ * 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.resources;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.XMLName;
+
+@XmlRootElement(name = "thechapter", namespace = "http://superbooks")
+@XmlType(name = "chapter", namespace = "http://superbooks")
+@Description("Chapter subresource")
+@XMLName(value = "{http://books}thesuperchapter")
+public class Chapter {
+
+    private int id;
+    public Chapter() {
+    }
+    public Chapter(int id) {
+        this.id = id;
+    }
+    
+    @GET
+    @Path("/id")
+    @Produces({"application/xml", "application/json" })
+    @Description("Get the chapter")
+    public Chapter getIt() {
+        return this;
+    }
+    
+    public void setId(int ident) {
+        id = ident;
+    }
+    
+    public int getId() {
+        return id;
+    }
+
+}

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Chapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/Chapter.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/CollectionsResource.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/CollectionsResource.java?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/CollectionsResource.java (original)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/CollectionsResource.java Fri Mar 23 11:58:10 2012
@@ -20,13 +20,38 @@ package org.apache.cxf.jaxrs.resources;
 
 import java.util.List;
 import javax.ws.rs.GET;
+import javax.ws.rs.POST;
 
 public class CollectionsResource {
     
     @GET
+    public List<Book> getBooks() {
+        return null;
+    }
+    
+    @GET
     public List<AegisTestBean> getAegisBeans() {
         return null;
     }
     
+    @GET
+    public List<TagVO2> getTags() {
+        return null;
+    }
+    
+    @POST
+    public void setBooks(List<Book> books) {
+    }
+    
+    @POST
+    public void setBooksArray(Book[] books) {
+    }
     
+    @POST
+    public void setTags(List<TagVO2> tags) {
+    }
+    
+    @POST
+    public void setTagsArray(TagVO2[] tags) {
+    }
 }

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java Fri Mar 23 11:58:10 2012
@@ -0,0 +1,44 @@
+/**
+ * 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.resources;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+@XmlRootElement(name = "SuperBook")
+public class SuperBook extends Book {
+    private long superId;
+    public SuperBook() {
+    }
+    
+    public SuperBook(String name, long id, long superId) {
+        super(name, id);
+        this.superId = superId;
+    }
+    
+    public void setSuperId(long i) {
+        superId = i;
+    }
+    
+    public long getSuperId() {
+        return superId;
+    }
+
+}

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/TagVO2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/TagVO2.java?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/TagVO2.java (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/TagVO2.java Fri Mar 23 11:58:10 2012
@@ -0,0 +1,34 @@
+/**
+ * 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.resources;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "thetag", namespace = "http://tags")
+public class TagVO2 extends TagVO {
+    
+    public TagVO2() {
+        
+    }
+    
+    public TagVO2(String name, String group) {
+        super(name, group);
+    }
+}

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/TagVO2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/TagVO2.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/Book2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/Book2.java?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/Book2.java (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/Book2.java Fri Mar 23 11:58:10 2012
@@ -0,0 +1,51 @@
+/**
+ * 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.resources.jaxb;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "thebook2")
+public class Book2 {
+
+    private String name;
+    private int id;
+    
+    public Book2() {
+    }
+    
+    public Book2(int id) {
+        this.id = id;
+    }
+    
+    public int getId() {
+        return id;
+    }
+    
+    public void setId(int ident) {
+        id = ident;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+}

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/Book2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/Book2.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/package-info.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/package-info.java?rev=1304292&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/package-info.java (added)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/package-info.java Fri Mar 23 11:58:10 2012
@@ -0,0 +1,21 @@
+/**
+ * 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.
+ */
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://superbooks")
+package org.apache.cxf.jaxrs.resources.jaxb;
+

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/package-info.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java Fri Mar 23 11:58:10 2012
@@ -57,8 +57,8 @@ import org.apache.cxf.jaxrs.client.WebCl
 import org.apache.cxf.jaxrs.ext.multipart.Attachment;
 import org.apache.cxf.jaxrs.ext.multipart.ContentDisposition;
 import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
+import org.apache.cxf.jaxrs.ext.provider.json.JSONProvider;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
-import org.apache.cxf.jaxrs.provider.JSONProvider;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.transport.http.HTTPConduit;
 

Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml?rev=1304292&r1=1304291&r2=1304292&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml Fri Mar 23 11:58:10 2012
@@ -261,7 +261,7 @@ http://cxf.apache.org/schemas/core.xsd">
     <value>books</value>
   </util:list>
   
-  <bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.JSONProvider">
+  <bean id="jsonProvider" class="org.apache.cxf.jaxrs.ext.provider.json.JSONProvider">
       <property name="namespaceMap" ref="jsonNamespaceMap"/> 
       <property name="schemaHandler" ref="schemaHolder"/>
 



Mime
View raw message