This post mainly target to give you the process of deploying web services in WSO2 Application Server. We will use WSO2 Developer Studio 3.8.0 and WSO2 Application server 5.3.0 for this tutorial.
Create a simple Web Service
Create a simple JAX-RS service following the post “Develop JAX-RS Web Service Easily Using WSO2 Developer Studio”
Go to Developer Studio Dashboard and click Composite Application Project listed in Distribution section. And create a CAPP project named
CAPP_Application_server and select check button of the Web service project you want to host in Application Server.
Developer Studio will create you a CAPP project which can be deploy directly into WSO2 Application server. Isn’t that great!!!
Add and Start WSO2 Application Server from Developer Studio
There are two ways to do this.
Application server can be add to Developer Studio as a server and then you can do every server operation through Developer Studio.
- Go to Server tab in Developer Studio. This window can be found in bottom section or by following
- Right click inside window and go for New->Server Menu. Select
- Go to Next page of wizard add AS server distribution home folder location as CARBON_HOME section.
- Next page shows port configurations and other useful information. Then finish the configuration and start server.
Application server can be started externally and add to Developer Studio as a remote server.
- Start Application Server externally https://192.168.1.4:9443/carbon/ will be the default server url.
- Go to server tab and New-> Server menu. Select
Add CAPP to Application Server
Now WSO2 server is up and running in our system. You can now deploy the your web service.
- Right click on Developer Studio server tab we created in previous step and goto command Add and Remove
- Then Dialog will pop-up listing available CAPP’s in the workspace. Select your CAPP created in previous step and finish the configuration.
- Your service will deploy in to Application server and up and running.
- You can go to Application Server management console from browser and see your service