Introduction to Microsoft CRM 3.0 and Microsoft BizTalk Server

Wichita Lineman…

A few of my CRM partners have asked how to connect Microsoft BizTalk Server 2004 with CRM 3.0, and my standard answer has always been that both products support XML Web Services and .NET, which should make it easy. However, there is a problem when using the “Import Web Reference” tool within a BizTalk 2004 project in Visual Studio. This creates the following XML schema files:

  • Reference.xsd
  • Reference1.xsd
  • Reference2.xsd
  • Reference3.xsd
  • Reference4.xsd

It turns out that there is an error that prevents the GUID type (defined in Reference2.xsd) from being imported in Reference.xsd, Reference1.xsd and Reference3.xsd. Because of this, a number of errors will appear in Visual Studio error list, preventing you from compiling the project.

To fix this problem, you need to follow these steps:

  1. Create a new BizTalk 2004 project in Visual Studio .Net 2003
  2. Add new web reference pointing to the crmservice.asmx file (e.g. http://localhost:5555/mscrmservices/2006/crmservice.asmx)
  3. Using Notepad (outside of Visual Studio), open Reference.xsd and add the following schema import element:
    <xs:import schemaLocation=”Reference2.xsd” namespace=”” />
  4. Using Notepad, open Reference1.xsd and change the following schema import element from:
    <xs:import namespace=”” />
    <xs:import schemaLocation=”Reference2.xsd” namespace=”” />
  5. Using Notepad, open Reference3.xsd and add the following schema import element:
    <xs:import schemaLocation=”Reference2.xsd” namespace=”” />

Once you have made these changes, you will be able to compile the BizTalk project and you can now start to make use of the rich capabilities of BizTalk Server. One thing to remember is that because you have modified these files outside of Visual Studio, if you ever have to update the web reference (perhaps because you have created new fields of entities within CRM), then your changes will be over-written and you will have to repeat these steps.

Finally, although I haven’t tested this using BizTalk Server 2006 Beta 2, I understand the same steps hold true.

This posting is provided “AS IS” with no warranties, and confers no rights.

Skip to main content