
Hi
I am trying to retrieve all the entities and getting error. Need help in integrating microsoft dynamic crm in php.
Below is my code. Please help me correcting it.
$xml = " <s:Body>";
$xml .= " <execute xmlns:i=\"www.w3.org/.../XMLSchema-instance\" xmlns=\"schemas.microsoft.com/.../Services\">";
$xml .= " <request i:type=\"a:RetrieveAllEntitiesRequest\" xmlns:a=\"schemas.microsoft.com/.../Contracts\">";
$xml .= " <a:parameters xmlns:b=\"schemas.datacontract.org/.../System.Collections.Generic\">";
$xml .= " <a:keyvaluepairofstringanytype>";
$xml .= " <b:key>EntityFilters</b:key>";
$xml .= " <b:value i:type=\"c:EntityFilters\" xmlns:c=\"schemas.microsoft.com/.../Metadata\">Entity</b:value>";
$xml .= " </a:keyvaluepairofstringanytype>";
$xml .= " <a:keyvaluepairofstringanytype>";
$xml .= " <b:key>RetrieveAsIfPublished</b:key>";
$xml .= " <b:value i:type=\"c:boolean\" xmlns:c=\"schemas.microsoft.com/.../Arrays\">true</b:value>";
$xml .= " </a:keyvaluepairofstringanytype>";
$xml .= " </a:parameters>";
$xml .= " <a:requestid i:nil=\"true\">";
$xml .= " <a:requestname>RetrieveAllEntities</a:requestname>";
$xml .= " </a:requestid>";
$xml .= " </request>";
$xml .= " </execute>";
$xml .= " </s:Body>";
$executeSoap = new CrmExecuteSoap ();
$response = $executeSoap->ExecuteSOAPRequest ( $authHeader, $xml, $url );
$responsedom = new DomDocument ();
$responsedom->loadXML ( $response );
echo "<pre>";
print_r($responsedom);
echo "</pre>";
this is the error I am getting
[textContent] => schemas.microsoft.com/.../faulturn:uuid:{530CEDCF-4076-4CF5-E81B-674B85807CD1}00000000-0000-0000-0000-0000000000002015-11-03T06:56:11.208Z2015-11-03T07:01:11.208Zs:Receivera:InternalServiceFaultThe server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.
*This post is locked for comments
I have the same question (0)Hello,
In this situation i suggest you to create a C# Web Service that will act as a bridge between CRM and your php code.
The Web Service written in .NET so can easily pull the data from CRM and because is a Web Service you can consume it by any platform
As for as i know there is no complete library out there for connecting to CRM using PHP
stackoverflow.com/.../integrating-microsoft-dynamic-2013-or-2015-with-php