cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r810336 [3/4] - in /cxf/branches/2.1.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/ systests/ systests/aegis/ systests/aegis/src/test/java/org/apache/cxf/systest/aegis/ systests/jaxrs/ systests/jaxrs/src/test/java/org/apa...
Date Wed, 02 Sep 2009 02:21:50 GMT
Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java Wed Sep  2 02:21:37 2009
@@ -19,12 +19,10 @@
 
 package org.apache.cxf.systest.jaxrs;
 
-import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.InputStream;
 import java.net.URL;
 import java.net.URLConnection;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -41,24 +39,15 @@
 import org.apache.commons.httpclient.methods.FileRequestEntity;
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.cxf.Bus;
-import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
-import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.jaxrs.ext.form.Form;
-import org.apache.cxf.jaxrs.ext.xml.XMLSource;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
+import org.apache.cxf.jaxrs.utils.XMLSource;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.cxf.transport.http.HTTPConduit;
 
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -75,24 +64,15 @@
     @Test
     public void testGetAll() throws Exception {
         
-        InputStream in = getHttpInputStream("http://localhost:9092/test/services/rest2/myRestService");
+        InputStream in = getRestInputStream("http://localhost:9092/test/services/rest2/myRestService");
         assertEquals("0", getStringFromInputStream(in));
                 
     }
     
     @Test
-    public void testGetBook123ServletResponse() throws Exception {
-        
-        InputStream in = getHttpInputStream("http://localhost:9092/test/services/rest/bookstore/0");
-        InputStream expected = getClass().getResourceAsStream("resources/expected_get_book123.txt");
-        assertEquals(getStringFromInputStream(expected), getStringFromInputStream(in));
-                
-    }
-    
-    @Test
     public void testGetBook123() throws Exception {
         
-        InputStream in = getHttpInputStream("http://localhost:9092/test/services/rest/bookstore/123");
+        InputStream in = getRestInputStream("http://localhost:9092/test/services/rest/bookstore/123");
         
         InputStream expected = getClass().getResourceAsStream("resources/expected_get_book123.txt");
         assertEquals(getStringFromInputStream(expected), getStringFromInputStream(in));
@@ -105,14 +85,9 @@
         String baseAddress = "http://localhost:9092/test/services/rest";
         BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
                                                                   BookStoreJaxrsJaxws.class);
-        HTTPConduit conduit = (HTTPConduit)WebClient.getConfig(proxy).getConduit();
-        
         Book b = proxy.getBook(new Long("123"));
-        assertEquals(123, b.getId());
+        assertEquals(123L, b.getId());
         assertEquals("CXF in Action", b.getName());
-        
-        HTTPConduit conduit2 = (HTTPConduit)WebClient.getConfig(proxy).getConduit();
-        assertSame(conduit, conduit2);
     }
     
     @Test
@@ -121,7 +96,7 @@
         WebClient client = WebClient.create(baseAddress);
         client.path("/bookstore/123").accept(MediaType.APPLICATION_XML_TYPE);
         Book b = client.get(Book.class);
-        assertEquals(123, b.getId());
+        assertEquals(123L, b.getId());
         assertEquals("CXF in Action", b.getName());
     }
     
@@ -133,7 +108,7 @@
         XMLSource source = client.get(XMLSource.class);
         source.setBuffering(true);
         Book b = source.getNode("/Book", Book.class);
-        assertEquals(123, b.getId());
+        assertEquals(123L, b.getId());
         assertEquals("CXF in Action", b.getName());
         b = source.getNode("/Book", Book.class);
         assertEquals(123, b.getId());
@@ -156,7 +131,7 @@
         WebClient client = WebClient.create(baseAddress);
         client.path("/bookstore/123").accept(MediaType.APPLICATION_XML_TYPE);
         Book b = readBook((InputStream)client.get().getEntity());
-        assertEquals(123, b.getId());
+        assertEquals(123L, b.getId());
         assertEquals("CXF in Action", b.getName());
     }
     
@@ -176,19 +151,6 @@
         }
     }
     
-    @Test
-    public void testOtherInterceptorDrainingStream() throws Exception {
-
-        String baseAddress = "http://localhost:9092/test/services/rest";
-        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean(); 
-        bean.setAddress(baseAddress);
-        bean.getInInterceptors().add(new TestStreamDrainInterptor());
-        WebClient client = bean.createWebClient();
-        client.path("/bookstore/123").accept(MediaType.APPLICATION_XML_TYPE);
-        Book b = client.get(Book.class);
-        assertEquals(123, b.getId());
-        assertEquals("CXF in Action", b.getName());
-    }    
     
     @Test
     public void testGetBookSubresourceClient() throws Exception {
@@ -198,48 +160,11 @@
                                                                   BookStoreJaxrsJaxws.class);
         BookSubresource bs = proxy.getBookSubresource("125");
         Book b = bs.getTheBook();
-        assertEquals(125, b.getId());
-        assertEquals("CXF in Action", b.getName());
-    }
-    
-    @Test
-    public void testGetBookSubresourceClientNoProduces() throws Exception {
-        
-        String baseAddress = "http://localhost:9092/test/services/rest";
-        BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
-                                                                  BookStoreJaxrsJaxws.class);
-        BookSubresource bs = proxy.getBookSubresource("125");
-        Book b = bs.getTheBookNoProduces();
-        assertEquals(125, b.getId());
+        assertEquals(125L, b.getId());
         assertEquals("CXF in Action", b.getName());
     }
     
     @Test
-    public void testGetBookSubresourceParamExtensions() throws Exception {
-        
-        String baseAddress = "http://localhost:9092/test/services/rest";
-        BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
-                                                              BookStoreJaxrsJaxws.class);
-        BookSubresource bs = proxy.getBookSubresource("139");
-        Book bean = new Book("CXF Rocks", 139L);
-        Book b = bs.getTheBook4(bean, bean, bean);
-        assertEquals(139, b.getId());
-        assertEquals("CXF Rocks", b.getName());
-    }
-    
-    @Test
-    public void testGetBookSubresourceWebClientParamExtensions() throws Exception {
-        
-        WebClient client = WebClient.create("http://localhost:9092/test/services/rest");
-        client.type(MediaType.TEXT_PLAIN_TYPE).accept(MediaType.APPLICATION_XML_TYPE);
-        client.path("/bookstore/books/139/subresource4/139/CXF Rocks");
-        Book bean = new Book("CXF Rocks", 139L);
-        Book b = client.matrix("", bean).query("", bean).get(Book.class);
-        assertEquals(139, b.getId());
-        assertEquals("CXF Rocks", b.getName());
-    }
-    
-    @Test
     public void testGetBookSubresourceClient2() throws Exception {
         
         String baseAddress = "http://localhost:9092/test/services/rest";
@@ -278,8 +203,8 @@
         client.type(MediaType.TEXT_PLAIN_TYPE).accept(MediaType.APPLICATION_XML_TYPE);
         BookSubresource proxy = JAXRSClientFactory.fromClient(client, BookSubresource.class);
         
-        Book b = proxy.getTheBook2("CXF ", "in ", "Acti", "on ", "- 3", "7", "8");
-        assertEquals(378, b.getId());
+        Book b = proxy.getTheBook2("CXF ", "in ", "Action ", "- 3", "7", "8");
+        assertEquals(378L, b.getId());
         assertEquals("CXF in Action - 378", b.getName());
         
     }
@@ -287,13 +212,13 @@
     private void doTestSubresource(BookStoreJaxrsJaxws proxy) throws Exception {
         BookSubresource bs = proxy.getBookSubresource("378");
         
-        Book b = bs.getTheBook2("CXF ", "in ", "Acti", "on ", "- 3", "7", "8");
-        assertEquals(378, b.getId());
+        Book b = bs.getTheBook2("CXF ", "in ", "Action ", "- 3", "7", "8");
+        assertEquals(378L, b.getId());
         assertEquals("CXF in Action - 378", b.getName());
         
         WebClient.client(bs).reset().header("N4", "- 4");
-        b = bs.getTheBook2("CXF ", "in ", "Acti", "on ", null, "7", "8");
-        assertEquals(378, b.getId());
+        b = bs.getTheBook2("CXF ", "in ", "Action ", null, "7", "8");
+        assertEquals(378L, b.getId());
         assertEquals("CXF in Action - 478", b.getName());
         
         
@@ -307,11 +232,10 @@
         WebClient wc = WebClient.create(baseAddress);
         MultivaluedMap<String, Object> map = new MetadataMap<String, Object>();
         map.putSingle("id", "679");
-        map.putSingle("name", "CXF in Action - ");
-        map.putSingle("nameid", "679");
+        map.putSingle("name", "CXF in Action - 679");
         Book b = readBook((InputStream)wc.accept("application/xml")
                           .form((Map<String, List<Object>>)map).getEntity());
-        assertEquals(679, b.getId());
+        assertEquals(679L, b.getId());
         assertEquals("CXF in Action - 679", b.getName());
     }
     
@@ -321,11 +245,10 @@
         String baseAddress = "http://localhost:9092/test/services/rest/bookstore/books/679/subresource3";
         WebClient wc = WebClient.create(baseAddress);
         Form f = new Form();
-        f.set("id", "679").set("name", "CXF in Action - ")
-            .set("nameid", "679");
+        f.set("id", "679").set("name", "CXF in Action - 679");
         Book b = readBook((InputStream)wc.accept("application/xml")
                           .form(f).getEntity());
-        assertEquals(679, b.getId());
+        assertEquals(679L, b.getId());
         assertEquals("CXF in Action - 679", b.getName());
     }
     
@@ -336,8 +259,11 @@
         BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
                                                                   BookStoreJaxrsJaxws.class);
         BookSubresource bs = proxy.getBookSubresource("679");
-        Book b = bs.getTheBook3("679", "CXF in Action - ", new Integer(679));
-        assertEquals(679, b.getId());
+        MultivaluedMap<String, String> map = new MetadataMap<String, String>();
+        map.putSingle("id", "679");
+        map.putSingle("name", "CXF in Action - 679");
+        Book b = bs.getTheBook3(map);
+        assertEquals(679L, b.getId());
         assertEquals("CXF in Action - 679", b.getName());
     }
     
@@ -352,7 +278,7 @@
         b.setName("CXF in Action - 2");
         Book b2 = client.post(b, Book.class);
         assertNotSame(b, b2);
-        assertEquals(124, b2.getId());
+        assertEquals(124L, b2.getId());
         assertEquals("CXF in Action - 2", b2.getName());
     }
     
@@ -366,7 +292,7 @@
         b.setName("CXF in Action - 2");
         Book b2 = proxy.addBook(b);
         assertNotSame(b, b2);
-        assertEquals(124, b2.getId());
+        assertEquals(124L, b2.getId());
         assertEquals("CXF in Action - 2", b2.getName());
     }
     
@@ -406,93 +332,8 @@
             new BookSoapService(wsdlUrl,
                                 new QName("http://books.com", "BookService"));
         BookStoreJaxrsJaxws store = service.getBookPort();
-        Book book = store.getBook(new Long(123));
-        assertEquals("id is wrong", book.getId(), 123);
-        
-        String listings = 
-            getStringFromInputStream(getHttpInputStream("http://localhost:9092/test/services"));
-        assertNotNull(listings);
-    }
-    
-    @Test
-    public void testAddFeatureToClient() throws Exception {
-        String baseAddress = "http://localhost:9092/test/services/rest";
-        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
-        bean.setAddress(baseAddress);
-        bean.setResourceClass(BookStoreJaxrsJaxws.class);
-        TestFeature testFeature = new TestFeature();
-        List<AbstractFeature> features = new ArrayList<AbstractFeature>();
-        features.add((AbstractFeature)testFeature);
-        bean.setFeatures(features);
-        BookStoreJaxrsJaxws proxy = (BookStoreJaxrsJaxws)bean.create();
-        Book b = proxy.getBook(new Long("123"));
-        assertTrue("Out Interceptor not invoked", testFeature.handleMessageOnOutInterceptorCalled());
-        assertTrue("In Interceptor not invoked", testFeature.handleMessageOnInInterceptorCalled());    
-        assertEquals(123, b.getId());
-        assertEquals("CXF in Action", b.getName());
-    }
-    
-    @Test
-    public void testServerFaultInInterceptor() throws Exception {
-        //testing faults created by server handled correctly
-        serverFaultInInterceptorTest("321");
-        //999 causes error code of 404, 404 has a different code path so need to test too
-        serverFaultInInterceptorTest("999");
-        //322 causes a checked exception to be thrown so need to 
-        serverFaultInInterceptorTest("322");
-    }
-    
-    @Test
-    public void testClientFaultOutInterceptor() throws Exception {
-        //testing faults created by client out interceptor chain handled correctly 
-        String baseAddress = "http://localhost:9092/test/services/rest";
-        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
-        bean.setAddress(baseAddress);
-        bean.setResourceClass(BookStoreJaxrsJaxws.class);
-        final boolean addBadOutInterceptor = true;
-        TestFeature testFeature = new TestFeature(addBadOutInterceptor);
-        List<AbstractFeature> features = new ArrayList<AbstractFeature>();
-        features.add((AbstractFeature)testFeature);
-        bean.setFeatures(features);
-        BookStoreJaxrsJaxws proxy = (BookStoreJaxrsJaxws)bean.create();
-        try {
-            //321 is special case - causes error code of 525
-            proxy.getBook(new Long("123"));
-            fail("Method should have thrown an exception");
-        } catch (Exception e) {
-            assertTrue("Out Interceptor not invoked", testFeature.handleMessageOnOutInterceptorCalled());
-            assertTrue("In Interceptor not invoked", !testFeature.handleMessageOnInInterceptorCalled());
-            assertTrue("Wrong exception caught", "fault from bad interceptor".equals(e.getMessage()));
-            assertTrue("Client In Fault In Interceptor was invoked", 
-                    !testFeature.faultInInterceptorCalled());
-        }
-    }
-    
-    private void serverFaultInInterceptorTest(String param) {
-        String baseAddress = "http://localhost:9092/test/services/rest";
-        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
-        bean.setAddress(baseAddress);
-        bean.setResourceClass(BookStoreJaxrsJaxws.class);
-        TestFeature testFeature = new TestFeature();
-        List<AbstractFeature> features = new ArrayList<AbstractFeature>();
-        features.add((AbstractFeature)testFeature);
-        bean.setFeatures(features);
-        BookStoreJaxrsJaxws proxy = (BookStoreJaxrsJaxws)bean.create();
-        try {
-            //321 is special case - causes error code of 525
-            proxy.getBook(new Long(param));
-            fail("Method should have thrown an exception");
-        } catch (Exception e) {
-            assertTrue("Out Interceptor not invoked", testFeature.handleMessageOnOutInterceptorCalled());
-            if ("322".equals(param)) {
-                //In interecptors not called when checked exception thrown from server
-                assertTrue("In Interceptor not invoked", testFeature.handleMessageOnInInterceptorCalled());
-            } else {
-                assertTrue("In Interceptor not invoked", !testFeature.handleMessageOnInInterceptorCalled());
-            }
-            assertTrue("Client In Fault In Interceptor not invoked", 
-                    testFeature.faultInInterceptorCalled());
-        }
+        Book book = store.getBook(new Long(123L));
+        assertEquals("id is wrong", book.getId(), 123L);
     }
 
     private String getStringFromInputStream(InputStream in) throws Exception {        
@@ -503,11 +344,12 @@
         return bos.getOut().toString();        
     }
 
-    private InputStream getHttpInputStream(String endpointAddress) throws Exception {
+    private InputStream getRestInputStream(String endpointAddress) throws Exception {
         URL url = new URL(endpointAddress);
         
         URLConnection connect = url.openConnection();
         connect.addRequestProperty("Accept", "application/xml,text/plain");
+        connect.addRequestProperty("Content-Type", "*/*");
         return connect.getInputStream();
     }
     
@@ -532,144 +374,4 @@
         }
         
     }
-
-    @Ignore 
-    public class TestStreamDrainInterptor extends AbstractPhaseInterceptor<Message> {
-        public TestStreamDrainInterptor() {
-            super(Phase.RECEIVE);
-        }
-
-        public void handleMessage(Message message) throws Fault {
-            InputStream is = message.getContent(InputStream.class);
-            if (is == null) {
-                return;
-            }
-            byte[] payload;
-            try {
-                // input stream will be closed by readBytesFromStream()
-                payload = IOUtils.readBytesFromStream(is);
-                assertTrue("payload was null", payload != null);
-                assertTrue("payload was EMPTY", payload.length > 0);
-                message.setContent(InputStream.class, new ByteArrayInputStream(payload));
-            } catch (Exception e) {
-                String error = "Failed to read the stream properly due to " + e.getMessage();
-                assertFalse(error, e != null);
-            } 
-        }
-
-    }
-    
-    @Ignore
-    public class TestFeature extends AbstractFeature {
-        private TestOutInterceptor testOutInterceptor;
-        private TestInInterceptor testInInterceptor;
-        private TestFaultInInterceptor testFaultInInterceptor;
-        private boolean addBadOutInterceptor;
-        
-        public TestFeature() {
-        }
-        
-        public TestFeature(boolean addBadOutInterceptor) {
-            this.addBadOutInterceptor = addBadOutInterceptor;
-        }
-
-        @Override
-        protected void initializeProvider(InterceptorProvider provider, Bus bus) {
-            testOutInterceptor = new TestOutInterceptor(addBadOutInterceptor);
-            testInInterceptor = new TestInInterceptor();
-            testFaultInInterceptor = new TestFaultInInterceptor();
-            provider.getOutInterceptors().add(testOutInterceptor);
-            provider.getInInterceptors().add(testInInterceptor);
-            provider.getInFaultInterceptors().add(testFaultInInterceptor);
-
-            
-        }
-
-        protected boolean handleMessageOnOutInterceptorCalled() {
-            return testOutInterceptor.handleMessageCalled();
-        }
-        
-        protected boolean handleMessageOnInInterceptorCalled() {
-            return testInInterceptor.handleMessageCalled();
-        }
-        
-        protected boolean faultInInterceptorCalled() {
-            return testFaultInInterceptor.handleMessageCalled();
-        }
-    }
- 
-    @Ignore
-    public class TestInInterceptor extends AbstractPhaseInterceptor<Message> {
-        private boolean handleMessageCalled;
-        
-        public TestInInterceptor() {
-            this(Phase.PRE_STREAM);
-        }
-
-        public TestInInterceptor(String s) {
-            super(Phase.PRE_STREAM);
-            
-        } 
-
-        public void handleMessage(Message message) throws Fault {
-            handleMessageCalled = true;
-        }
-
-        protected boolean handleMessageCalled() {
-            return handleMessageCalled;
-        }
-
-    }
-    
-    @Ignore
-    public class TestOutInterceptor extends AbstractPhaseInterceptor<Message> {
-        private boolean handleMessageCalled;
-        private boolean isBadOutInterceptor;
-        
-        
-        public TestOutInterceptor(boolean isBadOutInterceptor) {
-            this(Phase.PRE_MARSHAL);
-            this.isBadOutInterceptor = isBadOutInterceptor;
-        }
-
-        public TestOutInterceptor(String s) {
-            super(Phase.PRE_MARSHAL);
-            
-        } 
-
-        public void handleMessage(Message message) throws Fault {
-            handleMessageCalled = true;
-            if (isBadOutInterceptor) {
-                throw new Fault(new Exception("fault from bad interceptor"));
-            }
-        }
-
-        protected boolean handleMessageCalled() {
-            return handleMessageCalled;
-        }
-
-    }
-    
-    @Ignore
-    public class TestFaultInInterceptor extends AbstractPhaseInterceptor<Message> {
-        private boolean handleMessageCalled;
-        public TestFaultInInterceptor() {
-            this(Phase.PRE_STREAM);
-        }
-
-        public TestFaultInInterceptor(String s) {
-            super(Phase.PRE_STREAM);
-            
-        } 
-
-        public void handleMessage(Message message) throws Fault {
-            handleMessageCalled = true;
-        }
-
-        protected boolean handleMessageCalled() {
-            return handleMessageCalled;
-        }
-
-    }
-    
 }

Propchange: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Sep  2 02:21:37 2009
@@ -0,0 +1,2 @@
+/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java:810203-810224,810236
+/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java:809663,809706

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java Wed Sep  2 02:21:37 2009
@@ -27,11 +27,10 @@
 
 import javax.activation.DataHandler;
 import javax.activation.DataSource;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.FormParam;
+import javax.ws.rs.ConsumeMime;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
+import javax.ws.rs.ProduceMime;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MultivaluedMap;
@@ -57,7 +56,7 @@
     
     @POST
     @Path("/books/stream")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromStream(StreamSource source) throws Exception {
         JAXBContext c = JAXBContext.newInstance(new Class[]{Book.class});
         Unmarshaller u = c.createUnmarshaller();
@@ -68,8 +67,8 @@
     
     @POST
     @Path("/books/form")
-    @Consumes("multipart/form-data")
-    @Produces("text/xml")
+    @ConsumeMime("multipart/form-data")
+    @ProduceMime("text/xml")
     public Response addBookFromForm(MultivaluedMap<String, String> data) throws Exception {
         Book b = new Book();
         b.setId(Long.valueOf(data.getFirst("id")));
@@ -79,8 +78,8 @@
     
     @POST
     @Path("/books/formbody")
-    @Consumes("multipart/form-data")
-    @Produces("text/xml")
+    @ConsumeMime("multipart/form-data")
+    @ProduceMime("text/xml")
     public Response addBookFromFormBody(MultipartBody body) throws Exception {
         MultivaluedMap<String, String> data = AttachmentUtils.populateFormMap(context);
         Book b = new Book();
@@ -91,50 +90,31 @@
     
     @POST
     @Path("/books/formbody2")
-    @Consumes("multipart/form-data")
-    @Produces("text/xml")
+    @ConsumeMime("multipart/form-data")
+    @ProduceMime("text/xml")
     public Response addBookFromFormBody2() throws Exception {
         return addBookFromFormBody(AttachmentUtils.getMultipartBody(context));
     }
     
     
     @POST
-    @Path("/books/formparam")
-    @Produces("text/xml")
-    public Response addBookFromFormParam(@FormParam("name") String title, 
-                                         @FormParam("id") Long id) throws Exception {
-        Book b = new Book();
-        b.setId(id);
-        b.setName(title);
-        return Response.ok(b).build();
-    }
-    
-    @POST
-    @Path("/books/formparambean")
-    @Produces("text/xml")
-    public Response addBookFromFormParam(@FormParam("") Book b) throws Exception {
-        return Response.ok(b).build();
-    }
-    
-    
-    @POST
     @Path("/books/istream")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromInputStream(InputStream is) throws Exception {
         return readBookFromInputStream(is);
     }
     
     @POST
     @Path("/books/dsource")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromDataSource(DataSource ds) throws Exception {
         return readBookFromInputStream(ds.getInputStream());
     }
     
     @POST
     @Path("/books/jaxb2")
-    @Consumes("multipart/related;type=\"text/xml\"")
-    @Produces("text/xml")
+    @ConsumeMime("multipart/related;type=\"text/xml\"")
+    @ProduceMime("text/xml")
     public Response addBookParts(@Multipart("rootPart") Book b1,
                                  @Multipart("book2") Book b2) 
         throws Exception {
@@ -150,7 +130,7 @@
     
     @POST
     @Path("/books/jaxbjson")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookJaxbJson(
         @Multipart(value = "rootPart", type = "text/xml") Book2 b1,
         @Multipart(value = "book2", type = "application/json") Book b2) 
@@ -165,7 +145,7 @@
     
     @POST
     @Path("/books/dsource2")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromDataSource2(@Multipart("rootPart") DataSource ds1,
                                            @Multipart("book2") DataSource ds2) 
         throws Exception {
@@ -184,7 +164,7 @@
     
     @POST
     @Path("/books/listattachments")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromListOfAttachments(List<Attachment> atts)  
         throws Exception {
         Response r1 = readBookFromInputStream(atts.get(0).getDataHandler().getInputStream());
@@ -202,7 +182,7 @@
     
     @POST
     @Path("/books/body")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromListOfAttachments(MultipartBody body)  
         throws Exception {
         return addBookFromListOfAttachments(body.getAllAttachments());
@@ -210,7 +190,7 @@
     
     @POST
     @Path("/books/lististreams")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromListOfStreams(List<InputStream> atts)  
         throws Exception {
         Response r1 = readBookFromInputStream(atts.get(0));
@@ -228,21 +208,21 @@
     
     @POST
     @Path("/books/dhandler")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromDataHandler(DataHandler dh) throws Exception {
         return readBookFromInputStream(dh.getInputStream());
     }
     
     @POST
     @Path("/books/attachment")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromAttachment(Attachment a) throws Exception {
         return readBookFromInputStream(a.getDataHandler().getInputStream());
     }
     
     @POST
     @Path("/books/mchandlers")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromMessageContext() throws Exception {
         Map<String, Attachment> handlers = AttachmentUtils.getAttachmentsMap(context);
         for (Map.Entry<String, Attachment> entry : handlers.entrySet()) {
@@ -255,7 +235,7 @@
     
     @POST
     @Path("/books/attachments")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookFromAttachments() throws Exception {
         Collection<Attachment> handlers = AttachmentUtils.getChildAttachments(context);
         for (Attachment a : handlers) {
@@ -268,7 +248,7 @@
     
     @POST
     @Path("/books/jaxb")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBook(Book b) throws Exception {
         b.setId(124);
         return Response.ok(b).build();
@@ -276,15 +256,15 @@
     
     @POST
     @Path("/books/mismatch1")
-    @Consumes("multipart/related;type=\"bar/foo\"")
-    @Produces("text/xml")
+    @ConsumeMime("multipart/related;type=\"bar/foo\"")
+    @ProduceMime("text/xml")
     public Response addBookMismatched(Book b) {
         throw new WebApplicationException();
     }
     
     @POST
     @Path("/books/mismatch2")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response addBookMismatched2(@Multipart(value = "rootPart", type = "f/b") Book b) {
         throw new WebApplicationException();
     }

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/PetStore.java Wed Sep  2 02:21:37 2009
@@ -19,13 +19,12 @@
 
 package org.apache.cxf.systest.jaxrs;
 
-import javax.ws.rs.Consumes;
+import javax.ws.rs.ConsumeMime;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ProduceMime;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 
@@ -35,23 +34,27 @@
     public static final String CLOSED = "The Pet Store is closed";
 
     public PetStore() {
+        System.out.println("Petstore constructed");
     }
 
     @GET
     @Path("/pets/{petId}/")
-    @Produces("text/xml")
+    @ProduceMime("text/xml")
     public Response getStatus(@PathParam("petId")
                               String petId) throws Exception {
+        System.out.println("----invoking getStatus on the petStore for id: " + petId);
 
         return Response.ok(CLOSED).build();
     }
 
     @POST
     @Path("/pets/")
-    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
-    @Produces("text/xml")
+    @ConsumeMime("application/x-www-form-urlencoded")
+    @ProduceMime("text/xml")
     public Response updateStatus(MultivaluedMap<String, String> params) throws Exception {
-        System.out.println(params);
+        System.out.println("----invoking updateStatus on the petStore with stauts post param value of: "
+                           + params.getFirst("status"));
+
         return Response.ok(params.getFirst("status")).build();
     }
 }

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

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

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

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

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java Wed Sep  2 02:21:37 2009
@@ -34,8 +34,6 @@
 
     private static final String CLIENT_CONFIG_FILE =
         "org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml";
-    private static final String CLIENT_CONFIG_FILE2 =
-        "org/apache/cxf/systest/jaxrs/security/jaxrs-https-url.xml";
         
     @BeforeClass
     public static void startServers() throws Exception {
@@ -57,20 +55,6 @@
     }
     
     @Test
-    public void testGetBook123ProxyWithURLConduitId() throws Exception {
-        
-        BookStore bs = JAXRSClientFactory.create("https://localhost:9095", BookStore.class, 
-                                                 CLIENT_CONFIG_FILE2);
-        // just to verify the interface call goes through CGLIB proxy too
-        assertEquals("https://localhost:9095", WebClient.client(bs).getBaseURI().toString());
-        Book b = bs.getSecureBook("123");
-        assertEquals(b.getId(), 123);
-        b = bs.getSecureBook("123");
-        assertEquals(b.getId(), 123);
-    }
-    
-    
-    @Test
     public void testGetBook123ProxyToWebClient() throws Exception {
         
         BookStore bs = JAXRSClientFactory.create("https://localhost:9095", BookStore.class, 
@@ -113,16 +97,4 @@
         
     }
     
-    @Test
-    public void testGetBook123WebClientWithURLConduitId() throws Exception {
-        
-        WebClient client = WebClient.create("https://localhost:9095", CLIENT_CONFIG_FILE2);
-        assertEquals("https://localhost:9095", client.getBaseURI().toString());
-        
-        client.path("/bookstore/securebooks/123").accept(MediaType.APPLICATION_XML_TYPE);
-        Book b = client.get(Book.class);
-        assertEquals(123, b.getId());
-        
-    }
-    
 }

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java Wed Sep  2 02:21:37 2009
@@ -19,16 +19,6 @@
 
 package org.apache.cxf.systest.jaxrs.security;
 
-import java.io.InputStream;
-
-import javax.ws.rs.core.Response;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Unmarshaller;
-
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.jaxrs.ext.form.Form;
-import org.apache.cxf.systest.jaxrs.Book;
-
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -48,19 +38,6 @@
     }
     
     @Test
-    public void testBookFromForm() throws Exception {
-        
-        WebClient wc = WebClient.create("http://localhost:9080/bookstorestorage/bookforms", 
-                                        "foo", "bar", null);
-        
-        Response r = wc.form(new Form().set("name", "CXF Rocks").set("id", "123"));
-        
-        Book b = readBook((InputStream)r.getEntity());
-        assertEquals("CXF Rocks", b.getName());
-        assertEquals(123L, b.getId());
-    }
-    
-    @Test
     public void testGetBookUserAdmin() throws Exception {
         String endpointAddress =
             "http://localhost:9080/bookstorestorage/thosebooks/123"; 
@@ -85,19 +62,5 @@
         getBook(endpointAddress, "bob", "bobspassword", 403);
     }
     
-    private Book readBook(InputStream is) throws Exception {
-        JAXBContext c = JAXBContext.newInstance(new Class[]{Book.class});
-        Unmarshaller u = c.createUnmarshaller();
-        return (Book)u.unmarshal(is);
-    }
-
-    @Test
-    public void testGetBookSubresourceAdmin() throws Exception {
-        String endpointAddress =
-            "http://localhost:9080/bookstorestorage/securebook/self"; 
-        getBook(endpointAddress, "foo", "bar", 200); 
-        getBook(endpointAddress, "bob", "bobspassword", 403);
-    }
-    
-     
+      
 }

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java Wed Sep  2 02:21:37 2009
@@ -58,7 +58,6 @@
             "http://localhost:9080/bookstorestorage/thosebooks/123/123"; 
         getBook(endpointAddress, "foo", "bar", 200);
         getBook(endpointAddress, "bob", "bobspassword", 200);
-        getBook(endpointAddress, "baddy", "baddyspassword", 403);
     }
     
     @Test
@@ -120,12 +119,4 @@
         assertEquals(expectedStatus, r.getStatus());
             
     }
-    
-    @Test
-    public void testGetBookSubresourceAdmin() throws Exception {
-        String endpointAddress =
-            "http://localhost:9080/bookstorestorage/securebook/self"; 
-        getBook(endpointAddress, "foo", "bar", 200); 
-        getBook(endpointAddress, "bob", "bobspassword", 403);
-    }
 }

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java Wed Sep  2 02:21:37 2009
@@ -22,7 +22,7 @@
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
+import javax.ws.rs.ProduceMime;
 
 import org.apache.cxf.systest.jaxrs.Book;
 import org.apache.cxf.systest.jaxrs.BookNotFoundFault;
@@ -32,20 +32,20 @@
 
     @GET
     @Path("/thosebooks/{bookId}/")
-    @Produces("application/xml")
+    @ProduceMime("application/xml")
     @Secured({"ROLE_USER", "ROLE_ADMIN" })
     Book getThatBook(@PathParam("bookId") Long id) throws BookNotFoundFault;
     
     
     @GET
     @Path("/thosebooks/{bookId}/{id}")
-    @Produces("application/xml")
+    @ProduceMime("application/xml")
     @Secured("ROLE_USER")
     Book getThatBook(@PathParam("bookId") Long id, @PathParam("id") String s) throws BookNotFoundFault;
     
     @GET
     @Path("/thosebooks")
-    @Produces("application/xml")
+    @ProduceMime("application/xml")
     @Secured("ROLE_ADMIN")
     Book getThatBook() throws BookNotFoundFault;
     
@@ -53,10 +53,7 @@
     SecureBookInterface getBookSubResource() throws BookNotFoundFault;
     
     @GET
-    @Produces("application/xml")
+    @ProduceMime("application/xml")
     @Secured("ROLE_ADMIN")
     Book getDefaultBook() throws BookNotFoundFault;
-    
-    @Path("/securebook")
-    SecureBook getSecureBook() throws BookNotFoundFault;
 }

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java Wed Sep  2 02:21:37 2009
@@ -80,9 +80,4 @@
     public Book getDefaultBook() throws BookNotFoundFault {
         return books.get(123L);
     }
-    
-    @Path("/securebook")
-    public SecureBook getSecureBook() throws BookNotFoundFault {
-        return new SecureBook("CXF in Action", 123L);
-    }
 }

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java Wed Sep  2 02:21:37 2009
@@ -22,12 +22,10 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.ws.rs.FormParam;
 import javax.ws.rs.GET;
-import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
+import javax.ws.rs.ProduceMime;
 
 import org.apache.cxf.systest.jaxrs.Book;
 import org.apache.cxf.systest.jaxrs.BookNotFoundFault;
@@ -44,19 +42,9 @@
         books.put(book.getId(), book);
     }
     
-    @POST
-    @Path("/bookforms")
-    @Secured({"ROLE_USER", "ROLE_ADMIN" })
-    public Book getBookFromFormParams(@FormParam("name") String name, @FormParam("id") long id) {
-        if (name == null || id == 0) {
-            throw new RuntimeException("FormParams are not set");
-        }
-        return new Book(name, id);
-    }
-    
     @GET
     @Path("/thosebooks/{bookId}/{id}")
-    @Produces("application/xml")
+    @ProduceMime("application/xml")
     @Secured({"ROLE_USER", "ROLE_ADMIN" })
     public Book getThatBook(@PathParam("bookId") Long id, @PathParam("id") String s) {
         if (s == null) {
@@ -67,7 +55,7 @@
     
     @GET
     @Path("/thosebooks/{bookId}/")
-    @Produces("application/xml")
+    @ProduceMime("application/xml")
     @Secured("ROLE_USER")
     public Book getThatBook(@PathParam("bookId") Long id) {
         return books.get(id);
@@ -75,14 +63,9 @@
 
     @GET
     @Path("/thosebooks")
-    @Produces("application/xml")
+    @ProduceMime("application/xml")
     @Secured("ROLE_ADMIN")
     public Book getThatBook() throws BookNotFoundFault {
         return books.get(123L);
     }
-    
-    @Path("/securebook")
-    public SecureBook getSecureBook() throws BookNotFoundFault {
-        return new SecureBook("CXF in Action", 123L);
-    }
 }

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml Wed Sep  2 02:21:37 2009
@@ -45,26 +45,9 @@
     </httpj:engine-factory>
 
     <!-- -->
-    <!-- HTTP/S configuration for proxy clients -->
+    <!-- HTTP/S configuration for clients -->
     <!-- -->
-    <http:conduit name="{http://jaxrs.systest.cxf.apache.org/}BookStore.http-conduit">
-        <http:client ConnectionTimeout="3000000" ReceiveTimeout="3000000"/>
-        <http:tlsClientParameters disableCNCheck="true">
-            <sec:keyManagers keyPassword="password">
-	           <sec:keyStore type="JKS" password="password" 
-	                file="src/test/java/org/apache/cxf/systest/http/resources/Morpit.jks"/>
-	           </sec:keyManagers>
-	        <sec:trustManagers>
-	           <sec:keyStore type="JKS" password="password"
-	               file="src/test/java/org/apache/cxf/systest/http/resources/Truststore.jks"/>
-	        </sec:trustManagers>
-        </http:tlsClientParameters>
-    </http:conduit>
-    
-    <!-- -->
-    <!-- HTTP/S configuration for web clients -->
-    <!-- -->
-    <http:conduit name="{https://localhost:9095}WebClient.http-conduit">
+    <http:conduit name="*.http-conduit">
         <http:client ConnectionTimeout="3000000" ReceiveTimeout="3000000"/>
         <http:tlsClientParameters disableCNCheck="true">
             <sec:keyManagers keyPassword="password">
@@ -78,4 +61,4 @@
         </http:tlsClientParameters>
     </http:conduit>
 
-</beans>
+</beans>
\ No newline at end of file

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml Wed Sep  2 02:21:37 2009
@@ -28,21 +28,18 @@
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:util="http://www.springframework.org/schema/util"
   xmlns:jaxrs="http://cxf.apache.org/jaxrs"
-  xmlns:cxf="http://cxf.apache.org/core"
   xsi:schemaLocation="
 http://www.springframework.org/schema/beans 
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/util 
 http://www.springframework.org/schema/util/spring-util-2.0.xsd
 http://cxf.apache.org/jaxrs
-http://cxf.apache.org/schemas/jaxrs.xsd
-http://cxf.apache.org/core
-http://cxf.apache.org/schemas/core.xsd">
+http://cxf.apache.org/schemas/jaxrs.xsd">
 
   <import resource="classpath:META-INF/cxf/cxf.xml" />
   <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
-
+  
   <bean class="org.apache.cxf.systest.jaxrs.BookStoreSpring" id="serviceBean"/>
   
   <jaxrs:server id="bookservice"
@@ -54,6 +51,7 @@
        <ref bean="jaxbProvider"/>
        <ref bean="jsonProvider"/>
     </jaxrs:providers>
+    
   </jaxrs:server>
 
   <jaxrs:server id="bookservice2"
@@ -77,81 +75,9 @@
        <ref bean="jaxbProvider"/>
        <ref bean="jsonProvider"/>
     </jaxrs:providers> 
-    <jaxrs:features>
-       <cxf:logging/>
-    </jaxrs:features>    
-  </jaxrs:server>
-  
-  <jaxrs:server id="bookservice4"
-		        address="/thebooks4/bookstore">
-    <jaxrs:serviceBeans>
-      <ref bean="serviceBean" />
-    </jaxrs:serviceBeans>		  
-    
-    <jaxrs:providers>
-       <bean class="org.apache.cxf.jaxrs.provider.AegisElementProvider"/>
-    </jaxrs:providers> 
     
   </jaxrs:server> 
 
-  <jaxrs:server id="bookservice5"
-		        address="/thebooks5/bookstore">
-    <jaxrs:serviceBeans>
-      <ref bean="serviceBean" />
-    </jaxrs:serviceBeans>		  
-
-    <jaxrs:providers>
-       <ref bean="xsltProvider"/>
-       <bean class="org.apache.cxf.systest.jaxrs.XmlStreamReaderProvider"/>
-       <bean class="org.apache.cxf.systest.jaxrs.XmlStreamWriterProvider"/>
-    </jaxrs:providers> 
-    
-    <jaxrs:inInterceptors>
-       <bean class="org.apache.cxf.systest.jaxrs.XMLStreamReaderInInterceptor"/>
-    </jaxrs:inInterceptors>
-    
-    <jaxrs:outInterceptors>
-       <bean class="org.apache.cxf.systest.jaxrs.XMLStreamWriterOutInterceptor"/>
-    </jaxrs:outInterceptors>
-    
-  </jaxrs:server> 
-  
-  <util:map id="outTemplates">
-      <entry key="application/xhtml+xml" value="classpath:/WEB-INF/templates/template.xsl"/>
-      <entry key="application/xml" value="classpath:/org/apache/cxf/systest/jaxrs/resources/template2.xsl"/>
-  </util:map>
-  
-  <util:list id="outClassNames">
-      <value>org.apache.cxf.systest.jaxrs.Book</value>
-  </util:list> 
-  
-  <bean id="xsltProvider" class="org.apache.cxf.jaxrs.provider.XSLTJaxbProvider">    
-      <property name="resolver" ref="uriResolver"/>
-      <property name="outMediaTemplates" ref="outTemplates"/>
-      <property name="outClassNames" ref="outClassNames"/>
-  </bean>
-
-  <bean id="uriResolver" class="org.apache.cxf.systest.jaxrs.URIResolverImpl"/>     
-  
-  <jaxrs:server id="bookservice6" address="/thebooks6" 
-     modelRef="classpath:/WEB-INF/model/resources.xml"/>
-
-  <jaxrs:server id="bookservice7" address="/thebooks7">
-    <jaxrs:model>
-      <jaxrs:resource name="org.apache.cxf.systest.jaxrs.BookStoreNoAnnotations" path="bookstore">
-        <jaxrs:operation name="getBook" verb="GET" path="/books/{id}">
-           <jaxrs:param name="id" type="PATH"/>
-        </jaxrs:operation>
-        <jaxrs:operation name="getBookChapter" path="/books/{id}/chapter">
-           <jaxrs:param name="id" type="PATH"/>
-        </jaxrs:operation> 
-      </jaxrs:resource>
-      <jaxrs:resource name="org.apache.cxf.systest.jaxrs.ChapterNoAnnotations">
-        <jaxrs:operation name="getItself" verb="GET"/>
-      </jaxrs:resource>
-    </jaxrs:model>
-  </jaxrs:server>  
-
   <bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
       <property name="schemaHandler" ref="schemaHolder"/>
   </bean>
@@ -161,7 +87,7 @@
   </bean>
   
   <util:list id="theSchemas">
-    <value>classpath:/WEB-INF/schemas/bookid.xsd</value>
+    <value>classpath:/org/apache/cxf/systest/jaxrs/resources/bookid.xsd</value>
     <value>classpath:/org/apache/cxf/systest/jaxrs/resources/book.xsd</value>
   </util:list>
   

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml Wed Sep  2 02:21:37 2009
@@ -45,41 +45,19 @@
     <jaxrs:serviceBeans>
       <ref bean="bookstore"/>
       <ref bean="bookstoreInterface"/>
-    </jaxrs:serviceBeans>
-    <jaxrs:providers>
-      <ref bean="exceptionMapper"/>
-    </jaxrs:providers>		   
-  </jaxrs:server>
-  <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.BookStore"/>
-  <bean id="bookstoreInterface" class="org.apache.cxf.systest.jaxrs.BookStoreWithInterface"/>
-  <bean id="exceptionMapper" class="org.apache.cxf.systest.jaxrs.BookExceptionMapper">
-      <property name="toHandle" value="true"/>
-  </bean>   
-  <jaxrs:server id="bookservice2" address="/2"
-    modelRef="classpath:/org/apache/cxf/systest/jaxrs/resources/resources.xml">
-    <jaxrs:serviceBeans>
-      <ref bean="bookstore2"/>
-    </jaxrs:serviceBeans>		   
-  </jaxrs:server>
-  <bean id="bookstore2" class="org.apache.cxf.systest.jaxrs.BookStoreNoAnnotations"/>
-  
-  
-  <jaxrs:server id="bookservice3" address="/3"
-    modelRef="classpath:/org/apache/cxf/systest/jaxrs/resources/resources2.xml">
-    <jaxrs:serviceBeans>
-      <ref bean="bookstore3"/>
     </jaxrs:serviceBeans>		   
   </jaxrs:server>
-  <bean id="bookstore3" class="org.apache.cxf.systest.jaxrs.BookStoreNoAnnotationsImpl"/>
+  <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore"/>
+  <bean id="bookstoreInterface" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStoreWithInterface"/>
   
   <aop:config>
 		<aop:aspect id="loggingAspect" ref="simpleLogger">
 			<aop:before
 			      method="logBefore"
-			      pointcut="execution(* org.apache.cxf.systest.jaxrs.Book*.*(..))"/>
+			      pointcut="execution(* org.apache.cxf.systest.jaxrs.BookStore*.*(..))"/>
 			<aop:after-returning
 			      method="logAfter"
-			      pointcut="execution(* org.apache.cxf.systest.jaxrs.Book*.*(..))"/>
+			      pointcut="execution(* org.apache.cxf.systest.jaxrs.BookStore*.*(..))"/>
 		</aop:aspect>
 	</aop:config>
 

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security/WEB-INF/beans.xml?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security/WEB-INF/beans.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security/WEB-INF/beans.xml Wed Sep  2 02:21:37 2009
@@ -51,19 +51,12 @@
     <jaxrs:providers>
         <bean class="org.apache.cxf.systest.jaxrs.security.SecurityExceptionMapper"/>
     </jaxrs:providers>		   
-    <jaxrs:invoker>
-        <bean class="org.apache.cxf.systest.jaxrs.CustomJAXRSInvoker"/> 
-    </jaxrs:invoker>
-    
   </jaxrs:server>
 
   <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStore">
      <property name="bookStore" ref="bookstore2"/>
-     <lookup-method name="getSecureBook" bean="subResource" />
   </bean>
   
-  <bean id="subResource" class="org.apache.cxf.systest.jaxrs.security.SecureBook"/>  
-  
   <bean id="bookstore2" class="org.apache.cxf.systest.jaxrs.security.SecureBookStore"/>
 
   <security:global-method-security secured-annotations="enabled"/>
@@ -75,7 +68,6 @@
   <security:authentication-provider>
     <security:user-service>
       <security:user name="bob" password="bobspassword" authorities="ROLE_USER" />
-      <security:user name="baddy" password="baddyspassword" authorities="ROLE_USER" />
       <security:user name="foo" password="bar" authorities="ROLE_USER, ROLE_ADMIN" />
       <security:user name="baz" password="baz" authorities="ROLE_BAZ" />
     </security:user-service>

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml Wed Sep  2 02:21:37 2009
@@ -53,12 +53,7 @@
     </jaxrs:providers>
   </jaxrs:server>
 
-  <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStoreNoInterface">
-      <lookup-method name="getSecureBook" bean="subResource" />
-  </bean>
-  
-  <bean id="subResource" class="org.apache.cxf.systest.jaxrs.security.SecureBook"/>
-  
+  <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStoreNoInterface"/>
   <aop:config proxy-target-class="true"/>
   
   <security:global-method-security secured-annotations="enabled"/>

Modified: cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring_providers/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring_providers/WEB-INF/beans.xml?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring_providers/WEB-INF/beans.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring_providers/WEB-INF/beans.xml Wed Sep  2 02:21:37 2009
@@ -35,7 +35,6 @@
         <jaxrs:providers>
             <bean class="org.apache.cxf.systest.jaxrs.BadgerFishProvider"/>
             <ref bean="exceptionMapper"/>
-            <ref bean="exceptionMapper2"/>
         </jaxrs:providers>
     </jaxrs:server>
     <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore"/>
@@ -43,5 +42,4 @@
     <bean id="exceptionMapper" class="org.apache.cxf.systest.jaxrs.BookExceptionMapper">
         <property name="toHandle" value="true"/>
     </bean>   
-    <bean id="exceptionMapper2" class="org.apache.cxf.systest.jaxrs.RuntimeExceptionMapper"/>
 </beans>

Modified: cxf/branches/2.1.x-fixes/systests/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/pom.xml?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/pom.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/pom.xml Wed Sep  2 02:21:37 2009
@@ -34,5 +34,6 @@
         <module>uncategorized</module> 
         <module>aegis</module>
         <module>jaxrs</module>
+        <module>ws-specs</module>
     </modules>
 </project>

Modified: cxf/branches/2.1.x-fixes/systests/uncategorized/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/uncategorized/pom.xml?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/uncategorized/pom.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/uncategorized/pom.xml Wed Sep  2 02:21:37 2009
@@ -21,19 +21,16 @@
     <parent>
         <artifactId>cxf-parent</artifactId>
         <groupId>org.apache.cxf</groupId>
-        <version>2.3.0-SNAPSHOT</version>
+        <version>2.1.7-SNAPSHOT</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.cxf</groupId>
     <artifactId>cxf-systests-uncategorized</artifactId>
     <name>Apache CXF Uncategorized System Tests</name>
-    <version>2.3.0-SNAPSHOT</version>
+    <version>2.1.7-SNAPSHOT</version>
     <url>http://cxf.apache.org</url>
-    <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/cxf/trunk/systests/uncategorized</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cxf/trunk/systests/uncategorized</developerConnection>
-    </scm>
+
     <build>
         <plugins>
             <plugin>
@@ -138,51 +135,6 @@
                             <goal>wsdl2java</goal>
                         </goals>
                     </execution>
-                    <execution>
-                        <id>generate-wssec10-test-sources</id>
-                        <phase>generate-test-sources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>${basedir}/src/test/resources/wsdl_systest/wssec10/WsSecurity10.wsdl</wsdl>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>generate-wssec11-test-sources</id>
-                        <phase>generate-test-sources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>${basedir}/src/test/resources/wsdl_systest/wssec11/WsSecurity11.wsdl</wsdl>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>generate-wssc-test-sources</id>
-                        <phase>generate-test-sources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>${basedir}/src/test/resources/wsdl_systest/wssc/WSSecureConversation.wsdl</wsdl>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
                 </executions>
             </plugin>
             <plugin>
@@ -509,13 +461,6 @@
         
 
         <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-databinding-sdo</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-acl</artifactId>
             <version>2.0.4</version>

Modified: cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java (original)
+++ cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java Wed Sep  2 02:21:37 2009
@@ -65,7 +65,7 @@
     @BeforeClass
     public static void startServers() throws Exception {
         // requires ws-a support to propagate reference parameters
-        createStaticBus("org/apache/cxf/systest/ws/addressing/cxf.xml");
+        createStaticBus("org/apache/cxf/systest/factory_pattern/cxf_multiplex.xml");
         Map<String, String> props = new HashMap<String, String>();    
         if (System.getProperty("activemq.store.dir") != null) {
             props.put("activemq.store.dir", System.getProperty("activemq.store.dir"));
@@ -120,7 +120,8 @@
             num.isEven().isEven();
             fail("there should be a fault on val 999");
         } catch (Exception expected) {
-            assertTrue("match on exception message", expected.getMessage().indexOf("999") != -1);
+            assertTrue("match on exception message " + expected.getMessage(),
+                       expected.getMessage().indexOf("999") != -1);
         }
         
         ref = factory.create("37");

Modified: cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java (original)
+++ cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java Wed Sep  2 02:21:37 2009
@@ -49,7 +49,6 @@
 import org.apache.cxf.anonymous_complex_type.SplitName;
 import org.apache.cxf.anonymous_complex_type.SplitNameResponse.Names;
 import org.apache.cxf.binding.soap.Soap11;
-import org.apache.cxf.common.WSDLConstants;
 import org.apache.cxf.common.util.ASMHelper;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.helpers.XMLUtils;
@@ -78,91 +77,6 @@
     }
 
     @Test
-    public void testWSDLDocs() throws Exception {
-        Map<String, String> ns = new HashMap<String, String>();
-        ns.put("wsdl", WSDLConstants.NS_WSDL11);
-        XPathUtils xpu = new XPathUtils(ns);
-        Document wsdl = XMLUtils.parse(this.getHttpConnection(ServerMisc.DOCLIT_CODEFIRST_URL + "?wsdl")
-                                          .getInputStream());
-        //XMLUtils.printDOM(wsdl.getDocumentElement());
-        assertEquals("DocLitWrappedCodeFirstService impl",
-                     xpu.getValue("/wsdl:definitions/wsdl:service/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("DocLitWrappedCodeFirstService interface",
-                     xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("DocLitWrappedCodeFirstService top level doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("DocLitWrappedCodeFirstService binding doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("DocLitWrappedCodeFirstService service/port doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:service/wsdl:port/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("multiInOut doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operation[@name='multiInOut']"
-                                  + "/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("multiInOut Input doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operation[@name='multiInOut']"
-                                  + "/wsdl:input/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("multiInOut Output doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operation[@name='multiInOut']"
-                                  + "/wsdl:output/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("multiInOut InputMessage doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:message[@name='multiInOut']"
-                                  + "/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("multiInOut OutputMessage doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:message[@name='multiInOutResponse']"
-                                  + "/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("multiInOut binding doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operation[@name='multiInOut']"
-                                  + "/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("multiInOut binding Input doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operation[@name='multiInOut']"
-                                  + "/wsdl:input/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("multiInOut binding Output doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operation[@name='multiInOut']"
-                                  + "/wsdl:output/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("fault binding doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operation[@name='throwException']"
-                                  + "/wsdl:fault/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("fault porttype doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operation[@name='throwException']"
-                                  + "/wsdl:fault/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-        assertEquals("fault message doc",
-                     xpu.getValue("/wsdl:definitions/wsdl:message[@name='CustomException']"
-                                  + "/wsdl:documentation",
-                                  wsdl.getDocumentElement(),
-                                  XPathConstants.STRING));
-    }
-    
-    @Test
     public void testDocLitBare() throws Exception {
         QName portName = new QName("http://cxf.apache.org/systest/jaxws/DocLitBareCodeFirstService", 
             "DocLitBareCodeFirstServicePort");

Modified: cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java (original)
+++ cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java Wed Sep  2 02:21:37 2009
@@ -38,10 +38,6 @@
 import javax.xml.ws.RequestWrapper;
 import javax.xml.ws.ResponseWrapper;
 
-import org.apache.cxf.annotations.FastInfoset;
-import org.apache.cxf.annotations.GZIP;
-import org.apache.cxf.annotations.WSDLDocumentation;
-import org.apache.cxf.annotations.WSDLDocumentationCollection;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.systest.jaxws.types.Bar;
 
@@ -49,19 +45,6 @@
             targetNamespace = "http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService")
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
              use = SOAPBinding.Use.LITERAL)
-@WSDLDocumentationCollection(
-    {
-        @WSDLDocumentation("DocLitWrappedCodeFirstService interface"),
-        @WSDLDocumentation(value = "DocLitWrappedCodeFirstService top level doc", 
-                           placement = WSDLDocumentation.Placement.TOP),   
-        @WSDLDocumentation(value = "DocLitWrappedCodeFirstService binding doc", 
-                           placement = WSDLDocumentation.Placement.BINDING),   
-        @WSDLDocumentation(value = "DocLitWrappedCodeFirstService service/port doc", 
-                           placement = WSDLDocumentation.Placement.SERVICE_PORT)   
-    }
-)
-@GZIP
-@FastInfoset
 public interface DocLitWrappedCodeFirstService {
 
     @Oneway
@@ -92,25 +75,6 @@
     String multiListInput(List<String> inputs1, List<String> inputs2, String x, int y);
     
     @WebMethod
-    @WSDLDocumentationCollection(
-        {
-            @WSDLDocumentation("multiInOut doc"),
-            @WSDLDocumentation(value = "multiInOut Input doc", 
-                               placement = WSDLDocumentation.Placement.PORT_TYPE_OPERATION_INPUT),   
-            @WSDLDocumentation(value = "multiInOut Output doc", 
-                               placement = WSDLDocumentation.Placement.PORT_TYPE_OPERATION_OUTPUT),   
-            @WSDLDocumentation(value = "multiInOut InputMessage doc", 
-                               placement = WSDLDocumentation.Placement.INPUT_MESSAGE),   
-            @WSDLDocumentation(value = "multiInOut OutputMessage doc", 
-                               placement = WSDLDocumentation.Placement.OUTPUT_MESSAGE),   
-            @WSDLDocumentation(value = "multiInOut binding doc",
-                               placement = WSDLDocumentation.Placement.BINDING_OPERATION),
-            @WSDLDocumentation(value = "multiInOut binding Input doc", 
-                               placement = WSDLDocumentation.Placement.BINDING_OPERATION_INPUT),   
-            @WSDLDocumentation(value = "multiInOut binding Output doc", 
-                               placement = WSDLDocumentation.Placement.BINDING_OPERATION_OUTPUT)   
-        }
-    )
     String multiInOut(@WebParam(mode = WebParam.Mode.OUT)
                       Holder<String> a,
                       @WebParam(mode = WebParam.Mode.INOUT)
@@ -142,18 +106,6 @@
                    @WebParam(mode = WebParam.Mode.OUT) Holder<String> out2);
     
     @WebMethod
-    @WSDLDocumentationCollection({
-        @WSDLDocumentation(value = "fault message doc",
-                           placement = WSDLDocumentation.Placement.FAULT_MESSAGE,
-                           faultClass = CustomException.class),   
-        @WSDLDocumentation(value = "fault binding doc",
-                           placement = WSDLDocumentation.Placement.BINDING_OPERATION_FAULT,
-                           faultClass = CustomException.class),   
-        @WSDLDocumentation(value = "fault porttype doc",
-                           placement = WSDLDocumentation.Placement.PORT_TYPE_OPERATION_FAULT,
-                           faultClass = CustomException.class)   
-        }
-    )
     int throwException(int i) 
         throws ServiceTestFault,
         CustomException,

Modified: cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java?rev=810336&r1=810335&r2=810336&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java (original)
+++ cxf/branches/2.1.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java Wed Sep  2 02:21:37 2009
@@ -29,9 +29,6 @@
 import javax.xml.ws.Holder;
 import javax.xml.ws.WebServiceContext;
 
-import org.apache.cxf.annotations.FastInfoset;
-import org.apache.cxf.annotations.GZIP;
-import org.apache.cxf.annotations.WSDLDocumentation;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService.Foo;
 import org.apache.cxf.systest.jaxws.types.Bar;
@@ -41,9 +38,6 @@
             serviceName = "DocLitWrappedCodeFirstService",
             portName = "DocLitWrappedCodeFirstServicePort",
             targetNamespace = "http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService")
-@WSDLDocumentation("DocLitWrappedCodeFirstService impl")
-@GZIP(threshold = 10)
-@FastInfoset(force = true)
 public class DocLitWrappedCodeFirstServiceImpl implements DocLitWrappedCodeFirstService {
     public static final String DATA[] = new String[] {"string1", "string2", "string3"};
     



Mime
View raw message