Sdílet prostřednictvím


How to Setup Visual Studio for BizTalk Adapter Development

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

To perform BizTalk Server development for the adapters that are provided with Commerce Server, and assuming you intend to use BizTalk Server for more than simple routing of adapter messages, you need to perform several steps with the schemas that are included in the adapters SDK. These steps include:

  • Building a DLL that contains the adapter schemas, both those that are the default versions of the schemas produced by the Commerce Server systems with which the Commerce Server adapters interact and those that are specific to the adapters themselves.

  • Deploying the schemas in that DLL to the BizTalk Server application within which the BizTalk entities you are developing will reside.

  • Adding that DLL as a reference to the BizTalk Server projects you create within Visual Studio 2005 or Visual Studio 2008.

Each of these steps is discussed separately below.

Building the Commerce Server Adapter Schemas DLL

Follow these steps to build a DLL for the Commerce Server adapter schemas.

To build the Commerce Server adapter schemas DLL

  1. Copy the files from the adapters SDK folder to an appropriate location on your BizTalk Server development computer. These files include Visual Studio 2005 or Visual Studio 2008 solution (CommerceServerAdapterSchemas.sln) and BizTalk project files (CommerceServerAdapterSchemas.btproj) and nearly two dozen schema files (.xsd) associated with the various Commerce Server adapter messages.

  2. On your BizTalk Server development computer, in the chosen location, double-click the Visual Studio 2005 or Visual Studio 2008 solution file, CommerceServerAdapterSchemas.sln, to launch Visual Studio 2005 or Visual Studio 2008.

  3. Create a strong name key to sign the DLL, and add the key file location to the solution.

  4. Within Visual Studio 2005 or Visual Studio 2008, in Solution Explorer, right-click the CommerceServerAdapterSchemas solution and then click Build Solution.

    Note

    Many of the schemas you are building do not contain a namespace specifier on the root node of the schema. This produces a warning when the schema is compiled. Unless you are using the transport property Namespace when configuring your Commerce Server adapter endpoints, you can ignore all these warnings. If you are using this property, you should not see this warning for the Commerce Server system schemas that you have updated. For more information, see Generating and Using the XSD Files Required by Different Commerce Server Systems and Using the Namespace Transport Property.

You have now created the following DLL, which you can deploy to a BizTalk Server application and reference from a BizTalk Server project within Visual Studio 2005 or Visual Studio 2008:

Microsoft.CommerceServer.Adapter.CommerceServerAdapterSchemas.dll

Deploying the Commerce Server Adapter Schemas to BizTalk Server

Follow these steps to deploy the Commerce Server adapter schemas to the BizTalk Server application of your choice.

To deploy the Commerce Server adapter schemas

  1. Perform the steps described above in the section Building the Commerce Server Adapter Schemas DLL.

  2. Within Visual Studio 2005 or Visual Studio 2008, in Solution Explorer, right-click the CommerceServerAdapterSchemas solution and then click Deploy Solution.

    Note

    By default, the adapter schemas will be deployed to the default application on the local computer. You can change the deployment configuration settings within the Property Pages dialog box for the BizTalk Server project CommerceServerAdapterSchemas. To access this dialog box, right-click this project, click Properties, and then within the Property Pages dialog box, navigate to the deployment configuration properties.

Within the BizTalk Server Administration Console, for example, the schemas are now visible in the Schemas node of the BizTalk Server application to which they have been deployed. These deployed schemas can now be used within BizTalk pipelines and orchestrations, for example, to validate or otherwise examine the corresponding adapter messages.

Referencing the DLL within a Visual Studio 2005 or Visual Studio 2008 BizTalk Project

To create, for example, a BizTalk orchestration that makes use of the deployed adapter schemas, perform the following steps to add a reference to the DLL that contains the schemas you have already built and deployed.

To add a reference to the Commerce Server adapter schemas

  1. Within Visual Studio 2005 or Visual Studio 2008, either create a new BizTalk Server project or open an existing BizTalk Server project.

  2. In Solution Explorer, right-click the References node within the project you just created or opened, and then click Add Reference.

    The Add Reference dialog box opens.

  3. Click the Browse tab.

  4. Navigate to the location where you built the Commerce Server adapter schemas DLL. Within that location, find the following DLL within the subfolder obj\Deployment:

    Microsoft.CommerceServer.Adapter.CommerceServerAdapterSchemas.dll

  5. Select this DLL, click Add to add this DLL to the Selected projects and components list, and then click OK to close the Add Reference dialog box.

The Commerce Server adapter schemas DLL is now a reference within your BizTalk Server project, and you can reference the schemas that it contains.

See Also

Other Resources

Generating and Using the XSD Files Required by Different Commerce Server Systems

Using the Namespace Transport Property

BizTalk Adapters SDK

BizTalk Adapter Tools

Working with the BizTalk Adapters