<Version>2004</Version> </Code> </Description> <Status><Text>Active</Text></Status> </Problem> </Problems> </Body> </ContinuityOfCareRecord>\'; $responseEntry = $healthService->sendHealthNotice($subject, $body, "html", $ccr);'; } catch (Zend_Gdata_App_Exception $e) { echo 'Error: ' . $e->getMessage(); } echo '<div class="code"><pre>' . htmlentities($snippet) . '</pre></div>'; eval($snippet); echo '<div class="data"><pre>'; echo xmlpp($responseEntry->getXML()); echo '</pre></div>'; // ============================================================================= // Revoke the AuthSub session token // ============================================================================= //$revoked = Zend_Gdata_AuthSub::AuthSubRevokeToken($client->getAuthSubToken(), $client) ? 'yes' : 'no'; //echo '<b>Token revoked</b>: ' . @$revoked; //unset($_SESSION['sessionToken']); ?> </body> </html> <?php function getCurrentUrl() { $phpRequestUri = htmlentities(substr($_SERVER['REQUEST_URI'], 0, strcspn($_SERVER['REQUEST_URI'], "\n\r")), ENT_QUOTES);
} else { $api->setCredentials($_SESSION["UserID"], $_SESSION["Password"]); } $RequestStatusesParams = new RequestStatuses(); /* $RequestStatusesParams->EnvelopeStatusFilter->UserInfo->UserName = $_SESSION["UserName"]; $RequestStatusesParams->EnvelopeStatusFilter->UserInfo->Email = $_SESSION["Email"]; $RequestStatusesParams->EnvelopeStatusFilter->AccountId = $_SESSION["AccountID"]; $RequestStatusesParams->EnvelopeStatusFilter->Statuses->Status = "Any"; */ $RequestStatusParams = new RequestStatus(); $RequestStatusParams->EnvelopeID = $_SESSION["EnvelopeID"]; try { $RequestStatusResponse = $api->RequestStatus($RequestStatusParams); addToLog("API Call - RequestStatus Request", '<pre>' . xmlpp($api->_lastRequest, true) . '</pre>'); addToLog("API Call - RequestStatus Response", '<pre>' . xmlpp($api->__getlastResponse(), true) . '</pre>'); } catch (SoapFault $fault) { $_SESSION["errorMessage"] = $fault; $_SESSION["lastRequest"] = $api->_lastRequest; header("Location: error.php"); die; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <title>InsuranceCo</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript" src="scripts/webservice-status.js"></script>
} $xml = implode("\n", $pretty); return $html_output ? htmlentities($xml) : $xml; } $sessionToken = Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']); $client = Zend_Gdata_AuthSub::getHttpClient($sessionToken); $useH9Sandbox = true; $healthService = new Zend_Gdata_Health($client, 'MyGHAppNamev1.0', $useH9Sandbox); $query = new Zend_Gdata_Health_Query(); $query->setDigest("true"); $profileFeed = $healthService->getHealthProfileFeed($query); $entry = $profileFeed->entry[0]; //To print ccr $ccr = $entry->getCcr(); $xmlStr = $ccr->saveXML($ccr); echo '<p>' . xmlpp($xmlStr, true) . '</p>'; // digest=true was set so we only have 1 entry $allergies = $entry->getCcr()->getAllergies(); $conditions = $entry->getCcr()->getConditions(); $immunizations = $entry->getCcr()->getImmunizations(); $lab_results = $entry->getCcr()->getLabResults(); $medications = $entry->getCcr()->getMedications(); $procedures = $entry->getCcr()->getProcedures(); //An example of using the medications data foreach ($medications as $med) { $xmlStr = $med->ownerDocument->saveXML($med); $filename = 'c:\\Users\\Ravi\\Desktop\\xmldoc1.xml'; // write to file file_put_contents($filename, $xmlStr) or die('Could not write to file'); //echo '<pre>' . xmlpp($xmlStr,true) . '</pre>'; }
<img id="credential_img" src="images/spinner.gif" /><span style="font-size: 0.75em;">(Credential webservice)</span> <a href="sessionlog.php" target="_blank"><img src="images/script.png" style="border: 0px;" /><span style="font-size: 0.75em;">View InsuranceCo Event Log</span></a> </td> </tr> </table> </div> </div> <div class="gutter"></div> <div> <h2>An Error Occurred</h2> <p> <?php echo $error; ?> </p> <p> <?php echo '<pre>' . xmlpp($_SESSION["lastRequest"], true) . '</pre>'; ?> </p> </div> <div class="footer"> InsuranceCo - Docusign </div> </body></html>
<tbody><tr> <td style="background-image: url(images/px.gif); height: 379px;" class="white" width="230" valign="top"> </td> <td style="height: 379px;" valign="top"> <div style="margin:12px; font-size:12px"> <h2>An Error Occurred</h2> <p> <?php echo $error; ?> </p> <p> <?php if (isset($_SESSION["lastRequest"])) { echo xmlpp($_SESSION["lastRequest"]); } ?> </p> </div> </td> </tr> </tbody></table> </td> </tr> <tr> <td height="50" valign="top"> <table style="height: 100%;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr> <td style="background: transparent url(images/px_copy.gif) repeat-x scroll center top; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" class="copy" width="736" valign="top"> <div style="margin: 14px 31px 0px 0px;" align="right">
header("Location: error.php"); die; } // Now that we've sent the envelope, we need to see if we're going to host an embedded signing session. If so, // we'll need to get a RecipientToken for the signing session. The recipientToken is just a url that will open // a signing session for the specified recipient on the envelope. if ($_SESSION["SigningLocation"] == "Embedded") { $RequestRecipientToken = makeRequestRecipientToken(); try { $RequestRecipientTokenResponse = $api->RequestRecipientToken($RequestRecipientToken); $_SESSION["EmbeddedToken"] = $RequestRecipientTokenResponse->RequestRecipientTokenResult; if (isset($_SESSION["debug"]) && $_SESSION["debug"] === true) { addToLog("RequestRecipientToken Request", xmlpp($api->_lastRequest, true)); addToLog("RequestRecipientToken Response", xmlpp($api->__getLastResponse(), true)); } } catch (SoapFault $fault) { $_SESSION["errorMessage"] = $fault; if (isset($_SESSION["debug"]) && $_SESSION["debug"] === true) { addToLog("CreateAndSendEnvelope Request", xmlpp($api->_lastRequest, true)); addToLog("CreateAndSendEnvelope Response", xmlpp($api->__getLastResponse(), true)); } header("Location: error.php"); die; } $RedirectPage = "embeddedhost.php"; } else { // if we aren't hosting the signing, we'll just display a page to the user informing them of that. $RedirectPage = "remotesign.php"; } header('Location: ' . $RedirectPage); }
public function View2XML() { $doc = $this->GetDocDocument(); $docElem = $this->ViewObj2XMLElement($this->m_Object); $doc->appendChild($docElem); //$xmlStr = str_replace(array('#object_type#','#object_name#','#object_file#'),array($this->m_ObjType,$this->m_Object->m_Name,$this->m_RelXmlFile),$this->comments); $xmlStr = xmlpp($doc->saveXML()); return $xmlStr; }