Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download the following files from https://github.com/wso2/bam-data-publishers/tree/master/WCF/WCFMessagePublisher/bin/Release:


    • WCFMessageInterceptor.dll
    • WCFMessagePublisher.dll
    • WSO2BamRestApi.dll
  2. Copy the .dll files to the bin directory of WCF-Service Application.

  3. Create the file IISMessageInterceptor.config in the parent directory of where you hosted the WCF-Service application. For example, if the service you host is in iis-express, then, the config file IISMessageInterceptor.config needs to be created in the home directory of iis_express, which is C:\Program Files (x86)\IIS Express, in Windows, by default.

    This is a normal XML file containing the <RestApi> parent element, which contains mandatory sub elements such as host (ip-address), port, username and password. For example,

    Code Block
    languagehtml/xml
    <RestApi>
        <host>localhost</host>
        <port>9443</port>
        <username>admin</username>
        <password>admin</password>
    </RestApi>
  4. Bind the WCFMessagePublisher.dll to the application using .net configuration.

  5. Add the following configuration to the Xpath location configuration/system.serviceModel of the .net configuration file (App.config/Web.config) and bind the WCF Message Publisher to the application.

 

...

  1. Code Block
    languagehtml/xml
    <protocolMapping>
      <add scheme="http" binding="customBinding"/>
    </protocolMapping>
    <bindings>
      <customBinding>
        <binding>
          <BAMPublisher/>
          <httpTransport/>
        </binding>
      </customBinding>
    </bindings>
    <extensions>
      <bindingElementExtensions>
        <add name="BAMPublisher" type="WCFMessagePublisher.BAMPublisherElement, WCFMessagePublisher"/>
      </bindingElementExtensions>
    </extensions>

    In the above configuration,


    • BAMPublisherElement.BAMPublisherElement is the binding class to the application
    • WCFMessagePublisher is the assembly(.dll)

...

    • name

...

 

  1. Start the WSO2

...

  1. BAM server.

...

  1. Call your service and see the data on BAM.

...