Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →How to Generate SQL Command Schemas for the CData BizTalk Adapter for PayPal
The CData BizTalk Adapter makes it easy to process PayPal data in BizTalk by returning the data as XML. You can use this data in a BizTalk orchestration by creating an XML schema file for the table you want to access in BizTalk.
This article will show how to generate a schema to process PayPal data retrieved using the CData BizTalk Adapter. You will generate a schema for a SELECT command.
This guide shows how to use the CData BizTalk Adapter for PayPal to execute SQL commands to PayPal.
Add the Adapter for PayPal to Your Project
Follow the steps below to add the adapter to a BizTalk Server project.
- If you have not already done so, create a new BizTalk Server project in Visual Studio.
- Right-click on the project in the Solution Explorer and click Add -> Add Generated Items.
- Select Add Adapter Metadata in the resulting dialog box.
- In the resulting Add Adapter wizard, select the adapter from the list.
- In the Port menu, leave the selection blank. You can also select a receive location or send port that has the adapter configured as its transport type.
Generate a Schema for an SQL Command
After you select the adapter in the Add Adapter wizard, the Schema wizard is displayed. Follow the steps below to configure connection properties and retrieve the metadata for the results of the command.
- In the Connection String page, enter authentication credentials and other connection properties, if you did not select an adapter that you have already configured in your BizTalk application. Below is a typical connection string:
Schema=SOAP;Username=sandbox-facilitator_api1.test.com;Password=xyz123;Signature=zx2127;InitiateOAuth=GETANDREFRESH
The provider surfaces tables from two PayPal APIs. The APIs use different authentication methods.
- The REST API uses the OAuth standard. To authenticate to the REST API, you will need to set the OAuthClientId, OAuthClientSecret, and CallbackURL properties.
- The Classic API requires Signature API credentials. To authenticate to the Classic API, you will need to obtain an API username, password, and signature.
See the "Getting Started" chapter of the help documentation for a guide to obtaining the necessary API credentials.
To select the API you want to work with, you can set the Schema property to REST or SOAP. By default the SOAP schema will be used.
For testing purposes you can set UseSandbox to true and use sandbox credentials.
- In the General Options section on the next page, Schema Information, select Send Port or Receive Location, depending on the adapter configuration.
- If you want to generate the schema for the entire result set, select the Single Message option in the Message Mode menu. If you want to generate one schema for each row in the result set, select the Message Per Row option and confirm that the root element of the message is 'row'.
- In the Command Type menu, select SQL Command.
In the SQL Command Text box on the Statement Information page, enter an SQL command. (If you have configured a receive location or send port, the SQL command you configured is entered in the box.) This example uses the query below:
SELECT Date, GrossAmount FROM Transactions
- Confirm the settings in the summary displayed by the wizard and click Finish to generate the schema.xsd file.
Processing Schemas
To use schemas in a simple BizTalk application, see the tutorial.