This is a simple sample that demonstrates the functionality of the JSON Support in WSO2 Application Server, which comes from Apache axis2. Please refer to the references below for further information on how JSON work in axis2.
e.g. In MS Windows cd C:\wso2appserver-x.x.x\samples\JSON or in Linux cd wso2appserver-x.x.x/samples/JSON
e.g. C:\wso2appserver-x.x.x\samples\JSON>ant or wso2appserver-x.x.x/samples/JSON$ ant
-help (For help on available options)
-ct {Content type to be used}
aj (application/json)
ajb (application/json/badgerfish)
e.g: ./run-client.sh -ct ajb
<echo><ns:value xmlns:ns="http://services.wsas.training.wso2.org">Hello JSON Service</ns:value></echo>You can change the "http port" in "src/org/wso2/appserver/sample/json/client/JSONClient.java" and monitor the JSON object that passed through to AppServer, using a capuring tool such as tcp monitor.
Figure 1: JSON Object passing captured from tcp monitor.