/** * Send a RetrieveMultiple request to the Dynamics CRM server * and return the results as raw XML * This is particularly useful when debugging the responses from the server * * @param string $queryXML the Fetch XML string (as generated by the Advanced Find tool on Microsoft Dynamics CRM 2011) * @param string $pagingCookie if multiple pages are returned, send the paging cookie to get pages 2 and onwards. Use NULL to get the first page * @param integer $limitCount maximum number of records to be returned per page * * @return string the raw XML returned by the server, including all SOAP Envelope, Header and Body data. */ public function retrieveMultipleRaw($queryXML, $pagingCookie = null, $limitCount = null, $pageNumber = null) { /* Send the sequrity request and get a security token */ $securityToken = $this->authentication->getOrganizationSecurityToken(); /* Generate the XML for the Body of a RetrieveMultiple request */ $executeNode = SoapRequestsGenerator::generateRetrieveMultipleRequest($queryXML, $pagingCookie, $limitCount, $pageNumber); /* Turn this into a SOAP request, and send it */ $retrieveMultipleSoapRequest = $this->generateSoapRequest($this->settings->organizationUrl, $this->soapActions->getSoapAction('organization', 'RetrieveMultiple'), $securityToken, $executeNode); /* Execute request to Dynamics CRM Soap web service and get response */ return self::getSoapResponse($this->settings->organizationUrl, $retrieveMultipleSoapRequest); }