118 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
7. Expand Java, then select JUnit and choose TestCase.
8. Enter TraderblProxyTest for the test case. The test class should be
com.itso.cicsjca.TraderblProxy.
9. Click the check boxes for main() method, setUp(), and tearDown(). Click
Next.
10.Select the retrieveCompanyList() method on the Test Methods panel.
11.Click Finish to generate the test case.
To run the test case.
1. In the test method, add the code shown in Example 5-2.
Example 5-2 Test retrieveCompanyList proxy
TraderblCommarea commarea = new TraderblCommarea();
commarea.setRequest_type(“Get_Company “);//15 chars for REQUEST_TYPE
TraderblProxy proxy = new TraderblProxy();
commarea = proxy.retrieveCompanyList(commarea);
for(int i = 0; i < commarea.getCompany__name__tab().length;i++){
System.out.println(commarea.getCompany_name_tab(i));
}
assertTrue((commarea.getCompany_name_tab.length > 0));
2. Run the test case by right-clicking the class and selecting Run → Run As →
JUnit Test. Select the test class to run. Then click Run.
The program should return the list of companies in the system and print them out
to the console.
5.4.4 Creating the system process
At this stage, you have the CICS connector ready to use and the Get Company
List service exposed through both a Java proxy and an EJB binding service.
To incorporate this service into the business process, you create a trader EIS
business process that exposes all the trader features, including the
TraderblEJBService, as a partner to the system process. You can then expose
the Get Company List process through service invocations on the EIS business
process. The TraderblEJBService is a partner link in the overall Trader EIS
service.
The system process is explained in 2.2.6, “Logical architecture” on page 47. You
can have local and remote invocations based on context information. Depending
on the EIS service implementations, you can have a service or feature based
interactions.