WCF message publisher is used to publish Windows Communication Foundation (WCF) messages to WSO2 BAM through the BAM Rest API. Follow the below guide to set up WCF Message Publisher for WSO2 BAM.
Install the following prerequisite software in your machine, before following this guide.
- Microsoft Visual Studio
- Microsoft .NET Framework 4.5
Configuring WCF Message Publisher
Follow the steps below to bind WCF Message Publisher to the WCF service application, which will be monitored using WSO2 BAM.
Download the following files from WSO2 BAM Data Publishers.
Copy the downloaded
<APPLICATION_HOME>/bin/directory of the WCF-Service Application.
IISMessageInterceptor.configfile with the below configuration to the parent directory of the server, on which you hosted the WCF-Service application. For example, if you hosted the service in IIS Express, create it in the home directory of IIS Express. (In Windows, by default it is the
C:\Program Files (x86)\IIS Express\directory.
IISMessageInterceptor.configfile is a normal XML file with the
<RestApi>parent element, which contains mandatory sub elements such as host (IP address), port, username and password as shown in the below example.
Binding WCF Message Publisher
Follow the steps below to bind the WCF Message Publisher to the application using a .NET configuration.
Add the following configuration to the XPath location
App.config/Web.config.NET configuration file, to bind the WCF Message Publisher to the application.
In the above configuration,
BAMPublisherElementis the class, which binds the WCF message publisher to the application.
WCFMessagePublisheris the name of the assembly (.dll) file.
- Call the service by executing the WCF service application.
- Start WSO2 BAM server and log in to BAM management console, to check whether data is being published to BAM.
- Use the Cassandra Explorer of WSO2 BAM, to view the data published to Cassandra. Enter the default values as localhost:9160, admin and admin respectively for Connection URL, Username and Password and click Connect.
- In Keyspaces, check for the published contents in the BAM_WCF_MESSAGE_TRACE column family, which is located under the EVENT_KS keyspace as follows.