Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following diagram shows how these components hang together. New Server RuntimeImage Removed

Image Added

Prerequisites

Now we are going to implement the solution using WSO2 Developer Studio. Before start implementing, you will need following third party tools and WSO2 Products.

Third Party Tools

...

Following is the logical solution diagram that we are going to use while implementing the solution. This diagram shows how each and every WSO2 Product incorparate to come up with end to end solution.

Image Added
New Server RuntimeImage Removed  

In this sample, we are going to create seven projects for each and every component.

...

Set up Customer Data Service

Open Under the Developer Studio Dashboard by clicking Open Dashboard under top menu item Developer Studio.
New Server RuntimeImage Removed
 top menu item, click Open Dashboard to open the Developer Studio Dashboard.  

To create a Data Service, click Data Service Project under the Data Services Server category.

Select Import Data Service and click Next.

Image Added
New Server RuntimeImage Removed  
Browse for the Data Services Descriptor file, CustomerDS.dbs under $DOWNLOAD_HOME/banking-sample/ds/dbs and click Finish.

New Server RuntimeImage Removed Image Added

Now you will see that the Data Service Project has been created in the workspace. Make sure to change the User Name and Password according to your MySQL credentials. New Server RuntimeImage Removed

Image Added

Anchor
SetUpMockObjectsMainframeCardSys
SetUpMockObjectsMainframeCardSys

...

From the Axis2 Service Creation Wizard, select Create New Axis2 Service and click Next. New Server RuntimeImage Removed

Image Added
Fill the following information for Project Name, Package Name and Class Name.

  • Project Name - MainframePojoService
  • Package Name - wso2.hcc
  • Class Name - MainframePojoService 

After giving the necessary details, click Finish. Now you can see that the Axis2 Service has been created in the workspace. New Server RuntimeImage Removed

Image Added
Now copy the two source files MainframePojoService.java and Account.java from $DOWNLOAD_HOME/banking-sample/appserver/AccountService/src/wso2/hcc and paste into the wso2.hcc package in the MainframePojoService project. New Server RuntimeImage Removed

Image Added

Now we want to enable JMS transport, since this service will communicate via JMS transport. To enable this, we need to add the following block to services.xml under /src/main/resources/META-INF.

...

Now your services.xml will look like below. New Server RuntimeImage Removed

Image Added
Now we are done with modelling the Account Service.

2. Modeling Card System

Now we want to create the Card System. This will be another Apache Axis2 Service Project. Click Axis2 Service Project from the WSO2 Developer Studio Dashboard as you did in the previous step.

...

You will see that the Composite Application Project has been created in the workspace with the name you have specified.

New Server RuntimeImage RemovedImage Added

4. Deploy the Composite Application Project in to WSO2 App Server

...

Once you add the server successfully, start the server and add the BankingSample Composite Application to the running server. New Server RuntimeImage Removed

Image Added
Wait till the application gets deployed successfully to the server. Once the deployement deployment is completed, you will see logs similar to the following in the Eclipse Console.

Code Block
languagenone
[2012-04-20 10:05:57,818] INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} - Deploying Carbon Application : BankingSample.car... 

[2012-04-20 10:05:58,059] INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} - Successfully Deployed Carbon Application : BankingSample {super-tenant} 

[2012-04-20 10:06:07,881] INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Deploying Axis2 service: MainframePojoService {super-tenant} 

[2012-04-20 10:06:10,517] INFO {org.apache.axis2.transport.jms.ServiceTaskManager} - Task manager for service : MainframePojoService [re-]initialized 

[2012-04-20 10:06:11,528] INFO {org.apache.axis2.transport.jms.JMSListener} - Started to listen on destination : MainframePojoService of type queue for service 
MainframePojoService 

[2012-04-20 10:06:11,570] INFO {org.apache.axis2.deployment.DeploymentEngine} - Deploying Web service: MainframePojoService-1.0.0.aar - file:/media/dev/CS-Resources/2.0.0/review-02-04-2012/servers/wso2as-4.1.2/repository/deployment/server/axis2services/MainframePojoService-1.0.0.aar
 
[2012-04-20 10:06:11,605] INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Deploying Axis2 service: CardAxis2Service {super-tenant} 

[2012-04-20 10:06:12,224] INFO {org.apache.axis2.transport.jms.ServiceTaskManager} - Task manager for service : CardAxis2Service [re-]initialized 
 
[2012-04-20 10:06:13,233] INFO {org.apache.axis2.transport.jms.JMSListener} - Started to listen on destination : CardAxis2Service of type queue for service 
CardAxis2Service 

[2012-04-20 10:06:13,234] INFO {org.apache.axis2.deployment.DeploymentEngine} - Deploying Web service: CardAxis2Service-1.0.0.aar - file:/media/dev/CS-Resources/2.0.0/review-02-04-2012/servers/wso2as-4.1.2/repository/deployment/server/axis2services/CardAxis2Service-1.0.0.aar

...