views:

630

answers:

5

HI ,

I want to create a dynamic send port for MS CRM 3.0/4.0 adapter. but i didn't get how to create it? Also i didn't get any methods to set user name and password required to access CRM.

CRM URL is : http://localhost:5555

User name: Administrator

Password: password

Orgname: MicrosoftCRM

I installed MS CRM Adapter[Both for 3.0/4.0 common and also separate adapter for CRM 4.0].

Thanks in advance.

+1  A: 

There is a lot to configure from BizTalk end.

I suggest having a look at this blog as it introduces the MS CRM Webservices including their FetchXML grammer and BizTalk adapter.

https://blogs.msdn.com/brajens/archive/2007/05/27/using-microsoft-biztalk-dynamics-crm-adapter-part-1.aspx

http://blogs.msdn.com/brajens/archive/2007/05/30/using-microsoft-biztalk-dynamics-crm-adapter-part-2.aspx

Also here are the links to the CRM SDK Webservices

http://msdn.microsoft.com/en-gb/library/aa682250.aspx

And the Developing with them http://msdn.microsoft.com/en-gb/library/aa681429.aspx

And finally and invaluable tool for working with MS CRM Webservices is FetchXML Builder

**

  1. You should also read the installation guide for MS CRM 4 as there is the process for setting up the BizTalk adapter with the Current and Different CRM Accounts too.

**

http://www.microsoft.com/downloads/details.aspx?FamilyID=1ceb5e01-de9f-48c0-8ce2-51633ebf4714&displaylang=en

I got the idea about how to use CRM adapter as a Static port. Now i want to use this CRM adapter as a Dynamic port to connect different organizations at runtime. The CRM Url remains same but the orgnization name is changing at runtime
koOldeEp
A: 

Hi Again

Unfortunatley I don't have any CRM-specific experience, or a CRM system I can test this with, but I'll try to help as much as I can "offline".

Starting with the dyamic send requirement - I've looked at the setup of the adapter starting at the registry entries (HKEY_CLASSES_ROOT\CLSID{D38D5DCC-2B30-43b9-9C69-3BBFD0926986}) and I found the registered alias for this adapter - "MicrosoftDynamicsCRM://"

Based on that, when you set the url for the dyanmic port in your process, have you tried using this alias as a prefix to the url you need?

BizTalk uses the alias to decide which adapter to use for the dynamic send port.

As for the username/password - looking at the installation folder for the adpater i can see there's a schemas folder and in it a propertySchema.xsd - this one contains context properties which I assume are used to control the adpater's behaviour at runtime (as this is almost always the case) - the schema contains properties for username and password - I would try to set those on the outgoing message; they are likely to to be used by the adapter.

BTW - the third property is "serverUrl" - you might want to try setting this to override any url configured for a static port as a way of performing a "dynamic send", although if you can get the dynamic send port to work, and you should be able to, I would think that's the better way

Important note - at least on my machine the property schema was not deployed as part of the server installation, so you might need to deploy it manually (and reference it from your project)

Yossi Dahan
Thanks. i will try this and will get back to You.
koOldeEp
HIThe propertySchema.xsd is provided for solicit-response port.If i want to use this for dynamic port then how to set those property values in oxd to bind dynamic port?
koOldeEp
tell me first that, is BTS 2006 MS CRM adapter supports dynamic port?because i come to know that some of the adapters are not supporting dynamic port bindings.In such case what should we do to use CRM adapter as dynamic port? write our own adapter or something else?
koOldeEp
Have you tried setting these properties and seeing if they work? the adapter shares the code used to send a request between the one way and two way operations.I would try setting the serverUrl property on a static port before trying the dynamic port route.
Yossi Dahan
To set the properties - deploy the context properties schema in a project, then add a reference to that project from your orchestration project and use as normal - MyMessage([projectNamespace].ServerUrl) = "CRM Url"
Yossi Dahan
Now tell me one thing, this propertySchema.xsd properties are overriding the current static solicit-response port configuration or we have to create dynamic http port and configure it with propertySchema.xsd properties.
koOldeEp
And also only CRMDynamic(CreateContactOrch.ServerUrl) = "CRM Url"; is enough or we have to set CRM_Dynamic_SendPort(Microsoft.XLANGs.BaseTypes.Address) = "CRm Url"; also?
koOldeEp
Again - unfortunately - I can't try any of this, but I think your best bet is to try a static port, and setting the three properties Url, Username and password on the request message.
Yossi Dahan
Ok thanks i will try this and will get back to You.
koOldeEp
For MS CRM the Server Url should be like CRM_Dynamic_SendPort(Microsoft.XLANGs.BaseTypes.Address) = "MicrosoftDynamicsCRM://http://localhost:5555"; or simply "MicrosoftDynamicsCRM://localhost:5555"??
koOldeEp
and if i use static solicit-response port then it should be specify now or specify later?because we have to set pipeline also.
koOldeEp
Again - I would suggest you focus on one possible solution first - preferably the static send port. it is hard to attack two fronts.you could use either specify now or specify later, it does not matter generally; I ALWAYS user specify later.
Yossi Dahan
As for the dynamic send port url - I would have thought the former, but it did not work for me, looking at the code throgh reflection I could not see where dynamic send is implemented, but there are hints to it, so I'm not sure if I haven't missed anything. I need to look at it some more when I can.
Yossi Dahan
A: 

HI i got new errors for MS CRM Dynamic Solicite-response send port

1.A message sent to adapter "Microsoft Dynamics CRM" on send port "CreateContactOrch_1.0.0.0_CreateContactOrch.Orchestration_1_Dynamic_CRM_Solicit_Response_Port_8de755fbdbd4eff7" with URI "MicrosoftDynamicsCRM://http://10.1.3.140:5555" is suspended. Error details: The file '/metadataservice.asmx' does not exist. MessageId: {79866086-E694-4965-A6A4-83AD3D83D6F4} InstanceID: {95B7B876-6710-4230-851D-8ABD6DA10795}

2.A message sent to adapter "Microsoft Dynamics CRM" on send port "CreateContactOrch_1.0.0.0_CreateContactOrch.Orchestration_1_Dynamic_CRM_Solicit_Response_Port_8de755fbdbd4eff7" with URI "MicrosoftDynamicsCRM://10.1.3.140:5555" is suspended. Error details: The file '/metadataservice.asmx' does not exist. MessageId: {C34375C3-56D5-465F-96D1-3D72C34B7F67} InstanceID: {1B6AD9FE-9984-4F55-8852-60B095DD9F3F}

koOldeEp
A: 

WORKING SOLUTION

This is what you would need to do...

Add the Dynamics CRM Property Schema 'PropertySchema.xsd'. Locate this schema in the Microsoft CRM Dynamics BizTalk Adapter installation folder

C:\Program Files\[CRM Adapter installation folder]\Schemas

Set the following properties in the orchestration

// NOTE: Use the complete MS CRM 4.0 Web Service URL and not the short form
    CrmQueryRequest(PropertySchema.ServerUrl)  
        = "http://server_name/MSCRMServices/2007/CrmService.asmx";
    CrmQueryRequest(PropertySchema.UserName) = @"domain-name\user-name";
    CrmQueryRequest(PropertySchema.Password) = @"p@ssword";

    CRMQueryPort(Microsoft.XLANGs.BaseTypes.Address)="http://server_name/MSCRMServices/2007/CrmService.asmx";
    // The name of the adapter listed in the BizTalk administration console
    CRMQueryPort(Microsoft.XLANGs.BaseTypes.TransportType) = "Microsoft Dynamics CRM 4.0";

For more information about Dynamic ports, please go through...

My Code Project Article

Naveen Karamchetti
A: 

Dear koOldeEp,

If you find anything about runtime changing organization please tell me. I am having same kind of problem.

Any help will be highly appreciated.

Thanks in advance Matheu