Hi,

 

I'd like to return JSON from my service, more specifically I'd like to
return a bean which is derived, not annotated with the XMLRootElement. I
have followed instructions on the web site and this is what I have come
up with, but it is not working for me. Any help is greatly appreciated.

 

<jaxrs:server id="customerRSService" address="/customerservice">

            <jaxrs:serviceBeans>

                  <ref bean="customerService" />

            </jaxrs:serviceBeans>

            <jaxrs:providers>

                  <ref bean="jaxbProvider"/>

            </jaxrs:providers>

      </jaxrs:server>

 

      <util:map id="jaxbElementClassMap"
map-class="java.util.Hashtable">

            <entry key="com.facet.peak3.emi.domain.model.CustomerType"
value="{urn:xml-facet-com:peak3:emi:data:final:PK3EMI:1.0}CustomerType"/
>

      </util:map>

      

      <bean id="jaxbProvider"
class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">

            <!-- <property name="schemaHandler" ref="schemaHolder" />-->

            <property name="marshallAsJaxbElement" value="true"/>

            <property name="jaxbElementClassMap"
ref="jaxbElementClassMap"/>

      </bean>

 

 

Cheers,

Matt.

Reply via email to