SSIS 2012 Read from CRM 2011 RRS feed

  • Question

  • Hello,

    I am trying to create an SSIS package that pulls information from the CRM, but I am having issues creating a web service task.  I have my "Server URL" pointed to http://[server]/XRMServices/2011/Organization.svc?wsdl and the wsdl downloads fine.  When I go to input and select the "OrganizationService" I recieve the following error:

    "Cannot find definition for http://schemas.microsoft.com/xrm/2011/Contracts/Services:CustomBinding_IOrganizationService.  Service Description with namespace http://schemas.microsoft.com/xrm/2011/Contracts/Services is missing.  Parameter name: name"

    Any suggestions on what I should do?

    Note: I cannot purchase any third party libraries.
    • Edited by Andr3wO Tuesday, December 9, 2014 2:28 PM
    Tuesday, December 9, 2014 2:16 PM

All replies

  • I don't think you will be able to make this work with a web service task. Instead, use a script component. As you're using SSIS 2012, you can use the CRM sdk assemblies, rather than a service reference, and this is a lot easier

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, December 9, 2014 5:45 PM
  • Thank you.  I am new to SSIS, this is my first one.  I added the Script Component to my package.  Should I just go to the Connection Managers tab and add an "HTTP" connection pointing to the "Server URL" in my original post?  I also downloaded the CRM SDK.  Is there anything I need from this or is that just example code snippets?
    Tuesday, December 9, 2014 8:03 PM
  • Hi,

    Please follow the following links on how to call an assembly file in the SSIS script component. Basically following items you need to do

    1. Create a Custom assembly that contains you business logic(intract with CRM for CRUD using SDK).

    2. Sign the assembly file in the visual studio

    3. Deploy this assembly file in to the GAC.

    4. Call this assembly file in your script task and you can also pass parameter.





    Wednesday, December 10, 2014 6:44 AM
  • There are two possible approaches:

    1. Write your code in a custom assembly, as per the previous post
    2. Write the code directly in the script component

    If you want to reuse your code outside of SSIS, then I'd go for option 1, otherwise there's little to choose between them.

    For option 2, the main steps are:

    • In the script component, create a reference to the Microsoft.xrm.sdk and Microsoft.crm.sdk.proxy assemblies
    • In code, create an instance of the OrganizationServiceProxy to connect to Crm. You can use the sample code in the SDK to help here. The SDK sample code stores connection data in an xml file in the user's profile - this can work within SSIS, but only if the package will always be executed by the same user. An alternative is to modify the code slightly, and use an HttpConnection to store the url and credentials (if required), then read them in your code


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Wednesday, December 10, 2014 12:27 PM
  • Thank you.  I saw those blog posts, I was just hoping there would be an easier way with SSIS 2012.
    Wednesday, December 10, 2014 4:32 PM
  • Thank you, I'll probably just do a custom assembly in case I need to reuse the code outside of SSIS in the future.
    Wednesday, December 10, 2014 4:33 PM