2. Start the ESB server.3. Go to the wso2esb-4.8.1/samples/axis2Server/src/SimpleStockQuoteService and execute the ant command . That will build the SimpleStockQuoteService.aar and copy in to deployment directory of the simple axis2 server.4. Go to the wso2esb-4.8.1/samples/axis2Server and start the simple axis2 server(sh axis2server.sh)5. The service endpoint of SimpleStockQuoteService will be https://localhost:9002/services/SimpleStockQuoteService .6. Login to the ESB management console and upload this policy to registry. (/_system/config/repository/components/org.wso2.carbon.security.mgt/policy)

7. Go to the service list and start to secure the SimpleStockQuoteServiceProxy.

8. Check the UsernameToken option and pick the policy.xml from registry.

9. Select the user roles that proxy service can invoke.

10.Execute the ant command inside wso2esb-4.8.1/bin and set the wso2esb-4.8.1/lib as the class path of the project.

11. Copy the policy.xml to ESB home directory that path used in in StockQuoteSecureClient.12. Update the carbon_home and proxyEndpoint in StockQuoteSecureClient class and execute the client .