users@glassfish.java.net

Re: Using application/json content type with Glassfish esb and rest

From: <glassfish_at_javadesktop.org>
Date: Fri, 28 May 2010 04:42:10 PDT

I've attached means of reproducing the problem for anyone who is interested.

test.war contains a simple servlet that returns application/json: {"test":{"value":"abc"}}

I deployed this on port 80 so the output can be viewed by visiting http://localhost/test

The 2 NetBeans projects will need to be built after being imported. If the web archive is deployed on a port other than 80 the outbound wsdl will need to be updated accordingly.

Deploy the assembly and browse to http://localhost:9696/test

The output generated is <test><value>abc</value></test> despite the response header stating the content is application/json.
[Message sent by forum member 'rdo82']

http://forums.java.net/jive/thread.jspa?messageID=471815