Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 12 Using the Interface to TIBCO Enterprise Message Service : Sample Applications

Sample Applications
Rules Samples
The @SAMPLES rules library distributed with TIBCO Object Service Broker contains a set of sample rules for using the EMS interface. Three types of sample rules are available:
1.
2.
The rules PUBMAPMSG, PUBMAPMSGS, PUBTEXTMSG, PUBTEXTMSGS and PUBXMLMSG are sample rules for publishing messages to EMS.
3.
The rules SUBMAPMSG, SUBMAPMSGS, SUBTEXTMSG, SUBTEXTMSGS, and SUBXMLMSG are the counterpart rules that subscribe and retrieve the messages published by the publishing rules.
To use the rules listed in Sample Rules, edit the table S6BEMSURL, providing your TIBCO Object Service Broker user ID (field USERID) and the URL for the EMS server (field URL). If SSL-based message exchange is desired, combinations of the following values must also be supplied:
If server verification is required, the server name (field SSL_HOSTNAME) and a reference to a data set (member) that contains a certificate that authenticate the server’s certificate, as well as the encoding of the certificate (fields SSL_TRUSTED_PATH and SSL_TRUSTED_ENCODING). See tibemsSSLParams_AddTrustedCertFile in the EMS documentation.
A reference to a data set (member) that contains a client certificate and its encoding (fields SSL_IDENTITY_PATH and SSL_IDENTITY_ENCODING). See tibemsSSLParams_SetIdentityFile in the EMS documentation.
A reference to a data set (member) that contains a client private key and its encoding, if it has not been supplied as part of the client certificate (fields SSL_KEY_PATH and SSL_KEY_ENCODING). See tibemsSSLParams_SetPrivateKeyFile in the EMS documentation.
The private key password (field SSL_PASSWORD). See tibemsConnection_CreateSSL in the EMS documentation.
 
Table 3 Sample Rules
Publishes the contents of the contents of the BOOKS table as a set of map messages to the queue TIBCO.OSB.MAPTEST.
Publishes the contents of the contents of the BOOKS table as a set of text messages to the queue TIBCO.OSB.TXTTEST.
Publishes the contents of the contents of the BOOKS table as a XML document to the queue TIBCO.OSB.XMLTEST.
Subscribes to queue TIBCO.OSB.MAPTEST and retrieves one map message and displays the contents in the message log. The counterpart to PUBMAPMSG above.
Subscribes to queue TIBCO.OSB.MAPTEST and retrieves map messages and displays their contents in the message log. The counterpart to PUBMAPMSGS above.
Subscribes to queue TIBCO.OSB.TXTTEST and retrieves one text message and displays the contents in the message log. The counterpart to PUBTEXTMSG above.
Subscribes to queue TIBCO.OSB.TXTTEST and retrieves text messages and displays their contents in the message log. The counterpart to PUBTEXTMSGS above.
Subscribes to queue TIBCO.OSB.XMLTEST and retrieves an XML document and displays its contents in tabular form in the message log. The counterpart to PUBXMLMSG above.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved