एमएससीआरएम 2013 और शायद 2011 वेबसेव प्रमाणीकरण के लिए एनटीएलएम का उपयोग कर रहे हैं।
डेटा क्वेरी के लिए, आप यूआरएल का उपयोग कर सकते इनकोडिंग FetchXML
http://msdn.microsoft.com/en-us/library/gg328117.aspx
आप उन्नत खोज में XML निर्यात करके सीआरएम से सही एक्सएमएल प्राप्त कर सकते हैं और उदाहरण के लिए RetrieveMultiple विधि के साथ क्वेरी निष्पादित करें।
मैं एसओएपी लिफाफा और कर्ल पोस्ट क्वेरी के साथ एक उदाहरण जोड़ रहा हूं, एनटीएलएम के साथ प्रमाणित।
<?php
$soap_envelope = <<<END
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<RetrieveMultiple xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<query i:type="a:FetchExpression" xmlns:a="http://schemas.microsoft.com/xrm/2011/Contracts">
<a:Query><fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
<entity name='contact'>
<attribute name='fullname' />
<attribute name='parentcustomerid' />
<attribute name='telephone1' />
<attribute name='emailaddress1' />
<attribute name='contactid' />
<order attribute='fullname' descending='false' />
<filter type='and'>
<condition attribute='ownerid' operator='eq-userid' />
<condition attribute='statecode' operator='eq' value='0' />
</filter>
</entity>
</fetch></a:Query>
</query>
</RetrieveMultiple>
</s:Body>
</s:Envelope>
END;
$soap_action = 'http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/RetrieveMultiple';
$req_location = 'http://crm.server.local/YourOrganization/XRMServices/2011/Organization.svc/web';
$headers = array(
'Method: POST',
'Connection: Keep-Alive',
'User-Agent: PHP-SOAP-CURL',
'Content-Type: text/xml; charset=utf-8',
'SOAPAction: "'.$soap_action.'"'
);
$user = 'YOURDOMAIN\YOURUSERNAME';
$password = '**********';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $req_location);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $soap_envelope);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
curl_setopt($ch, CURLOPT_USERPWD, $user.':'.$password);
$response = curl_exec($ch);
if(curl_exec($ch) === false)
{
echo 'Curl error: ' . curl_error($ch);
}
else
{
var_dump($response);
}
जांच भी इस सवाल: http://stackoverflow.com/questions/16890036/dynamically-pull-data-from-dynamics-crm-online –
मुझे समझ नहीं आता, वहाँ पहले से ही वेब द्वारा उपलब्ध कराई गई सेवाओं रहे हैं सीआरएम, मुझे यह जानने की जरूरत है कि उन्हें php के साथ कैसे उपभोग करें। – jvo
मेरा केवल एक सुझाव था, आप किसी भी भाषा द्वारा सीआरएम 2011 वेब सेवाओं का उपभोग कर सकते हैं, लेकिन वेब सेवा बनाने का आसान तरीका यह है कि प्रॉक्सी के रूप में कार्य करें। –