cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1052338 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ systests/jaxrs/src/test/java...
Date Thu, 23 Dec 2010 17:47:06 GMT
Author: sergeyb
Date: Thu Dec 23 17:47:05 2010
New Revision: 1052338

URL: http://svn.apache.org/viewvc?rev=1052338&view=rev
Log:
[JAX-RS] Enhancing FastinfoSet system test

Added:
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset.java
  (with props)
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset2.java
  (with props)
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset3.java
  (with props)
Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
    cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java?rev=1052338&r1=1052337&r2=1052338&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
Thu Dec 23 17:47:05 2010
@@ -40,6 +40,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
+import javax.xml.stream.XMLStreamWriter;
 
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.logging.LogUtils;
@@ -493,7 +494,8 @@ public class ClientProxyImpl extends Abs
             
             OperationResourceInfo ori = outMessage.getContent(OperationResourceInfo.class);
             OutputStream os = outMessage.getContent(OutputStream.class);
-            if (os == null || ori == null) {
+            if ((os == null && outMessage.getContent(XMLStreamWriter.class) == null)
+                || ori == null) {
                 return;
             }
             MessageContentsList objs = MessageContentsList.getContentsList(outMessage);
@@ -517,7 +519,6 @@ public class ClientProxyImpl extends Abs
                     writeBody(body, outMessage, body.getClass(), body.getClass(), 
                               anns, headers, os);
                 }
-                os.flush();
             } catch (Exception ex) {
                 throw new Fault(ex);
             }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java?rev=1052338&r1=1052337&r2=1052338&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Thu Dec 23 17:47:05 2010
@@ -214,7 +214,9 @@ public class JAXRSClientFactoryBean exte
         client.getConfiguration().setConduitSelector(getConduitSelector(ep));
         client.getConfiguration().setBus(getBus());
         client.getConfiguration().getOutInterceptors().addAll(getOutInterceptors());
+        client.getConfiguration().getOutInterceptors().addAll(ep.getOutInterceptors());
         client.getConfiguration().getInInterceptors().addAll(getInInterceptors());
+        client.getConfiguration().getInInterceptors().addAll(ep.getInInterceptors());
 
         if (headers != null && addHeaders) {
             client.headers(headers);

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java?rev=1052338&r1=1052337&r2=1052338&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
Thu Dec 23 17:47:05 2010
@@ -364,7 +364,9 @@ public class JAXRSOutInterceptor extends
                                                    BUNDLE,
                                                    parameter);
             LOG.warning(message.toString());
-            out.write(message.toString().getBytes("UTF-8"));
+            if (out != null) {
+                out.write(message.toString().getBytes("UTF-8"));
+            }
         } catch (IOException another) {
             // ignore
         }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=1052338&r1=1052337&r2=1052338&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Thu Dec 23 17:47:05 2010
@@ -50,8 +50,10 @@ import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.interceptor.FIStaxInInterceptor;
 import org.apache.cxf.interceptor.FIStaxOutInterceptor;
 import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.io.CachedOutputStream;
+import org.apache.cxf.jaxrs.client.ClientConfiguration;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
@@ -65,6 +67,8 @@ import org.apache.cxf.phase.AbstractPhas
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.systest.jaxrs.jaxws.BookSoapService;
 import org.apache.cxf.systest.jaxrs.jaxws.BookStoreJaxrsJaxws;
+import org.apache.cxf.systest.jaxrs.jaxws.BookStoreSoapRestFastInfoset2;
+import org.apache.cxf.systest.jaxrs.jaxws.BookStoreSoapRestFastInfoset3;
 import org.apache.cxf.systest.jaxrs.jaxws.HelloWorld;
 import org.apache.cxf.systest.jaxrs.jaxws.User;
 import org.apache.cxf.systest.jaxrs.jaxws.UserImpl;
@@ -173,6 +177,72 @@ public class JAXRSSoapBookTest extends A
     }
     
     @Test
+    public void testPostGetBookFastinfosetProxy() throws Exception {
+        
+        JAXBElementProvider p = new JAXBElementProvider();
+        p.setConsumeMediaTypes(Collections.singletonList("application/fastinfoset"));
+        p.setProduceMediaTypes(Collections.singletonList("application/fastinfoset"));
+        
+        BookStoreJaxrsJaxws client = JAXRSClientFactory.create(
+                                  "http://localhost:" + PORT + "/test/services/rest4",
+                                  BookStoreSoapRestFastInfoset2.class,
+                                  Collections.singletonList(p));
+        
+        Book b = new Book("CXF", 1L);
+        
+        Book b2 = client.addFastinfoBook(b);
+        
+        assertEquals(b2.getName(), b.getName());
+        assertEquals(b2.getId(), b.getId());
+        
+        checkFiInterceptors(WebClient.getConfig(client));
+    }
+    
+    @Test
+    public void testPostGetBookFastinfosetProxyInterceptors() throws Exception {
+        
+        JAXBElementProvider p = new JAXBElementProvider();
+        p.setConsumeMediaTypes(Collections.singletonList("application/fastinfoset"));
+        p.setProduceMediaTypes(Collections.singletonList("application/fastinfoset"));
+        
+        BookStoreJaxrsJaxws client = JAXRSClientFactory.create(
+                                  "http://localhost:" + PORT + "/test/services/rest5",
+                                  BookStoreSoapRestFastInfoset3.class,
+                                  Collections.singletonList(p));
+        
+        Book b = new Book("CXF", 1L);
+        
+        // Just to make sure it is enforced
+        Map<String, Object> props = WebClient.getConfig(client).getResponseContext();
+        props.put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE);
+        
+        Book b2 = client.addFastinfoBook(b);
+        
+        assertEquals(b2.getName(), b.getName());
+        assertEquals(b2.getId(), b.getId());
+        
+        checkFiInterceptors(WebClient.getConfig(client));
+        
+    }
+    
+    private void checkFiInterceptors(ClientConfiguration cfg) {
+        int count = 0;
+        for (Interceptor<?> in : cfg.getInInterceptors()) {
+            if (in instanceof FIStaxInInterceptor) {
+                count++;
+                break;
+            }
+        }
+        for (Interceptor<?> in : cfg.getOutInterceptors()) {
+            if (in instanceof FIStaxOutInterceptor) {
+                count++;
+                break;
+            }
+        }
+        assertEquals("In and Out FastInfoset interceptors are expected", 2, count);
+    }
+    
+    @Test
     public void testGetBook123ServletResponse() throws Exception {
         
         InputStream in = getHttpInputStream("http://localhost:" + PORT + "/test/services/rest/bookstore/0");
@@ -561,7 +631,7 @@ public class JAXRSSoapBookTest extends A
         
          
         
-        assertFalse(listings.contains("Atom Log Feed"));
+        //assertFalse(listings.contains("Atom Log Feed"));
     }
     
     @Test

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java?rev=1052338&r1=1052337&r2=1052338&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
Thu Dec 23 17:47:05 2010
@@ -58,7 +58,7 @@ public interface BookStoreJaxrsJaxws {
     
     @POST
     @Path("/fastinfoset")
-    @Consumes({"text/xml" })
+    @Consumes({"application/fastinfoset", "text/xml" })
     @Produces({"application/fastinfoset", "text/xml", "application/xml" })
     Book addFastinfoBook(Book book);
     

Added: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset.java?rev=1052338&view=auto
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset.java
(added)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset.java
Thu Dec 23 17:47:05 2010
@@ -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.systest.jaxrs.jaxws;
+
+import org.apache.cxf.interceptor.InInterceptors;
+import org.apache.cxf.interceptor.OutInterceptors;
+import org.apache.cxf.systest.jaxrs.Book;
+
+@InInterceptors(interceptors = "org.apache.cxf.interceptor.FIStaxInInterceptor")
+@OutInterceptors(interceptors = "org.apache.cxf.interceptor.FIStaxOutInterceptor")
+public class BookStoreSoapRestFastInfoset extends BookStoreSoapRestImpl {
+
+    @Override
+    public Book addFastinfoBook(Book book) {
+        return super.addFastinfoBook(book);
+    }
+}

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

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

Added: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset2.java?rev=1052338&view=auto
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset2.java
(added)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset2.java
Thu Dec 23 17:47:05 2010
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import org.apache.cxf.annotations.FastInfoset;
+import org.apache.cxf.systest.jaxrs.Book;
+
+@FastInfoset(force = true)
+public class BookStoreSoapRestFastInfoset2 extends BookStoreSoapRestImpl {
+
+    @Override
+    public Book addFastinfoBook(Book book) {
+        return super.addFastinfoBook(book);
+    }
+}

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

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

Added: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset3.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset3.java?rev=1052338&view=auto
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset3.java
(added)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset3.java
Thu Dec 23 17:47:05 2010
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import org.apache.cxf.feature.Features;
+import org.apache.cxf.systest.jaxrs.Book;
+
+@Features(features = "org.apache.cxf.feature.FastInfosetFeature")
+public class BookStoreSoapRestFastInfoset3 extends BookStoreSoapRestImpl {
+
+    @Override
+    public Book addFastinfoBook(Book book) {
+        return super.addFastinfoBook(book);
+    }
+}

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

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

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java?rev=1052338&r1=1052337&r2=1052338&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
Thu Dec 23 17:47:05 2010
@@ -42,6 +42,7 @@ import org.apache.cxf.systest.jaxrs.Book
 import org.apache.cxf.systest.jaxrs.BookSubresource;
 import org.apache.cxf.systest.jaxrs.BookSubresourceImpl;
 
+
 public class BookStoreSoapRestImpl implements BookStoreJaxrsJaxws {
 
     private Map<Long, Book> books = new HashMap<Long, Book>();

Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml?rev=1052338&r1=1052337&r2=1052338&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml Thu Dec
23 17:47:05 2010
@@ -102,41 +102,55 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
   </jaxrs:server>
   <bean id="bookstore2" class="org.apache.cxf.systest.jaxrs.jaxws.BookStoreSoapRestImpl2"/>
 
-  <util:list id="fastinfosetType">
-    <value>application/fastinfoset</value>
-  </util:list> 
-
-
   <jaxrs:server id="restservice3"
 		        address="/rest3">
     <jaxrs:serviceBeans>
-      <ref bean="bookstore"/>
+      <bean class="org.apache.cxf.systest.jaxrs.jaxws.BookStoreSoapRestFastInfoset"/>
     </jaxrs:serviceBeans>
     
     <jaxrs:providers>
        <ref bean="jaxbProvider" />
     </jaxrs:providers>
-        
-    <jaxrs:outInterceptors>
-      <ref bean="fastInfosetOutInterceptor" />
-    </jaxrs:outInterceptors>
-    <jaxrs:inInterceptors>
-      <ref bean="fastInfosetInInterceptor" />
-    </jaxrs:inInterceptors>
+
     <jaxrs:properties>
       <entry key="org.apache.cxf.endpoint.private" value="true"/>
     </jaxrs:properties>    		   
   </jaxrs:server> 
 
+  <jaxrs:server id="restservice4"
+		        address="/rest4">
+    <jaxrs:serviceBeans>
+      <bean class="org.apache.cxf.systest.jaxrs.jaxws.BookStoreSoapRestFastInfoset2"/>
+    </jaxrs:serviceBeans>
+    
+    <jaxrs:providers>
+       <ref bean="jaxbProvider" />
+    </jaxrs:providers>
+  </jaxrs:server>
+
+  <jaxrs:server id="restservice5"
+		        address="/rest5">
+    <jaxrs:serviceBeans>
+      <bean class="org.apache.cxf.systest.jaxrs.jaxws.BookStoreSoapRestFastInfoset3"/>
+    </jaxrs:serviceBeans>
+    
+    <jaxrs:providers>
+       <ref bean="jaxbProvider" />
+    </jaxrs:providers>
+    
+    <jaxrs:properties>
+      <entry key="org.apache.cxf.fastinfoset.enabled" value="true"/>
+    </jaxrs:properties>
+  </jaxrs:server>
+
   <bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
       <property name="produceMediaTypes" ref="fastinfosetType"/>
       <property name="consumeMediaTypes" ref="fastinfosetType"/>
   </bean>
 
-   <bean id="fastInfosetOutInterceptor"
-         class="org.apache.cxf.interceptor.FIStaxOutInterceptor" />
-   <bean id="fastInfosetInInterceptor"
-         class="org.apache.cxf.interceptor.FIStaxInInterceptor" />
-
+  <util:list id="fastinfosetType">
+    <value>application/fastinfoset</value>
+  </util:list>
+   
 </beans>
 <!-- END SNIPPET: beans -->



Mime
View raw message