Integrating CRM 2011 with BizTalk 2010 – Untyped

At one of our customers we are running a project where we are integrating various systems, among which a hosted CRM 2011 on premise. In older versions of CRM we had a BizTalk adapter which could be used to set up communication between BizTalk and CRM, however with this version this is no longer the case. Microsoft has decided integration should be done by using the new webservices CRM exposes, which sounds easier then it turned out to be.

Untyped vs typed

Basicly there are two ways to connect CRM to BizTalk, the un-typed and the typed way. I decided to try the untyped way, since this way everything can be done in the mappings, but ran into a lot of problems. It started when I tried to use the Consume WCF Service wizard. I would choose to consume the metadata from a Metadata Exchange endpoint. Next I provided my URL to the organization webservice in the following format:

https://company.crm.ms-hosting.nl/XRMServices/2011/Organization.svc?wsdl

This would indeed retrieve a wsdl, however when I continued in the wizard it would end with the following error:

After some trial and error, I found out the webservice actually exposes 2 wsdl files, so I then tried to consume the service with the following URL:

https://company.crm.ms-hosting.nl/XRMServices/2011/Organization.svc?wsdl=wsdl0

This would indeed import the WCF service, however this was not the end of the problems.

Invalid schema’s

The schema’s that get imported using the Consume WCF Service wizard will not build. When trying to build, you will get errors like the following:

Microsoft allready knows about this, and has released new schema’s with the CRM SDK. So I downloaded the SDK, got the schema’s and replaced the incorrect schema’s in my project with these new ones. Ok, so when I try to build now, all is okay. On to the next problem. When I opened the bindings file, to my surprise it was nearly empty. No ports were defined, so I would have to create these myself.

I don’t know yet where all these problems are coming from. It might be a problem with the settings our hoster uses, seeing how all resources I found said it should work like this. I will go and find out what causes this at a later time, but for our customer I had to move on. At this point I also found out that the untyped method would work fine as long as we stay on the on premise version of CRM, however it will not work if you want to go to the online version. Also the way the untyped option works, is through mappings with a lot of custom XSLT, which does not seem perfect either. Because of all of this, I decided to look in to the typed version. More on this in my next blog post. If you want to try the untyped option of integrating yourself, Richard Seroter has made a very nice blog post on this.

Leave a Reply

Your email address will not be published. Required fields are marked *