[Jersey] pojo class problem in web mapping service (REDUCED)

From: Alberto Marqués <>
Date: Sun, 31 Aug 2014 13:42:34 +0200

Hi there,

It does not work the following service:

XML return

    <prestashop xmlns:xlink="">
    <![CDATA[ 1 ]]>
    <![CDATA[ 2014-08-22 16:26:15 ]]>

Class VO

    import org.eclipse.persistence.oxm.annotations.XmlCDATA;

    import javax.xml.bind.annotation.XmlRootElement;

    public class Pedido {

        @XmlCDATA public Integer id=null;
        @XmlCDATA public String date_add=null; //Fecha


Java client



    import com.sun.jersey.api.client.Client;
    import com.sun.jersey.api.client.ClientResponse;
    import com.sun.jersey.api.client.WebResource;
    import com.sun.jersey.api.client.config.ClientConfig;
    import com.sun.jersey.api.client.config.DefaultClientConfig;
    import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;

    public class ClienteRest {
      public static void main(String[] args) {
        ClientConfig config = new DefaultClientConfig();
        Client client = Client.create(config);
        Pedido pedido = new Pedido();

HTTPBasicAuthFilter("WZWVR59997VL4BMKDV99C7GA1RBYGGBF", ""));

        WebResource service = client.resource(getBaseURI());
        // Get XML

        ClientResponse response =
        // Get XML for application
        Pedido oPedido = response.getEntity(pedido.getClass());



      private static URI getBaseURI() {
        return UriBuilder.fromUri("").build();


This is the output of java program

returned a response status of 200 OK

I want to recover the object class Order of XML does not work when
getEntity always returns null