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
The WSDL for the service should be viewable at: http://<host>:<port>/services/JSONService?wsdl
Use the script run-client.sh or run-client.bat file to invoke the client using following optional parameters
-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
In the JSON sample an xml element is sent to AppServer via the client.
<echo><ns:value xmlns:ns="http://services.wsas.training.wso2.org">Hello JSON Service</ns:value></echo>
Figure 1: JSON Object passing captured from tcp monitor.