Advertisement
Guest User

beans.xml

a guest
Jun 12th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.29 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.     xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:util="http://www.springframework.org/schema/util"
  4.     xsi:schemaLocation="http://www.springframework.org/schema/beans
  5.         http://www.springframework.org/schema/beans/spring-beans.xsd
  6.         http://www.springframework.org/schema/util
  7.         http://www.springframework.org/schema/util/spring-util.xsd
  8.         http://cxf.apache.org/jaxrs
  9.         http://cxf.apache.org/schemas/jaxrs.xsd
  10.         http://cxf.apache.org/core
  11.         http://cxf.apache.org/schemas/core.xsd">
  12.     <import resource="classpath:META-INF/cxf/cxf.xml" />
  13.     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
  14.     <bean id="serviceBean" class="de.pentos.cxf.demo.service.Endpoint"></bean>
  15.     <jaxrs:server id="server01" address="/">
  16.         <jaxrs:serviceBeans>
  17.             <ref bean="serviceBean" />
  18.         </jaxrs:serviceBeans>
  19.         <jaxrs:providers>
  20.             <ref bean="jsonProvider" />
  21.         </jaxrs:providers>
  22.     </jaxrs:server>
  23.     <util:list id="jsonKeys">
  24.         <value>attributes</value>
  25.     </util:list>
  26.     <bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
  27.         <property name="serializeAsArray" value="true" />
  28.         <property name="arrayKeys" ref="jsonKeys" />
  29.     </bean>
  30. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement