Chapter 30. Adding human interaction using WebSphere BI Server Foundation 675
30.2.2 Importing the deployed connector in a service project
To import the deployed connector:
1. Create a new package (for example, adapter.RM2Connector), as shown in
Figure 30-46.
Figure 30-46 Create new package
2. On the Server Foundation machine, using Explorer, map the C: drive of the
Message Broker system (\\student\C$).
3. Locate the WSDL and schema files in the folder \Additional Materials\RM2 on
the network drive.
4. Import the WSDL files and schema file in the existing service project
Maintenance_Processes and in the package adapter.RM2Connector.
676 WebSphere Business Integration Adapters
Figure 30-47 Import connector resources in service project
For this specific scenario, you need to make a slight change to the WSDL. When
you want to invoke the adapter directly, no change is required. However, in our
scenario, we want to add monitoring to the application. Therefore, we need
ensure that the message broker intercepts the call to the adapter. The message
broker can then generate monitoring data that can be used in WebSphere
Business Integration Monitor. (We implement this monitoring logic in Part 8,
“Looking after the run-time environment” on page 823.)
To meet the message requirements of the message broker, the message must
have a correct RFH, including a message set, format, and type. However, in the
WSDL, there is no information about message sets. To add message set
information to the WSDL:
1. Open the WSDL RM2ConnectorJMSBindings.wsdl and select the source
view.
The original JMSType information is shown in Figure 30-48 on page 677.
Note that there is no message set information. However, there is a message
domain, message type, and format. The message set should be added
between the two slash (/) characters.
Chapter 30. Adding human interaction using WebSphere BI Server Foundation 677
Figure 30-48 Generated message properties in the WSDL
2. Perform a find for the text mrm// and replace it with mrm/RedTenant/. Perform
a change-all. Example 30-1 shows the correct JMSType information.
Example 30-1 Corrected message properties in the WSDL
<jms:propertyValue name="JMSType" type="xsd:string"
value="mcd://mrm/RedTenant/RM_Maintenance?format=CwXML"/>
3. Right-click the WSDL file called RM2ConnectorJMSService.wsdl and select
Enterprise Services Generate Deploy Code.
4. Select the port for Hub One Way, which means the port that is used by the
broker (WebSphere Business Integration Server Foundation) sends a
message to the adapter without waiting for a response.
5. Set the inbound protocol to EJB and click Finish so that you can invoke the
adapter as though it was an EJB.
<jms:propertyValue name="JMSType" type="xsd:string"
value="mcd://mrm//RM_Maintenance?format=CwXML"/>
678 WebSphere Business Integration Adapters
Figure 30-49 Generate deploy code for the adapter
Chapter 30. Adding human interaction using WebSphere BI Server Foundation 679
6. Open the Deployment Descriptor for the EJB and correct the resources as
shown in Figure 30-50 and Figure 30-51 on page 680.
Figure 30-50 Update resource environment reference

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.