Implementing a JMS Service That Returns an Attachment

The JMS service returns information about a city, given a zip code as an attachment.

Prerequisites

TIBCO Enterprise Message Service must be running.

Copy the CityInfo.xml from TIBCO_HOME\bw\n.n\samples\binding\soap\jms\ZipCodeLookupWithAttachment file to the c:\tmp folder. The file has city information and is used to send as the attachment.

In TIBCO EMS administration, create queue.sample and topic.sample before executing the sample.

Procedure

  1. In the samples directory, select binding > soap > jms > ZipCodeLookupWithAttachment and double-click tibco.bw.sample.binding.soap.jms.ZipCodeLookupWithAttachment. For more information, see Accessing Samples.
  2. In Project Explorer expand the tibco.bw.sample.binding.soap.jms.ZipCodeLookupWithAttachment project.
  3. Set the default ApplicationProfile to match the OS you are running on. For more information, see Setting the Default Application Profile.
  4. Fully expand the Processes directory and double-click ZipInfoService.bwp.
  5. Verify your TIBCO Enterprise Message Service connection.
    1. Fully expand the Resources directory.
    2. Double-click JMSConnectionResource.jmsConnResource.
    3. In the Basic Configuration dialog box, click Test Connection to verify the connection.
  6. Click Run > Debug Configurations.
  7. At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
  8. Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the check box next to tibco.bw.sample.binding.soap.jms.ZipCodeLookupWithAttachment.application.
  9. Click Debug.
    This runs the sample in Debug mode.
  10. In TIBCO Business Studio™ for BusinessWorks™, click the Terminate icon to stop the process.

Result

The output.log file at C:\tmp\ZipCodeLookupWithAttachment location shows the following output:

Zip Code : 94086

City : SUNNYVALE

State : CA