Chapter 24. Unit testing the connector 439
7. Go to rfhutil and check the contents of the message on the
RESPONSEQUEUE (see Figure 24-27).
Figure 24-27 Returned create message
24.3 Testing the interaction between the connector and
the application
Now that you have established that the connector can process the business
objects correctly, you need to test that the interaction between the connector and
the application for business object handling works as expected. You need to
verify that when using the actual connector and back-end application, that the
results you receive for request messages accurately reflect the application data.
You also need to check that requests for creation of objects in the back-end
application result in the creation of the correct application objects and the
generation of correct events.
Essentially, you will repeat the tests that are described in 24.2, “Testing the
interaction between the connector and business objects” on page 414. This time,
however, you will use the real connector so that you can interact with the real
back-end application.
440 WebSphere Business Integration Adapters
24.3.1 Sending a request business object (RM_Tenant.Retrieve)
To send a request business object to the RM_Tenant.Retrive:
1. Stop the Test Connector.
2. Start the RedMaintenance engine.
3. Start the RMConnector.
4. Using the file from the RM_Tenant.Retrieve test, put a message on to the
REDMAINT.REQUESTQUEUE using rfhutil as before. Remember to add
the ReplyToQueue details to the Message Descriptor.
5. Check the RMConnector log for the details of the business object that is sent,
which should be similar to that shown in Example 24-8.
Example 24-8 Response business object
[Mesg: <Version = 3.0>]
[Mesg: <EndHeader>]
[Mesg: <StartBO:RM_Tenant>]
[Mesg: BusinessObject = RM_Tenant]
[Mesg: Verb = Retrieve]
[Mesg: Locale = en_US]
[Mesg: Id = 100]
[Mesg: Name = Lee Gavin]
[Mesg: ApartmentId = 1]
[Mesg: EMail = leegavin@uk.ibm.com]
[Mesg: <StartChild>]
[Mesg: RM_Apartment = 1]
[Mesg: <StartBO:RM_Apartment>]
[Mesg: BusinessObject = RM_Apartment]
[Mesg: Verb = Retrieve]
[Mesg: Locale = en_US]
[Mesg: Id = 1]
[Mesg: ApartmentNumber = 135]
[Mesg: AddressLine1 = IBM Hursley Park]
[Mesg: AddressLine2 = Winchester]
[Mesg: AddressLine3 = Hampshire]
[Mesg: AddressLine4 = United Kingdom]
[Mesg: PostCode = SO21 2JN ]
[Mesg: ObjectEventId = CxIgnore]
[Mesg: <EndBO:RM_Apartment>]
[Mesg: <EndChild>]
[Mesg: <StartChild>]
[Mesg: RM_Maintenance = 3]
[Mesg: <StartBO:RM_Maintenance>]
[Mesg: BusinessObject = RM_Maintenance]
[Mesg: Verb = CxBlank]
[Mesg: Locale = en_US]
Chapter 24. Unit testing the connector 441
[Mesg: Id = 1]
[Mesg: ApartmentId = 1]
[Mesg: Status = C]
[Mesg: TenantId = 100]
[Mesg: ProblemDescription = I have a leaking tap]
[Mesg: StatusDescription = New part installed]
[Mesg: ExpectedCompletion = Nov 1, 2004]
[Mesg: ActualCompletion = Nov 4, 2004]
[Mesg: ObjectEventId = CxIgnore]
[Mesg: <EndBO:RM_Maintenance>]
[Mesg: <StartBO:RM_Maintenance>]
[Mesg: BusinessObject = RM_Maintenance]
[Mesg: Verb = CxBlank]
[Mesg: Locale = en_US]
[Mesg: Id = 2]
[Mesg: ApartmentId = 1]
[Mesg: Status = P]
[Mesg: TenantId = 100]
[Mesg: ProblemDescription = Crack in the front window]
[Mesg: StatusDescription = Glass delivered, size incorrect. Re-ordered.]
[Mesg: ExpectedCompletion = Jun 28, 2005]
[Mesg: ActualCompletion = Jan 11, 2005]
[Mesg: ObjectEventId = CxIgnore]
[Mesg: <EndBO:RM_Maintenance>]
[Mesg: <StartBO:RM_Maintenance>]
[Mesg: BusinessObject = RM_Maintenance]
[Mesg: Verb = CxBlank]
[Mesg: Locale = en_US]
[Mesg: Id = 3]
[Mesg: ApartmentId = 1]
[Mesg: Status = P]
[Mesg: TenantId = 100]
[Mesg: ProblemDescription = High speed internet not working]
[Mesg: StatusDescription = Cable company contacted, modem to be replaced.]
[Mesg: ExpectedCompletion = Feb 1, 2005]
[Mesg: ActualCompletion = Jan 10, 2005]
[Mesg: ObjectEventId = CxIgnore]
[Mesg: <EndBO:RM_Maintenance>]
[Mesg: <EndChild>]
[Mesg: ObjectEventId = RMConnector_1093461239688_2]
[Mesg: <EndBO:RM_Tenant>] ]
442 WebSphere Business Integration Adapters
6. Check the application log to ensure that the application is reporting
successful processing (see Figure 24-28).
Figure 24-28 Application log
Chapter 24. Unit testing the connector 443
24.3.2 Checking the response message received
To check the response message, use rfhutil to read the message that was sent
to the REDMAINT.RESPONSEQUEUE. If you are using our test data, the
message should be similar to that shown in Figure 24-29.
Figure 24-29 Response message
24.3.3 Sending a request business object (RM_Maintenance.Create)
The send the request business object:
1. Using the file from the RM_Maintenance.Create test, put a message on to the
REDMAINT.REQUESTQUEUE using rfhutil. Remember to add the
ReplyToQueue details to the Message Description.
2. Check the log of the RMConnector to see the details of the business object
that is being sent.

Get WebSphere Business Integration Adapters: An Adapter Development and WebSphere Business Integration Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.