org.mule.modules

mule-module-ms-dynamics-crm-onpremise

config

Namespacehttp://www.mulesoft.org/schema/mule/dynamicscrm-onpremise
Schema Locationhttp://www.mulesoft.org/schema/mule/dynamicscrm-onpremise/current/mule-dynamicscrm-onpremise.xsd  (View Schema)
Schema Version1.0
Minimum Mule Version3.2

Module Overview

Microsoft Dynamics CRM 2011 Onpremise version

This connector allow the integration with MS Dynamics CRM 2011 Onpremise version.
The connector uses Kerberos/SPNEGO with Active Directory for Authentication.

If you are going to use this connector be sure to have your environment well configured. This requires a CRM Onpremise 2011 Server (Windows 2008 Server x64) running in a Active Directory Domain with a SPN configured over HTTP/... Also the DNS configuration for the CRM server and the Kerberos/AD server.

Debug purposes:

---------------

To add debug in Kerberos/SPNEGO flow add this parameters in the VM params:

-Dsun.security.krb5.debug=true

-Dsun.security.spnego.debug=true

Login Config File

-----------------

Create a new file with the next configuration in your server:

********************************************************************************************

Kerberos {

com.sun.security.auth.module.Krb5LoginModule required debug=true;

};

********************************************************************************************

i.e. In this case, Kerberos is the only module configured, and it will be the param to be used in loginConfigModule=Kerberos

Kerberos Config File

--------------------

Create a new file with the next configuration in your server:

********************************************************************************************

[libdefaults]

default_realm = <YOUR_REALM>

default_tkt_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc

default_tgs_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc

permitted_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc

[realms]

<YOUR_REALM> = {

kdc = <Kerberos_location>

default_domain = <YOUR_REALM>

}

[domain_realm]

.<your_realm> = <YOUR_REALM>

<your_realm> = <YOUR_REALM>

********************************************************************************************

Please note the upper and lower case.

Summary

Configuration
<dynamicscrm-onpremise:config>
Configure an instance of this module
Message Processors
<dynamicscrm-onpremise:associate>
Associate a set of entities
<dynamicscrm-onpremise:create>
Create entity
<dynamicscrm-onpremise:delete>
Delete entity
<dynamicscrm-onpremise:disassociate>
Disassociate a set of entities
<dynamicscrm-onpremise:execute>
Execute a business logic method
<dynamicscrm-onpremise:retrieve>
Retrieve entity
<dynamicscrm-onpremise:retrieve-multiple-by-attributes>
Retrieve multiple entities by attributes values and sorting options
<dynamicscrm-onpremise:retrieve-multiple-by-query>
Retrieve multiple entities by a query described by and XML
<dynamicscrm-onpremise:update>
Update entity

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:dynamicscrm-onpremise="http://www.mulesoft.org/schema/mule/dynamicscrm-onpremise"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/dynamicscrm-onpremise
               http://www.mulesoft.org/schema/mule/dynamicscrm-onpremise/current/mule-dynamicscrm-onpremise.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescriptionJava TypeMIME TypeEncoding
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string kerberosConfigPath The path where the Kerberos config file is
xs:string loginConfigModule The LoginModule configuration to use (this is defined inside of LoginConfig file)
xs:string loginConfigPath The path where the LoginConfig file is
xs:string organizationServiceUrl The path to the MS Dynamics Configuration scv
xs:string password Password
xs:string spn The Service Provider Name of the Dynamics Server in OnPremise mode (this can be found in the organizationServiceUrl, under \)
xs:string username Username

Message Processors

<dynamicscrm-onpremise:associate>

Associate a set of entities

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
entityName Logical name of entity String */* UTF-8
entityId Guid of entity in string form String */* UTF-8
relationshipEntityRoleIsReferenced If the role of the entity is "Referenced" (true) of "Referencing" (false) Boolean */*
relationshipSchemaName The type of relationship String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<dynamicscrm-onpremise:related-entities-attributes> List of the attributes of related entities List<Map<String, Object>>

<dynamicscrm-onpremise:create>

Create entity

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
logicalName A logical name String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<dynamicscrm-onpremise:entity> An entity object represented as a map Map<String, Object>
Returns
Return Type Description
String The GUID of the created entity.
Exception Payloads
Payload ClassDescription
IOrganizationServiceCreateOrganizationServiceFaultFaultFaultMessage

<dynamicscrm-onpremise:delete>

Delete entity

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
logicalName Logical name of the entity to be updated String */* UTF-8
guid The guid of the entity to be retrieved String */* UTF-8
Exception Payloads
Payload ClassDescription
IOrganizationServiceDeleteOrganizationServiceFaultFaultFaultMessage

<dynamicscrm-onpremise:disassociate>

Disassociate a set of entities

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
entityName Logical name of entity String */* UTF-8
entityId Guid of entity in string form String */* UTF-8
relationshipEntityRoleIsReferenced If the role of the entity is "Referenced" (true) of "Referencing" (false) Boolean */*
relationshipSchemaName The type of relationship String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<dynamicscrm-onpremise:related-entities-attributes> List of the attributes of related entities List<Map<String, Object>>

<dynamicscrm-onpremise:execute>

Execute a business logic method

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
requestName Logical name of request to be made String */* UTF-8
requestGuid Optional. The guid of the request to me made String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<dynamicscrm-onpremise:request-parameters> A collection of parameters to the request in Map form Map<String, Object>
Returns
Return Type Description
Map<String, Object> organization response to execute request
Exception Payloads
Payload ClassDescription
IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage

<dynamicscrm-onpremise:retrieve>

Retrieve entity

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
logicalName Name od the entity to be retrieved String */* UTF-8
guid The guid of the entity to be retrieved String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<dynamicscrm-onpremise:attributes> Attributes that will be retrieved from the entity specified List<String>
Returns
Return Type Description
Map<String, Object> attributes of specified entity in Map form
Exception Payloads
Payload ClassDescription
IOrganizationServiceRetrieveOrganizationServiceFaultFaultFaultMessage

<dynamicscrm-onpremise:retrieve-multiple-by-attributes>

Retrieve multiple entities by attributes values and sorting options

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
entityName Name of the entity type String */* UTF-8
count Optional. Number of rows to retrieve Integer */*
pageNumber Optional. Number of page to retrieve Integer */*
pagingCookie Optional. Paging cookie String */* UTF-8
returnTotalRecordCount Optional. If total record count should be returned Boolean */*
Child Elements
NameDefault ValueDescriptionJava Type
<dynamicscrm-onpremise:columns> Columns to retrieve List<String>
<dynamicscrm-onpremise:attributes> Attributes to filter by List<String>
<dynamicscrm-onpremise:values> Values of the attributes List<String>
<dynamicscrm-onpremise:orders> Optional. Ordering fields, key is the name, value is "Ascending" or "Descending" Map<String, String>
Returns
Return Type Description
List<Map<String, Object>> entities retrieved

<dynamicscrm-onpremise:retrieve-multiple-by-query>

Retrieve multiple entities by a query described by and XML

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
queryXml Query XML String */* UTF-8
Returns
Return Type Description
List<Map<String, Object>> entities retrieved

<dynamicscrm-onpremise:update>

Update entity

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
logicalName Logical name of the entity to be updated String */* UTF-8
guid The guid of the entity to be retrieved String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<dynamicscrm-onpremise:attributes-to-update> The attributes that will be updated, in Map form Map<String, Object>

Message Sources

Transformers