Using Jackson json parser in Apache Tomee 1.5 rest

Code in WEB-INF/openejb-jar.xml for every rest bean, in this case MobileRest:

    <pojo-deployment class-name="com.origami.catastro.mobile.rest.MobileRest">
        <properties>
            cxf.jaxrs.providers = jsonProvider, jaxbProvider
        </properties>
    </pojo-deployment>

Add services in WEB-INF/resources.xml:

<?xml version="1.0" encoding="UTF-8"?>
<resources>
  <Service class-name="org.codehaus.jackson.jaxrs.JacksonJsonProvider" id="jsonProvider"/>
  <Service class-name="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider" id="jaxbProvider"/>
  <Resource id="smbcatas documental dev" type="javax.sql.DataSource">#Fri May 16 11:29:49 COT 2014
jdbcDriver=org.postgresql.Driver
password=asdfasdfasdf
userName=asdfasdfasdf
jdbcUrl=jdbc\:postgresql\://193.87.122.200\:5432/smbcatas
</Resource>
</resources>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s