Hello,
I would like to expose my service in JSON format when using spring aware
servlet as a transport.
I managed to run the sample restful_http_binding stand alone application and
I see that the JSON is configured  programmatically:
        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("Content-Type", "text/plain");
        Map<String, String> nstojns = new HashMap<String, String>();
        nstojns.put("http://demo.restful.server";, "acme");
        MappedXMLInputFactory xif = new MappedXMLInputFactory(nstojns);
        properties.put(XMLInputFactory.class.getName(), xif);
        MappedXMLOutputFactory xof = new MappedXMLOutputFactory(nstojns);
        properties.put(XMLOutputFactory.class.getName(), xof);
        sf.setProperties(properties);
        sf.create();

Now if I run within the Spring aware Servlet with CFXServet, how should I
configure it to achieve the same results and produce JSON response?
Should it be some configuration of <jaxrs:server.. in the beans.xml?

Thanks,
Gennady
-- 
View this message in context: 
http://www.nabble.com/CXF-JSON-and-Servlet-transport-configuration-tp19643091p19643091.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to