How to Deploy Web Services in WSO2 Application Server using WSO2 Developer Studio

How to Deploy Web Services in WSO2 Application Server using WSO2 Developer Studio


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”

webserviceprojectCreate a C-APP Project

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.capp_creation

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.
  1. 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
      • Menu-bar-> Window -> Show view->Serversservers_tab
    • Right click inside window and go for New->Server Menu. Select
      • WSO2 -> WSO2 Carbon 4.4 based server (Since WSO2 AS 5.3.0 is based on WSO2 Carbon 4.4.0)add_new_server
    • Go to Next page of wizard add AS server distribution home folder location as CARBON_HOME section.carbon_server_path
    • Next page shows port configurations and other useful information. Then finish the configuration and start server.
  2. Application server can be started externally and add to Developer Studio as a remote server.
    • Start Application Server externally server_externally_startAS_server_started_externallyhttps:// will be the default server url.
    • Go to server tab and New-> Server menu. Select
      • WSO2 -> remote Serverremote_server_urlFill the server url with running server url and finish the configuration.

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 Removeadd_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.succesfullydeployed
  • You can go to Application Server management console from browser and see your service



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s