I have camel route which exposes web service. I want to accept a data from
web client and convert to JSON object.
Curently i am using SOAP UI to send input to above web service.
# Here is my input.......
<soapenv:Body>
<aaa:myData>
<arg0>
<id>1</id>
<name>abc</name>
</arg0>
</aaa:myData>
</soapenv:Body>
# My camel route is
<dataFormats>
<json id="jack" library="Jackson" />
</dataFormats>
<route id="tcaRoute">
<from uri="cxf:bean:soapEndpoint" />
<marshal ref="jack" />
<to uri="file:src/main/resources/out.txt" />
</route>
After running this, I get following Output i.e JSON data
[{"id":1,"name":"abc"}]
So instead of [{"id":1,"name":"abc"}] , I need
{"*myData*":{"id":1,"name":"abc"}} because id and name are member of
myData
class.
Here it only return class member not the class.
Addition to above i also want to remove "[]" from JSON output.
*Could some one tell me what changes i need to do on JSON data format to
achive this?*
/Note: i referred http://camel.apache.org/json.html/
/Sarfaraj
--
View this message in context:
http://camel.465427.n5.nabble.com/Issue-in-JSON-marshalling-tp5731970.html
Sent from the Camel - Users mailing list archive at Nabble.com.