MSD SOAP Web API Service

Cannot connect!

\n"; } else { echo "

Successful connection to the service...

\n"; $cmd = 'msdSSM'; $sessionid = 'my_php_session_number'; $query = ''. ''. 'PDB entry'. '1sar'. ''. ''. 'PDB archive'. ''. ''. 'Chain(s)'. '*(all)'. ''. '70'. '70'. 'Yes'. 'Yes'. 'Yes'. 'Yes'. 'Normal'. 'RMSD'. ''; $arrayofstrings = array ($query , $sessionid ); $params = array('numofpars' => '2' , 'inparams' => $arrayofstrings ); $namespace = 'urn:msd_soap_service'; echo "

Calling msdSSM() method...

\n"; $result = $sc->call($cmd, $params, $namespace); echo "

"; if (isset($fault)) { print_r($fault); } else {echo "

msdSSM() method called successfully...

\n"; print_r($result); } echo "

\n"; $params = array('diyf' => '0' , 'sessionid' => $sessionid); $cmd = 'msdGetSoapBase64Data'; echo "

Calling msdGetSoapBase64Data() method...

\n"; $result = $sc->call($cmd, $params, $namespace); /*$theXML = base64_decode($result);*/ $theXML = $result; echo "

"; if (isset($fault)) { print_r($fault); } else { echo "

msdGetSoapBase64Data() method called successfully...

\n"; echo "

Here is the Query's result...

\n"; echo ''.$theXML.''; //$xmlFName = "/somewhere/you/have/write-access/my_result.xml"; $xmlFName = "/homes/sobhany/public_html/htdocs/my_result.xml"; // Write the Binary Data to the location specified above. if ($fp = fopen($xmlFName,"w")){ fwrite($fp, $theXML); fclose( $fp ); print "

Result XML file created.

\n"; } else echo "

Result XML file can not be crated.

\n"; } echo "

\n"; $params = array('sessionid' => $sessionid); $cmd = 'msdSSMPurge'; echo "

Calling msdSSMPurge() method...

\n"; $result = $sc->call($cmd, $params, $namespace); echo "

"; if (isset($fault)) { print_r($fault); } else {echo "

msdSSMPurge() method called successfully...

\n"; print_r($result); } echo "

\n"; unset($sc); } ?>