<?php
require_once 'SOAP/Client.php';
require_once "slides/mdb/scripts/mdb_tests.cfg";
$SOAP_OBJECT_STRUCT=false;
$url = MDB_SERVER.SOAP_URI;
$ns = 'urn:MDB_SOAP_Server';
$c = new SOAP_Client($url);
function niceOut($obj) {
echo "<table border='1'>\n<tr>\n<td bgcolor='#eeeeee'>\n";
print_rec($obj);
echo "\n</td>\n</tr>\n</table>\n";
}
function print_rec($obj) {
if (is_string($obj)) {
echo "<pre>\n$obj\n</pre>\n";
} else {
foreach ($obj as $key=>$val) {
if (is_array($val) || is_object($val)) {
echo "<b>$key</b>:\n".print_rec($val)."<br>\n";
} else {
echo "<b>$key</b>: $val<br>\n";
}
}
}
}
?>
<h2>Excercizing the sql method</h2>
[query: 'select source_id,description from protein limit 3']
<?php
$ret = $c->call('sql',array('query'=>'select source_id,description from protein limit 3'),$ns);
niceOut($ret);
?>
<hr>
<h2>Making a deliberate error using the metallopdb method</h2>
[metal: zn][mode: first][count: -3]
<?php
$ret = $c->call('metallopdb',array('metal'=>'zn', 'mode'=>'first','count'=>-3),$ns);
if (PEAR::isError($ret))
echo "<br><b>OOPS we got an error</b>\n";
niceOut($ret);
?>
<hr>
<h2>Using the metallopdb method correctly</h2>
[metal:zn][mode: random][count: 3]
<?php
$ret = $c->call('metallopdb', array('metal'=>'zn', 'mode'=>'random',
'count'=>3), $ns);
niceOut($ret);
?>
<hr>
<h2>Using the rssmetallopdb method</h2>
[metal: zn][mode: last][count: 3]
<?php
$ret = $c->call('rssmetallopdb', array('metal'=>'zn', 'mode'=>'last', 'count'=>3), $ns);
niceOut(htmlspecialchars(base64_decode($ret)));
?>
source_id: 1aoo description: Header: [metallothionein 08-jul-97 1aoo] Title: [ag-substituted metallothionein from saccharomyces cerevisiae, nmr, minimized average structure] Compound: [mol_id: 1; molecule: ag-metallothionein; chain: null; synonym: ag-mt; biological_unit: monomer; other_details: ag(i) substituted] Source: [mol_id: 1; organism_scientific: saccharomyces cerevisiae; organism_common: baker's yeast; strain: 301n] Keywords: [copper detoxification, metal-thiolate cluster] 0: source_id: 1aqq description: Header: [metallothionein 31-jul-97 1aqq] Title: [ag-substituted metallothionein from saccharomyces cerevisiae, nmr, 10 structures] Compound: [mol_id: 1; molecule: ag-metallothionein; chain: null; synonym: ag-mt; biological_unit: monomer; other_details: ag(i) substituted] Source: [mol_id: 1; organism_scientific: saccharomyces cerevisiae; organism_common: baker's yeast; strain: 301n] Keywords: [copper detoxification, metal-thiolate cluster] 1: source_id: 2aw0 description: Header: [copper transport 08-oct-97 2aw0] Title: [fourth metal-binding domain of the menkes copper-transporting atpase, nmr, 20 structures] Compound: [mol_id: 1; molecule: menkes copper-transporting atpase; chain: null; fragment: fourth metal-binding domain; ec: 3.6.1.36; engineered: yes; biological_unit: monomer; other_details: ag(i)-bound state] Source: [mol_id: 1; organism_scientific: homo sapiens; organism_common: human; expression_system: escherichia coli] Keywords: [copper-binding domain, hydrolase, copper transport] 2: |
error_message_prefix: PHP mode: 1 level: 1024 code: SOAP-ENV:Server message: Parameter count must be an integer > 0, value sent: -3 userinfo: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46 file: /home/server/php/lib/php/SOAP/Fault.php line: 49 function: pear_error class: pear_error type: :: 0: Parameter count must be an integer > 0, value sent: -3 1: SOAP-ENV:Server 2: 3: 4: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46 args: 0: file: /home/server/php/lib/php/SOAP/Base.php line: 320 function: soap_fault class: soap_fault type: -> 0: Parameter count must be an integer > 0, value sent: -3 1: SOAP-ENV:Server 2: PHP 3: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46 4: 5: args: 1: file: /home/server/php/lib/php/SOAP/Client.php line: 508 function: _raisesoapfault class: soap_client type: -> 0: Parameter count must be an integer > 0, value sent: -3 1: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46 2: PHP 3: SOAP-ENV:Server args: 2: file: /home/server/php/lib/php/SOAP/Client.php line: 476 function: __decoderesponse class: soap_client type: -> value: SOAP-ENV:Server name: faultcode type: QName namespace: http://schemas.xmlsoap.org/soap/envelope/ type_namespace: http://www.w3.org/2001/XMLSchema attributes: arrayType: options: name: faultcode ns: namespace: http://schemas.xmlsoap.org/soap/envelope/ nqn: name: QName ns: namespace: http://www.w3.org/2001/XMLSchema tqn: type_prefix: 0: value: Parameter count must be an integer > 0, value sent: -3 name: faultstring type: string namespace: http://schemas.xmlsoap.org/soap/envelope/ type_namespace: http://www.w3.org/2001/XMLSchema attributes: arrayType: options: name: faultstring ns: namespace: http://schemas.xmlsoap.org/soap/envelope/ nqn: name: string ns: namespace: http://www.w3.org/2001/XMLSchema tqn: type_prefix: 1: value: PHP name: faultactor type: anyURI namespace: http://schemas.xmlsoap.org/soap/envelope/ type_namespace: http://www.w3.org/2001/XMLSchema attributes: arrayType: options: name: faultactor ns: namespace: http://schemas.xmlsoap.org/soap/envelope/ nqn: name: anyURI ns: namespace: http://www.w3.org/2001/XMLSchema tqn: type_prefix: 2: value: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46 name: detail type: string namespace: http://schemas.xmlsoap.org/soap/envelope/ type_namespace: http://www.w3.org/2001/XMLSchema attributes: arrayType: options: name: detail ns: namespace: http://schemas.xmlsoap.org/soap/envelope/ nqn: name: string ns: namespace: http://www.w3.org/2001/XMLSchema tqn: type_prefix: 3: value: name: Fault type: Struct namespace: http://schemas.xmlsoap.org/soap/envelope/ type_namespace: attributes: arrayType: options: name: Fault ns: namespace: http://schemas.xmlsoap.org/soap/envelope/ nqn: name: Struct ns: namespace: tqn: type_prefix: 0: args: 3: file: /home/server/php/lib/php/SOAP/Client.php line: 245 function: __parse class: soap_client type: -> 0: 1: UTF-8 2: args: 4: file: /home/jesus/devel/php/presentations/slides/mdb/test_soap.xml line: 45 function: call class: soap_client type: -> 0: metallopdb metal: zn mode: first count: -3 1: 2: urn:MDB_SOAP_Server args: 5: backtrace: callback: |
metal: zn source_id: 1eb6 revision_date: 2001/11/23 deposition_date: 2001/07/19 expdata: x-ray diffraction r_value: 0.10 resolution: 1.00 authors: k.e.mcauley,y.jia-xing,e.j.dodson,j.lehmbeck, p.r.ostergaard,k.s.wilson description: Header: [hydrolase 19-jul-01 1eb6] Title: [deuterolysin from aspergillus oryzae] Compound: [mol_id: 1; molecule: neutral protease ii; synonym: npii, deuterolysin; chain: a; ec: 3.4.24.39] Source: [mol_id: 1; organism_scientific: aspergillus oryzae] Keywords: [zinc, neutral protease ii, hydrolase] 0: metal: zn source_id: 1qf2 revision_date: 2000/12/20 deposition_date: 1999/04/06 expdata: x-ray diffraction r_value: 0.16 resolution: 2.06 authors: j.-f.gaucher,m.selkti,g.tiraboschi,t.prange,b.p.roques, a.tomas,m.c.fournie-zaluski description: Header: [hydrolase 06-apr-99 1qf2] Title: [thermolysin (e.c.3.4.24.27) complexed with (2-sulphanyl-3- phenylpropanoyl)-gly-(5-phenylproline). parameters for zn- monodentation of mercaptoacyldipeptides in metalloendopeptidase] Compound: [mol_id: 1; molecule: thermolysin; chain: a; ec: 3.4.24.27] Source: [mol_id: 1; organism_scientific: bacillus thermoproteolyticus] Keywords: [zn metallopeptidase] 1: metal: zn source_id: 1xuf revision_date: 1998/12/16 deposition_date: 1997/10/10 expdata: x-ray diffraction r_value: 0.15 resolution: 2.04 authors: b.a.katz,j.m.clark,j.s.finer-moore,t.e.jenkins,c.r.johnson, m.j.rose,c.luong,w.r.moore,r.m.stroud description: Header: [serine protease 10-oct-97 1xuf] Title: [trypsin-babim-zn+2, ph 8.2] Compound: [mol_id: 1; molecule: trypsin; chain: null; ec: 3.4.21.4; other_details: trypsin/zn+2/small molecule ligand complex] Source: [mol_id: 1; organism_scientific: bos taurus; organism_common: bovine] Keywords: [trypsin-zn+2-small molecule ligand, designed small molecule ligand with nanomolar affinity] 2: |
<?xml version="1.0" encoding="iso-8859-1"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:mn="http://usefulinc.com/rss/manifest/" xmlns:dc="http://purl.org/dc/elements/1.1/" > <channel rdf:about="http://metallo.scripps.edu/services/soap.php"> <title>MDB - The Metalloprotein Database and Browser</title> <link>http://metallo.scripps.edu</link> <description>Data retrieved using the MDB API</description> <items> <rdf:Seq> <rdf:li rdf:resource="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9nse&metal[]=zn" /> <rdf:li rdf:resource="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9icv&metal[]=zn" /> <rdf:li rdf:resource="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9ici&metal[]=zn" /> </rdf:Seq> </items> </channel> <item rdf:about="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9nse&metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9nse&metal[]=zn</link> <title>(Zn) 9nse [deposited on: 1999/01/13, revised on: 2000/10/25]</title> <description>Header: [oxidoreductase 13-jan-99 9nse] Title: [bovine endothelial nitric oxide synthase, ethyl- isoselenourea complex] Compound: [mol_id: 1; molecule: nitric oxide synthase; chain: a, b; fragment: heme domain; synonym: nos, enos; ec: 1.14.13.39; engineered: yes] Source: [mol_id: 1; organism_scientific: bos taurus; organism_common: bovine; cell: endothelial; expression_system: escherichia coli; expression_system_common: bacteria; expression_system_strain: bl21] Keywords: [heme protein, tetrahydrobiopterin] Authors[h.li,c.s.raman,p.martasek,v.kral,b.s.s.masters,t.l.poulos] ExpData[x-ray diffraction] R-value[0.20] Resolution[2.24]</description> </item> <item rdf:about="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9icv&metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9icv&metal[]=zn</link> <title>(Zn) 9icv [deposited on: 1995/12/16, revised on: 1996/11/15]</title> <description>Header: [complex (nucleotidyltransferase/dna) 16-dec-95 9icv] Title: [dna polymerase beta (pol b) (e.c.2.7.7.7) complexed with seven base pairs of dna; soaked in the presence of datp (0.1 millimolar) and zncl2 (0.2 millimolar)] Compound: [mol_id: 1; molecule: dna polymerase beta; chain: a; ec: 2.7.7.7; engineered: yes; mol_id: 2; molecule: dna (5'-d(*cp*ap*tp*tp*ap*gp*a)-3') (dot) (5'-d(*tp*cp*tp*ap*ap*tp*g)-3'); chain: t, p; engineered: yes; other_details: soaked in the presence of datp (0.1 millimolar) and zncl2 (0.2 millimolar)] Source: [mol_id: 1; organism_scientific: homo sapiens; organism_common: human; expression_system: escherichia coli; mol_id: 2; synthetic: yes] Keywords: [dna replication, dna repair, nucleotidyltransferase, complex (nucleotidyltransferase/dna)] Authors[h.pelletier,m.r.sawaya] ExpData[x-ray diffraction] R-value[0.18] Resolution[2.70]</description> </item> <item rdf:about="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9ici&metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9ici&metal[]=zn</link> <title>(Zn) 9ici [deposited on: 1995/12/15, revised on: 1996/11/15]</title> <description>Header: [complex (nucleotidyltransferase/dna) 15-dec-95 9ici] Title: [dna polymerase beta (pol b) (e.c.2.7.7.7) complexed with seven base pairs of dna; soaked in the presence of dttp (1 millimolar) and zncl2 (1 millimolar)] Compound: [mol_id: 1; molecule: dna polymerase beta; chain: a; ec: 2.7.7.7; engineered: yes; mol_id: 2; molecule: dna (5'-d(*cp*ap*tp*tp*ap*gp*a)-3') (dot) (5'-d(*tp*cp*tp*ap*ap*tp*g)-3'); chain: t, p; engineered: yes; other_details: soaked in the presence of dttp (1 millimolar) and zncl2 (1 millimolar)] Source: [mol_id: 1; organism_scientific: homo sapiens; organism_common: human; expression_system: escherichia coli; mol_id: 2; synthetic: yes] Keywords: [dna replication, dna repair, nucleotidyltransferase, complex (nucleotidyltransferase/dna)] Authors[h.pelletier,m.r.sawaya] ExpData[x-ray diffraction] R-value[0.17] Resolution[3.10]</description> </item> <rdf:Description rdf:ID="manifest"> <mn:channels> <rdf:Seq> <rdf:li rdf:resource="http://metallo.scripps.edu/services/soap.php" /> </rdf:Seq> </mn:channels> </rdf:Description> </rdf:RDF> |