00001 #!perl
00002
00003 use SOAP::Lite;
00004 my $service = SOAP::Lite
00005 ->uri('urn:msd_soap_service')
00006 ->proxy('http:
00007 # -> service('http:
00008
00009 my $query = '<SSMInput> <query> <type>PDB entry</type> <pdbcode>1sar</pdbcode>'.
00010 '</query> <target> <type>PDB archive</type>'.
00011 '</target> <selection> <type>Chain(s)</type>'.
00012 '<chains>*(all)</chains> </selection> <percent1>70</percent1>'.
00013 '<percent2>70</percent2> <sepchains>Yes</sepchains>'.
00014 '<connectivity>Yes</connectivity> <bestmatch>Yes</bestmatch>'.
00015 '<uniquematch>Yes</uniquematch> <precision>Normal</precision>'.
00016 '<sorting>RMSD</sorting> </SSMInput>';
00017
00018 my $sessionid = 'mysessionnumber';
00019 my $array = [$query , $sessionid];
00020 print "\nCalling method: msdSSM()\n";
00021 my $result1 = $service->msdSSM(SOAP::Data->name('numofpars' => 2),
00022 SOAP::Data->name('inparams' => $array));
00023 unless ($result1->fault) {
00024 print "\nmsdSSM() called successfully.\n";
00025 print $result1->result();
00026 }else{
00027 print join ', ',
00028 $result1->faultcode,
00029 $result1->faultstring;
00030 }
00031 for ($i=1; $i > 0 ; $i++)
00032 { my $result2 = $service->msdGetBinXml(SOAP::Data->name('diyf')->type('xsd:int')->value(1),
00033 SOAP::Data->name('sessionid')->type('xsd:string')->value($sessionid));
00034 unless ($result2->fault || ($result2->faultstring != 'Result fille not ready')) {
00035 $i=-1;
00036 print "\nResult file created successfully:\n";
00037 print $result2->result();
00038 }else{
00039 print join ', ',
00040 "\nXML File not ready...retry: $i ",
00041 $result2->faultcode,
00042 $result2->faultstring;
00043 }
00044 sleep(5);
00045 }
00046