Using The REST Web Service Sample Connector

The REST Web Service Connector is an IS2 Connector that connects to a REST Web Service using OAuth validation. Use the REST Web Service sample Connector with TIBCO Scribe® or the available unit tests. After you understand how the Connector works, you can use it to create your own Connector to a REST Web Service.

The REST Web Service Sample uses the .NET Framework Reflection class to create metadata as a collection of ObjectDefinitions and PropertyDefinitions. These data objects represent the entities and their fields. By default, the entities are handed to TIBCO Scribe® without their fields. When a user drills into individual entities, TIBCO Scribe® calls back to the Connector and retrieves the fields.

This sample Connector is based on the TIBCO Scribe® GoToWebinar Connector. For more information, see TIBCO Scribe® Help.

To use the REST Web Service sample Connector:

  1. From Microsoft Visual Studio, compile the sample project.
  2. To use the sample Connector with TIBCO Scribe®, deploy the Connector:
    1. After compiling the sample project, create a <myconnector>\ directory, where <myconnector> is the name of your Connector in the directory in which the TIBCO Scribe® Agent resides.

      ..\Scribe Software\TIBCO Scribe® Online Agent\Connectors\<myconnector>\

    2. If needed, copy the project .dll file to ..\Scribe Software\TIBCO Scribe® Online Agent\Connectors\<myconnector>\

      When running unit tests on the sample Connector, you do not need to copy the .dll file. Visual Studio references the assemblies in their output folders.

      If using the sample Connector with TIBCO Scribe®, this is the <myconnector> directory you created earlier.

  3. Create a test GoToWebinar account:
    1. Go to https://developer.citrixonline.com and register for a Citrix Develop Account.
    2. Create a new application and assign an absolute URL which is accessible by GoToWebinar.
    3. Click Apply for Developer Key and follow the instructions.
    4. When you receive the key, add it to your REST project as the client_id.
  4. If you do not have a GoToWebinar account, create one. For information, see the GoToWebinar website. Click Try It Free for a trial account.
  5. You can now sign into TIBCO Scribe® and create a GoToWebinar Connection with the sample Connector you implemented.

Defining The OAuth URI

For the GoToWebinar Connector, which is the sample Connector presented here, the OAuth URI is:

https://api.citrixonline.com/oauth/authorize?client_id=apiKey&redirect_uri=applicationUrl

Where:

  • client_id = Citrix-assigned API key
  • redirect_uri = URI for TIBCO Scribe®

The Scribe.Connector.Cdk.Sample.Rest.Sys.Test project uses the Moq mocking library in several of its tests. Moq allows this, or any other project, to mock the data layer when unit testing other areas of the code. For more information about Moq, see https://github.com/Moq/moq4

See Also

Unit Testing