Chapter 5. Using J2EE Connector Architecture 117
11.Set the server and connection information.
a. Scroll down to the Resource Properties section.
b. Enter the server name of your CICS system. In our example, this name
was SCSCERW.
c. Enter the ConnectionURL. In our example, this connection was
tcp://wtsc52.itso.ibm.com®.
12.Press Ctl+S to save the WBITEST Server configuration.
13.Start the server by right-clicking WBITEST from the server tab and selecting
Start.
5.4.3 Testing and running the scenario
You can test the retrieval of the company list using an EJB proxy and JUnit test
class.
Generating EJB proxy
Generate an EJB proxy which exposes the service through a Java class.
1. Right-click the TraderblEJBService.wsdl file. Choose Enterprise Services
→ Generate service proxy to launch the Generate Service Proxy wizard.
2. Choose WSIF and click Next.
3. Accept the defaults, including, class name TraderblProxy.java. Click Next.
4. Select client stub, then select the retrieveCompanyList() operation. Click
Finish.
This proxy class uses WSIF to invoke the EJB retrieveCompanyList operation.
Generating JUnit test case
Add the junit.jar to the project, then use the JUnit Test Case wizard to create the
test class.
1. Change to the Java perspective. Right-click the CICSJCAEJB project, then
select Properties.
2. Select Java Build Path, then the Libraries tab. Click Add External Jars.
3. Navigate to the ..eclipse\plugins\org.junit_3.8.1 folder and choose junit.jar.
Click Open.
4. Click OK to add the JAR to the project’s Java Build Path.
5. Select TraderblProxy in the CICSJCAEJB project.
6. Right-click TraderblProxy then choose New
→ Other.