Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)
Answered

CRM Online SOAP Endpoint

Posted on by

I had a requirement to connect CRM Online to a Drupal website.  As I didn't have the benefit of writing a custom web service I used the CRM SOAP interface and PHP.

This was working fine for months however in the last week and a bit this has stopped working.  I can retrieve the required tokens for authentication however any request I send off results in a blank response.

I'm presuming something has on CRM Online.  So I guess my question is has anybody noticed this and does anyone have a fix?

*This post is locked for comments

  • Andre Margono Profile Picture
    Andre Margono 2,602 on at
    RE: CRM Online SOAP Endpoint

    Glad you fixed the problem and thanks for posting up your solution Andrew!

    2007 is deprecated in 2013 but it still works. In 2015 it's completely gone.

  • AndrewCampey Profile Picture
    AndrewCampey on at
    RE: CRM Online SOAP Endpoint

    Looks like that's the case Guido!

    Looks like they might have started early as that says 7th of December.

  • Verified answer
    AndrewCampey Profile Picture
    AndrewCampey on at
    RE: CRM Online SOAP Endpoint

    Andre,

    The 2007 Endpoint is deprecated in CRM 2013 I thought??

    Anyway I have just discovered the answer.

    The following is a snapshot of my code

       $cURLHandle = curl_init();

       curl_setopt($cURLHandle, CURLOPT_URL, $soapUrl);

       curl_setopt($cURLHandle, CURLOPT_RETURNTRANSFER, 1);

       curl_setopt($cURLHandle, CURLOPT_TIMEOUT, 60);

       curl_setopt($cURLHandle, CURLOPT_SSL_VERIFYPEER, FALSE);

       curl_setopt($cURLHandle, CURLOPT_FOLLOWLOCATION, TRUE);

       curl_setopt($cURLHandle, CURLOPT_SSLVERSION, 3);

       curl_setopt($cURLHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);

       curl_setopt($cURLHandle, CURLOPT_HTTPHEADER, $headers);

       curl_setopt($cURLHandle, CURLOPT_POST, 1);

       curl_setopt($cURLHandle, CURLOPT_POSTFIELDS, $request);

       $response = curl_exec($cURLHandle);

       curl_close($cURLHandle);

    Two things needed to be fixed here.  Firstly I was doing nothing when there was an issue here where I really should be replacing this line

       $response = curl_exec($cURLHandle);

    With this

       if( ! $response = curl_exec($cURLHandle))

       {

           trigger_error(curl_error($cURLHandle));

       }

    And secondly it appears the SSL version being used has been modified at the Microsoft end presumably.  By changing this line

       curl_setopt($cURLHandle, CURLOPT_SSLVERSION, 3);

    To version 4 instead of 3 it started working!  So instead of this i've just commented out this line entirely.

    Hope this helps someone else!

  • Andre Margono Profile Picture
    Andre Margono 2,602 on at
    RE: CRM Online SOAP Endpoint

    Btw, which endpoint that you are using for the SOAP call? The 2011 one or 2007 one?

    AFAIK, with the upcoming CRM 2015 release, that might be rolled-out or soon to be to the CRM Online instances, the 2007 endpoint is going to be deprecated.

  • AndrewCampey Profile Picture
    AndrewCampey on at
    RE: CRM Online SOAP Endpoint

    Andre,

    Yeah thought this might be the issue however I have tested this and the username and password work correctly.

  • Andre Margono Profile Picture
    Andre Margono 2,602 on at
    RE: CRM Online SOAP Endpoint

    Not sure whether it might be relevant or not.

    I found one of my integration job with CRM Online was not working after a couple months of the deployment was due to the password expiry of the user that configured for the integration.

  • AndrewCampey Profile Picture
    AndrewCampey on at
    RE: CRM Online SOAP Endpoint

    I need to investigate further to see if there is an error however I haven't caught any SOAP exceptions yet.

    The request for authentication tokens works.  Then any call (trying the WhoAmIRequest in particular) is returning nothing.

    As I said there has been no code change from our end however as its connected to CRM Online i'm guessing there might have been a change on Microsoft's side.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans