Wednesday, July 2, 2008

Using WSO2 Registry as URL-based repository for WSO2 Web Services Application Server (WSAS)

Here I discusses how to configure WSAS to use WSO2 registry as URL repository. Versions above WSAS 2.0 support URL-based repositories. It is simple to configure WSAS to use WSO2 Registry as repository. Let's follow step by step guide given below to do the configuration.

Step 1: Deploy WSAS binary distribution. See WSO2 WSAS Installation Guide for details.

Step 2: Deploy wso2registry.war file in a preferred servelet container it is matter of copying wso2registry.war file into your servelet container. See WSO2 Registry user guide for details. WSO2 Registry 1.1 can be downloaded from here.

Step 3: Go to http://localhost:8080/wso2registry. Note that port should be changed according to yours.

Step 4:
Login to the system using user name “admin” and password “admin.

Step 5:
Then go to add collection and create a collection with the name “wsas-repo” , and select Media Type as “application/vnd.wso2.wsas”. you will notice it creates a collection name "wsas-repo",there will be three sub collection called “services” , “modules” and “conf” inside the wsas-repo.

At the moment please ignore the “conf” directory.

Step 6:
Next you need to upload WSAS administration modules into “wsas-repo”. To do that go to modules collection and upload following modules and module.list file by using “Add resource” option. These modules are shipped with WSAS binary distribution and can be found under the $WSO2WSAS_HOME/repository/module
(in my case /home/krishantha/wsas/wso2wsas-2.2.1/repository/modules on Linux).


Step 7:
Same as the above step, now you need to upload WSAS default services in to “services” collections. To do that, go to “service” collection and upload following service files. These services are shipped with WSAS and can be found under the $WSO2WSAS_HOME/repository/services.

Step 8: Now you need to configure the registry URL repository in WSAS. Locate the server.xml file under the $WSO2WSAS_HOME/conf directory, and locate the following entry in the file.
<RepositoryLocation>${wso2wsas.home}/repository/<RepositoryLocation>
Change the "RepositoryLocation" entry to "http://localhost:8080/wso2registry/resources/wsas-repo".

Step 9:
Restart WSAS server pointing to repository so all the available services under “services” collection will be deployed.

step 10: Check your WSO2 WSAS instance using the URL https://localhost:9443. Login as administrator with user name “admin” and password “admin”

Step 11:
Now navigate though services link in WSAS admin console (Services > echo > Try Web Service) . And try out the echo sample.

FinallyIf you have done the above steps correctly then you will be able to invoke all the WSO2 WSAS default services without any problem.You can find nice tutorial explaining WSAS URL-based repositories from here.

No comments: