IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Validating the code

Validating code with Rational Application Developer and WebSphere Application Server

To test the adapter in the WebSphere Application Server environment, use the JavaBeans generation capability of EMD to generate records and a Java™ proxy interface to the adapter. Then generate a session bean that will call this interface, and use the WebSphere universal test client (UTC) to send data to the adapter.


Procedure

  1. Run EMD In Rational Application Developer, EMD can be accessed via New > Other > J2C Java Bean

    The output of EMD will be JavaBeans for your schema definition, as well as a “J2C JavaBeans” that proxies the adapter.

    Once the J2C JavaBeans are generated you need to generate EJBs to Test them.

  2. Select the J2C JavaBeans that you just created.

  3. In the EJB Creation window, select theStateless Session type and container as the transaction type and click Next

  4. In the Resource Adapter deployment panel, choose how to deploy the adapter. You can deploy the adapter with the EAR or you can deploy the adapter as a stand-alone component.

  5. Click Finish to generate the code. Once the EJB is generated you can send data to the adapter and examine the return values using the UTC.

  6. Use the UTC to validate that the adapter can process data Publish your EAR project to the server using the Add and Remove projects option.

  7. Start UTC using the Run universal test client option.

  8. Once the UTC comes up, use the JNDI explorer to find your EJB. Look for your session EJB under EJB Beans.


What to do next

Now, you can test your adapter via the EJB interface.

You can create a session bean using the home interface (create), then invoke business methods on the remote interface, providing the appropriate data. This works the same way as testing any session bean.

Validating the code