cvs: presentations / sdphp_webservices.xml /slides/sdphp sdphp_logo_small.png ws_aslibrary.xml ws_definition.xml ws_glossary.xml ws_mdballapis.xml
ws_mdbasexample.xml ws_protocols.xml ws_ref-libraries.xml ws_ref-moreinfo.xml ws_ref-specs.xml ws_ref-talks-articles.xml ws_references.xml
ws_rest-example.xml ws_rest-xml.xml ws_rest.xml ws_soap-example.xml ws_soap.xml ws_soap2.xml ws_title.xml ws_toc.xml ws_wddx.xml ws_whyuse.xml
ws_wsdl.xml ws_xmlrpc-example.xml ws_xmlrpc.xml ws_xmlrpc2.xml /slides/sdphp/misc GoogleSearch.wsdl /slides/sdphp/output exwddx.php myown.xml
php_google.out rest-example.out test_soap_out.html wddx_example.xml xmlrpc_api_out.html xmlrpc_method_sql_out.html /slides/sdphp/scripts
ex_php_google.php rest-example.php ws_rest_sample_client.php ws_rest_sample_server.php ws_util_functions.php ws_xmlrpc_sample_client.php
ws_xmlrpc_sample_server.php
| From: | Jesus M. Castagnetto | Date: | Tue, 25 May 2004 20:44:26 +0000 |
| Subject: | cvs: presentations / sdphp_webservices.xml /slides/sdphp sdphp_logo_small.png ws_aslibrary.xml ws_definition.xml ws_glossary.xml ws_mdballapis.xml ws_mdbasexample.xml ws_protocols.xml ws_ref-libraries.xml ws_ref-moreinfo.xml ws_ref-specs.xml ws_ref-talks-articles.xml ws_references.xml ws_rest-example.xml ws_rest-xml.xml ws_rest.xml ws_soap-example.xml ws_soap.xml ws_soap2.xml ws_title.xml ws_toc.xml ws_wddx.xml ws_whyuse.xml ws_wsdl.xml ws_xmlrpc-example.xml ws_xmlrpc.xml ws_xmlrpc2.xml /slides/sdphp/misc GoogleSearch.wsdl /slides/sdphp/output exwddx.php myown.xml php_google.out rest-example.out test_soap_out.html wddx_example.xml xmlrpc_api_out.html xmlrpc_method_sql_out.html /slides/sdphp/scripts ex_php_google.php rest-example.php ws_rest_sample_client.php ws_rest_sample_server.php ws_util_functions.php ws_xmlrpc_sample_client.php ws_xmlrpc_sample_server.php |
||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-990@lists.php.net to get a copy of this message | ||
jmcastagnetto Tue May 25 16:44:26 2004 EDT
Added files:
/presentations sdphp_webservices.xml
/presentations/slides/sdphp sdphp_logo_small.png ws_aslibrary.xml
ws_definition.xml ws_glossary.xml
ws_mdballapis.xml ws_mdbasexample.xml
ws_protocols.xml ws_ref-libraries.xml
ws_ref-moreinfo.xml ws_ref-specs.xml
ws_ref-talks-articles.xml
ws_references.xml ws_rest-example.xml
ws_rest-xml.xml ws_rest.xml
ws_soap-example.xml ws_soap.xml
ws_soap2.xml ws_title.xml ws_toc.xml
ws_wddx.xml ws_whyuse.xml ws_wsdl.xml
ws_xmlrpc-example.xml ws_xmlrpc.xml
ws_xmlrpc2.xml
/presentations/slides/sdphp/misc GoogleSearch.wsdl
/presentations/slides/sdphp/output exwddx.php myown.xml
php_google.out rest-example.out
test_soap_out.html
wddx_example.xml
xmlrpc_api_out.html
xmlrpc_method_sql_out.html
/presentations/slides/sdphp/scripts ex_php_google.php
rest-example.php
ws_rest_sample_client.php
ws_rest_sample_server.php
ws_util_functions.php
ws_xmlrpc_sample_client.php
ws_xmlrpc_sample_server.php
Log:
Updates to some SDPHP talks and a new short overview of web services
http://cvs.php.net/co.php/presentations/sdphp_webservices.xml?r=1.1&p=1 Index: presentations/sdphp_webservices.xml +++ presentations/sdphp_webservices.xml <presentation template="php2" titlecolor="#1111aa" logo1="presentations/slides/sdphp/images/testsdphplogo.png" navbarbackground="#ffffff" navbarheight="4.1em" > <!-- navbarbackground="url(images/trans-ffffff.png)" --> <topic>Web Services</topic> <title>Overview of Web Services</title> <subtitle>or "A Web Service by any other name... REST, XML-RPC, SOAP"</subtitle> <!-- subtitle>Understanding the alphabet soup: REST, XML-RPC, SOAP</subtitle --> <event>SDPHP monthly meeting</event> <location>San Diego</location> <url>http://www.sdphp.net/</url> <date>May 6, 2004</date> <speaker>Jesus M. Castagnetto</speaker> <email>jmcastagnetto@php.net</email> <slide>slides/sdphp/ws_title.xml</slide> <slide>slides/sdphp/ws_toc.xml</slide> <chapter title='Introduction'> <slide>slides/sdphp/ws_definition.xml</slide> <slide>slides/sdphp/ws_whyuse.xml</slide> <slide>slides/sdphp/ws_aslibrary.xml</slide> <slide>slides/sdphp/ws_protocols.xml</slide> </chapter> <chapter title="REST"> <slide>slides/sdphp/ws_rest.xml</slide> <slide>slides/sdphp/ws_rest-xml.xml</slide> <slide>slides/sdphp/ws_rest-example.xml</slide> </chapter> <chapter title="XML-RPC"> <slide>slides/sdphp/ws_xmlrpc.xml</slide> <slide>slides/sdphp/ws_xmlrpc2.xml</slide> <slide>slides/sdphp/ws_xmlrpc-example.xml</slide> </chapter> <chapter title="SOAP"> <slide>slides/sdphp/ws_soap.xml</slide> <slide>slides/sdphp/ws_soap2.xml</slide> <slide>slides/sdphp/ws_wsdl.xml</slide> <slide>slides/sdphp/ws_soap-example.xml</slide> </chapter> <chapter title='MDB Services'> <slide>slides/sdphp/ws_mdbasexample.xml</slide> <slide>slides/sdphp/ws_mdballapis.xml</slide> </chapter> <slide>slides/sdphp/ws_glossary.xml</slide> <slide>slides/sdphp/ws_ref-libraries.xml</slide> <slide>slides/sdphp/ws_ref-moreinfo.xml</slide> </presentation> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_aslibrary.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_aslibrary.xml +++ presentations/slides/sdphp/ws_aslibrary.xml <slide title='WS as library'> <image align='center' filename='images/local_extrnl_libs.png'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_definition.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_definition.xml +++ presentations/slides/sdphp/ws_definition.xml <slide title='What & How'> <break lines='2'/> <blurb title='What is a web service?'> Basically, a *web service* is an application with which other applications can communicate over via a network, often using XML to encapsulate data and context, and HTTP as the transport layer. </blurb> <break lines='2'/> <blurb title='How do we expose a Web Service?'> There are several ways (protocols) we can expose our web services to the rest of the world, from a the minimalistic approach of the "RESTafarians", to using XML-RPC, to SOAP and all its accompanying specifications (UDDI, WSDL, WS-Security, WS-Context, etc.) </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_glossary.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_glossary.xml +++ presentations/slides/sdphp/ws_glossary.xml <slide title='Glossary'> <list> <bullet>*REST*: REpresentational State Transfer (the architecture style of the Net)</bullet> <bullet>*XML-RPC*: XML Remote Procedure Call</bullet> <bullet>*SOAP*: Simple Object Access Protocol</bullet> <bullet>*WSDL*: Web Services Description Language</bullet> <bullet>*HTTP*: HyperText Transfer Protocol</bullet> <bullet>*UDDI*: Universal Description, Discovery, and Integration</bullet> <bullet>*CORBA*: Common Object Request Broker Architecture</bullet> <bullet>*IDL*: (CORBA's) Interface Description Language</bullet> <bullet>*RMI*: (Java's) Remote Method Invocation</bullet> <bullet>*JINI*: Sun's Java-based system to network devices and applications (includes Javaspaces, JINI Extensible Remote Incovation, etc.)</bullet> <bullet>*SOA*: Services Oriented Architecture</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_mdballapis.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_mdballapis.xml +++ presentations/slides/sdphp/ws_mdballapis.xml <slide title='MDB services'> <list title='REST' fontsize='2.5em'> <bullet> URL: *http://metallo.scripps.edu/services/rest.php* </bullet> <bullet> Functions: *sql* and *metallopdb* </bullet> <bullet> Example: http://metallo.scripps.edu/services/rest.php?func=metallopdb &metal=zn&mode=new&count=5&format=rss </bullet> <!-- bullet> *sql* Parameters: _query_ = urlencoded SQL query; [_format_] = csv (default), wddx, serialized, table. Example: http://metallo.scripps.edu/services/rest.php?function=sql&query=select +source_id+from+protein+limit+10&format=wddx </bullet --> <!-- bullet> *metallopdb* Parameters: _metal_ = atomic symbol for the metal; [_mode_]: one of: first (default), last, random, new; [_count_]: how many PDB entries to retrieve (default = 5); [_format_]: csv (default), wddx, rss, serialized </bullet --> </list> <list title='XML-RPC' fontsize='2.5em'> <bullet> URL: *http://metallo.scripps.edu/services/xmlrpc.php* </bullet> <bullet> struct *method.sql*(string query) <!-- General function to query the MDB database server. Accepts a valid SQL query ("SELECT", "SHOW", or "DESCRIBE" statements only), and returns the resulting rows as a structure. --> </bullet> <bullet> struct *method.metallopdb*(string metal, string mode, int count, string format) <!-- Specialized function to retrieve a list of PDB structures containing a particular metal ion, as indexed in the MDB. The retrieval mode can be one of "first" (default) to get the first "n" PDB ids (sorted alphabetically), "last" to get the last "n" ids, "random" to get "n" random entries, and "new" to ge the newest "n" entries released/indexed. The number of entries to retrieve is set using "count". The result can be returned as XML-RPC structure, WDDX packet or RSS document --> </bullet> </list> <list title='SOAP' fontsize='2.5em'> <bullet> URL: *http://metallo.scripps.edu/services/soap.php* </bullet> <bullet> Methods: *sql*, *metallopdb*, *rssmetallopdb* </bullet> <!-- bullet> *sql* : allows for SELECT, SHOW, DESCRIBE SQL queries </bullet> <bullet> *metallopdb* : information about metal containing proteins given a metal, a mode, and a count </bullet> <bullet> *rssmetallopdb* : similar to the _metallopdb_ with an RSS document as output. </bullet --> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_mdbasexample.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_mdbasexample.xml +++ presentations/slides/sdphp/ws_mdbasexample.xml <slide title='Multi-WS'> <blurb title='The MDB case'> A set of simple modular functions that can be wrapped in each of the services. </blurb> <image align='center' filename='images/mdbapi_impl.png'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_protocols.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_protocols.xml +++ presentations/slides/sdphp/ws_protocols.xml <slide title='Protocols'> <break lines='4'/> <blurb title='The Good, The Bad, and The Ugly'> There are at least 3 ways to expose a web service. Two are what we understand as communication/transport protocols (XML-RPC and SOAP), and the other is more a "way of doing things" (REST). </blurb> <blurb> You decide which is which %:-)% </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_ref-libraries.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_ref-libraries.xml +++ presentations/slides/sdphp/ws_ref-libraries.xml <slide title='Libraries'> <list title='REST' fontsize='2.5em'> <bullet>PEAR::XML_Wddx, http://pear.php.net/package/XML_Wddx</bullet> <bullet>PHP's wddx extension (--enable-wddx)</bullet> </list> <list title='XML-RPC' fontsize='2.5em'> <bullet>PEAR::XML_RPC, http://pear.php.net/package/XML_RPC</bullet> <bullet>Useful Inc's XML-RPC, http://xmlrpc.usefulinc.com/php.html </bullet> <bullet>PHP's xmlrpc extension (--with-xmlrpc)</bullet> <bullet>More implementations: http://www.xmlrpc.com/directory/1568/implementations</bullet> </list> <list title='SOAP' fontsize='2.5em'> <bullet>PEAR::SOAP, http://pear.php.net/package/SOAP</bullet> <bullet>NuSOAP, http://dietrich.ganx4.com/nusoap/</bullet> <bullet>PHP5's SOAP extension (--enable-soap)</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_ref-moreinfo.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_ref-moreinfo.xml +++ presentations/slides/sdphp/ws_ref-moreinfo.xml <slide title='More refs'> <list fontsize='2.5em' title='Basic specs to know'> <bullet>*XML*: http://www.w3.org/XML</bullet> <bullet>*XML Namespaces*: http://www.w3.org/TR/REC-xml-names</bullet> <bullet>*XML Schemas*: http://www.w3.org/XML/Schema</bullet> <bullet>*WDDX*: http://www.openwddx.org/</bullet> <bullet>*REST*: http://internet.conveyor.com/RESTwiki/moin.cgi/FrontPage</bullet> <bullet>*XML-RPC*: http://www.xmlrpc.com/</bullet> <bullet>*SOAP*: http://www.w3.org/TR/soap</bullet> <bullet>*WSDL*: http://www.w3.org/TR/wsdl</bullet> <bullet>*Web Services Activity*: http://www.w3.org/2002/ws/</bullet> </list> <list fontsize='2.5em' title='Sites, talks, articles, etc.'> <bullet>*W3C*: http://www.w3.org/</bullet> <bullet>*OASIS committees*: BR/ http://www.oasis-open.org/committees/committees.php</bullet> <bullet>*Cover Pages*: http://xml.coverpages.org/</bullet> <bullet>*WebServices.org*: http://webservices.org/</bullet> <bullet>Web Services section at http://talks.php.net/</bullet> <bullet>Papers at http://webservices.org/</bullet> <bullet>XML-RPC tutorials at http://www.xmlrpc.com/directory/1568/tutorialspress</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_ref-specs.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_ref-specs.xml +++ presentations/slides/sdphp/ws_ref-specs.xml <slide title='More information'> <list fontsize='2.5em' title='Basic specs to know' type='none'> <bullet>*XML*: http://www.w3.org/XML</bullet> <bullet>*XML Namespaces*: http://www.w3.org/TR/REC-xml-names</bullet> <bullet>*XML Schemas*: http://www.w3.org/XML/Schema</bullet> <bullet>*WDDX*: http://www.openwddx.org/</bullet> <bullet>*REST*: http://internet.conveyor.com/RESTwiki/moin.cgi/FrontPage</bullet> <bullet>*XML-RPC*: http://www.xmlrpc.com/</bullet> <bullet>*SOAP*: http://www.w3.org/TR/soap</bullet> <bullet>*WSDL*: http://www.w3.org/TR/wsdl</bullet> <bullet>*Web Services Activity*: http://www.w3.org/2002/ws/</bullet> </list> <list fontsize='2.5em' title='Sites, talks, articles, etc.' type='none'> <bullet>*W3C*: http://www.w3.org/</bullet> <bullet>*OASIS committees*: BR/ http://www.oasis-open.org/committees/committees.php</bullet> <bullet>*Cover Pages*: http://xml.coverpages.org/</bullet> <bullet>*WebServices.org*: http://webservices.org/</bullet> <bullet>Web Services section at http://talks.php.net/</bullet> <bullet>Papers at http://webservices.org/</bullet> <bullet>XML-RPC tutorials at http://www.xmlrpc.com/directory/1568/tutorialspress</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_ref-talks-articles.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_ref-talks-articles.xml +++ presentations/slides/sdphp/ws_ref-talks-articles.xml <slide title='Articles, etc.'> <list> <bullet>Web Services section at http://talks.php.net/</bullet> <bullet>Papers at http://webservices.org/</bullet> <bullet>XML-RPC tutorials at http://www.xmlrpc.com/directory/1568/tutorialspress</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_references.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_references.xml +++ presentations/slides/sdphp/ws_references.xml <slide title='References'> <list title='Presentations and articles'> <bullet>*SOAP*: Simple Object Access Protocol</bullet> <bullet>The RESTful way</bullet> <bullet>XML-RPC: remote calls made easy</bullet> <bullet>SOAP: flexible, extendable, and not so "simple"</bullet> <bullet>WSDL, WS-SIG and other SOAP buddies</bullet> <bullet>References</bullet> </list> <list title='Packages and libraries'> <bullet>PEAR::SOAP http://pear.php.net/SOAP</bullet> <bullet>The RESTful way</bullet> <bullet>XML-RPC: remote calls made easy</bullet> <bullet>SOAP: flexible, extendable, and not so "simple"</bullet> <bullet>WSDL, WS-SIG and other SOAP buddies</bullet> <bullet>References</bullet> </list> <list title='Specifications'> <bullet>*SOAP*: Simple Object Access Protocol</bullet> <bullet>The RESTful way</bullet> <bullet>XML-RPC: remote calls made easy</bullet> <bullet>SOAP: flexible, extendable, and not so "simple"</bullet> <bullet>WSDL, WS-SIG and other SOAP buddies</bullet> <bullet>References</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_rest-example.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_rest-example.xml +++ presentations/slides/sdphp/ws_rest-example.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="REST service"> <example type='php' filename='scripts/rest-example.php' output='0'/> <example type='xml' filename='output/rest-example.out'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_rest-xml.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_rest-xml.xml +++ presentations/slides/sdphp/ws_rest-xml.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="REST & XML"> <example title='Assume we have the array' type='php'> <![CDATA[$data = array( array( 'name'=>'John Q. Public', 'userID'=>'l337d00d' ));]]> </example> <blurb title='WDDX'> Simple data enconding format, handles scalars, arrays/structures, date and time. </blurb> <example type='xml' fontsize='2em' filename='output/wddx_example.xml'/> <example title='... or use my own XML format' type='xml' fontsize='2em' filename='output/myown.xml'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_rest.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_rest.xml +++ presentations/slides/sdphp/ws_rest.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="Being RESTful"> <blurb> *REST* is the acronym for *RE*presentational *S*tate *T*ransfer, and is a term coined by Roy Fielding [1] in a dissertation attempting to describe formally the Web architectural style. </blurb> <blurb> The argument is that the HTTP methods (GET, POST, etc.) define a limited set of *verbs* that can be applied to an (in principle) infinite number of *nouns* (URIs). </blurb> <blurb> This design has some beneficial effects: </blurb> <list type="alpha" fontsize="2.5em" marginright="1em"> <bullet> It allows simpler interoperation between otherwise uncoordinated agents (web clients, servers, spiders, etc.) </bullet> <bullet> The HTTP semantics constitutes a coordination language general enough to be of use in any desired communication pattern. Its methods make it akin to message passing or function calling protocols. </bullet> <bullet> Offering a service is a simple as publishing a URL. </bullet> </list> <blurb fontsize="1.5em"> [1] Roy Fielding's Ph.D. dissertation "_Architectural Styles and the Design of Network-based Software Architectures_" </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_soap-example.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_soap-example.xml +++ presentations/slides/sdphp/ws_soap-example.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="SOAP client"> <example title='A simple Google search client' fontsize='2em' output='0' type='php' filename='scripts/ex_php_google.php'/> <example title='... and the result of running it' fontsize='1.5em' filename='output/php_google.out'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_soap.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_soap.xml +++ presentations/slides/sdphp/ws_soap.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="SOAP"> <blurb title="Simple Object Access Protocol"> It is a "lightweight protocol for exchange of information in a decentralized, distributed environment" [1] </blurb> <list type="arrow" title="SOAP provides"> <bullet>XML based messaging</bullet> <bullet>Support for message routing</bullet> <bullet>Encoding rules for expressing data types (XML Schema)</bullet> <bullet>Conventions for using SOAP for RPC</bullet> <bullet>Transport Independence</bullet> </list> <blurb title="Related specs and standards"> WSDL, UDDI, MIME and DIME attachements, SOAP Authentication, ebXML, XML Security, etc. </blurb> <blurb fontsize="1.5em"> [1] from the SOAP specs, http://www.w3.org/TR/SOAP/ </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_soap2.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_soap2.xml +++ presentations/slides/sdphp/ws_soap2.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title='MDB SOAP'> <list title='Methods'> <bullet>_sql_ : allows for SELECT, SHOW, DESCRIBE SQL queries</bullet> <bullet>_metallopdb_ : information about metal containing proteins given a metal, a mode, and a count</bullet> <bullet>_rssmetallopdb_ : similar to the _metallopdb_ with the output formated as an RSS document</bullet> </list> <example title='Using the methods sql, metallopdb and rssmetallopdb' type='html' align='center' examplebackground='#ffffdd' result='0' fontsize='1.5em' filename='output/test_soap_out.html'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_title.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_title.xml +++ presentations/slides/sdphp/ws_title.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide template="titlepage" fontsize='3.5em'> <title>Welcome!</title> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_toc.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_toc.xml +++ presentations/slides/sdphp/ws_toc.xml <slide title='Contents'> <break lines='2'/> <list fontsize='4em' type='darrow' effect='hide'> <bullet>What is a web service?</bullet> <bullet>The RESTful way</bullet> <bullet>XML-RPC: remote calls made easy</bullet> <bullet>SOAP: flexible, extendable, and not so "simple"</bullet> <bullet>WSDL and an example (Google Search)</bullet> <bullet>Glossary, libraries, and references</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_wddx.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_wddx.xml +++ presentations/slides/sdphp/ws_wddx.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="Using XML"> <blurb title='WDDX'> Simple data enconding format, handles scalars, arrays/structures, date and time. [http://www.openwddx.org/] </blurb> <blurb title='CML'> A very complete format specification for chemical data: structural information (coordinates, sequence, etc.) and properties (charges, spectroscopical data, etc.). One of the first XML applications designed. [http://www.xml-cml.org/] </blurb> <blurb title='RSS'> Widely used for news syndication (e.g. Slashdot, Freshmeat, PHPBuilder). [http://groups.yahoo.com/group/rss-dev/files/namespace.html] </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_whyuse.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_whyuse.xml +++ presentations/slides/sdphp/ws_whyuse.xml <slide title='Why use WS?'> <list title='A WS gives you'> <bullet>Language, Operating System, and Implementation independence</bullet> <bullet>Loose coupling between components/applications</bullet> <bullet>Abstract way of exposing what each service offers</bullet> </list> <blurb> When we have components that are loosely coupled, can be composed easily, and are independent, we have a system designed using a "Services Oriented Architecture" (SOA). </blurb> <blurb> In the past, SOAs were built from CORBA/IDL components, JINI/RMI, or other similar approaches, none of which combined the characteristics provided by Web Services. </blurb> <blurb> *But*, at the present time, Web Services do support some of the more interesting parts of SOAs: orchestration and dynamic composition of services, reliable aysnchronous communication, etc. Although there are specs in the works for all of these aspects. </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_wsdl.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_wsdl.xml +++ presentations/slides/sdphp/ws_wsdl.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="WSDL"> <blurb> The Web Services Description Language, describes the API a web service exposes to the world. It is usually generated from an interface, rarely written from scratch (unless the programmer likes pain, a lot) </blurb> <blurb> A WSDL document usually has 4 major sections: type definition, message definition (which refers to the types), port description (what input and output message are associated), and a binding definitions (how the ports map into the services methods). </blurb> <example title='The Google Search WSDL' type='xml' fontsize='1em' filename='misc/GoogleSearch.wsdl'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_xmlrpc-example.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_xmlrpc-example.xml +++ presentations/slides/sdphp/ws_xmlrpc-example.xml <slide title='method.sql'> <example title='Using method.sql from the XML-RPC service' result='0' fontsize='1.2em' rfontsize='1em' outputbackground='#ffffdd'> <![CDATA[<?php require_once "XML/RPC.php"; require_once "slides/mdb/scripts/xmlrpc_util.php"; require_once "slides/mdb/scripts/mdb_tests.cfg"; ?> <b>method.sql:</b> <small>"select source_id,expdata,rev_date,resolution,description from protein limit 10"</small><br> <?php $method = "method.sql"; $query = "select source_id,expdata,resolution,description "; $query .= "from protein where expdata like '%x-ray%' and "; $query .= "resolution >= 0.7 order by resolution limit 5"; $q = new XML_RPC_Value($query, $GLOBALS['XML_RPC_String']); $msg = new XML_RPC_Message($method,array($q)); $c=new XML_RPC_Client(XMLRPC_URI, MDB_SERVER_NAME, MDB_SERVER_PORT); $r = $c->send($msg); if (!$r->faultCode()) { echo toTable(XML_RPC_decode($r->value())); } else { echo "<pre>\n"; echo "ERROR: ".$r->faultCode()." -- ".$r->faultString(); echo "</pre>\n"; } ?> ]]> </example> <example title='Output' type='html' filename='output/xmlrpc_method_sql_out.html' fontsize='1.5em' examplebackground='#ffffdd'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_xmlrpc.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_xmlrpc.xml +++ presentations/slides/sdphp/ws_xmlrpc.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="XML-RPC"> <blurb> "It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet." [1] </blurb> <blurb> "It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned." [1] </blurb> <blurb> It supports server introspection. Making it easy for a client application to interrogate and discover the available methods and their paramaters. </blurb> <blurb> XML-RPC also supports "box-carring" of requests, i.e. sending a series of RPC calls at one time. Uses the *system.multicall* method. </blurb> <blurb> It does not support message passing/redirection, or complex data type definitions. But it does support mappings to simple and structured data types to/from many languages. </blurb> <blurb fontsize="1.5em"> [1] from http://www.xmlrpc.org/ </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_xmlrpc2.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_xmlrpc2.xml +++ presentations/slides/sdphp/ws_xmlrpc2.xml <slide title='XML-RPC (2)'> <example type='php' result='0' fontsize='1.0em' rfontsize='1.0em' outputbackground='#ffffdd'> <![CDATA[ <?php require_once "XML/RPC.php"; require_once "xmlrpc_util.php"; require_once "myconfig.cfg"; $c=new XML_RPC_Client(XMLRPC_URI, MDB_SERVER_NAME, MDB_SERVER_PORT); $f=new XML_RPC_Message('system.listMethods'); $v=rpc_call($c, $f); print "<h2>Methods available at http://" . $c->server . ":" . $c->port . $c->path . "</h2>\n"; if ($v) { for($i=0; $i<$v->arraysize(); $i++) { $mname=$v->arraymem($i); print "<hr noshade size=1><H3>" . $mname->scalarval() . "</H3>\n"; $f=new XML_RPC_Message('system.methodHelp'); $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); $w=rpc_call($c, $f); if ($w) { $txt=$w->scalarval(); if ($txt!="") { print "<H4>Documentation</H4><P style='font-size: 1.0em;'>${txt}</P>\n"; } else { print "<P>No documentation available.</P>\n"; } } $f=new XML_RPC_Message('system.methodSignature'); $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); $w=rpc_call($c, $f); if ($w) { print "<H4>Signature</H4><P style='font-size: 1.0em;'>\n"; if ($w->kindOf()=="array") { for($j=0; $j<$w->arraysize(); $j++) { $x=$w->arraymem($j); $ret=$x->arraymem(0); print "<CODE style='font-size: 1.0em;'>" . $ret->scalarval() . " " . $mname->scalarval() ."("; if ($x->arraysize()>1) { for($k=1; $k<$x->arraysize(); $k++) { $y=$x->arraymem($k); print $y->scalarval(); if ($k<$x->arraysize()-1) { print ", "; } } } print ")</CODE><BR>\n"; } } else { print "Signature unknown\n"; } print "</P>\n"; } } } ?> ]]> </example> <example title='Output' type='html' filename='output/xmlrpc_api_out.html' fontsize='1em' examplebackground='#ffffdd'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/misc/GoogleSearch.wsdl?r=1.1&p=1 Index: presentations/slides/sdphp/misc/GoogleSearch.wsdl +++ presentations/slides/sdphp/misc/GoogleSearch.wsdl <?xml version="1.0"?> <!-- WSDL description of the Google Web APIs. The Google Web APIs are in beta release. All interfaces are subject to change as we refine and extend our APIs. Please see the terms of use for more information. --> <!-- Revision 2002-08-16 --> <definitions name="GoogleSearch" targetNamespace="urn:GoogleSearch" xmlns:typens="urn:GoogleSearch" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <!-- Types for search - result elements, directory categories --> <types> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:GoogleSearch"> <xsd:complexType name="GoogleSearchResult"> <xsd:all> <xsd:element name="documentFiltering" type="xsd:boolean"/> <xsd:element name="searchComments" type="xsd:string"/> <xsd:element name="estimatedTotalResultsCount" type="xsd:int"/> <xsd:element name="estimateIsExact" type="xsd:boolean"/> <xsd:element name="resultElements" type="typens:ResultElementArray"/> <xsd:element name="searchQuery" type="xsd:string"/> <xsd:element name="startIndex" type="xsd:int"/> <xsd:element name="endIndex" type="xsd:int"/> <xsd:element name="searchTips" type="xsd:string"/> <xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/> <xsd:element name="searchTime" type="xsd:double"/> </xsd:all> </xsd:complexType> <xsd:complexType name="ResultElement"> <xsd:all> <xsd:element name="summary" type="xsd:string"/> <xsd:element name="URL" type="xsd:string"/> <xsd:element name="snippet" type="xsd:string"/> <xsd:element name="title" type="xsd:string"/> <xsd:element name="cachedSize" type="xsd:string"/> <xsd:element name="relatedInformationPresent" type="xsd:boolean"/> <xsd:element name="hostName" type="xsd:string"/> <xsd:element name="directoryCategory" type="typens:DirectoryCategory"/> <xsd:element name="directoryTitle" type="xsd:string"/> </xsd:all> </xsd:complexType> <xsd:complexType name="ResultElementArray"> <xsd:complexContent> <xsd:restriction base="soapenc:Array"> <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:ResultElement[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="DirectoryCategoryArray"> <xsd:complexContent> <xsd:restriction base="soapenc:Array"> <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:DirectoryCategory[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="DirectoryCategory"> <xsd:all> <xsd:element name="fullViewableName" type="xsd:string"/> <xsd:element name="specialEncoding" type="xsd:string"/> </xsd:all> </xsd:complexType> </xsd:schema> </types> <!-- Messages for Google Web APIs - cached page, search, spelling. --> <message name="doGetCachedPage"> <part name="key" type="xsd:string"/> <part name="url" type="xsd:string"/> </message> <message name="doGetCachedPageResponse"> <part name="return" type="xsd:base64Binary"/> </message> <message name="doSpellingSuggestion"> <part name="key" type="xsd:string"/> <part name="phrase" type="xsd:string"/> </message> <message name="doSpellingSuggestionResponse"> <part name="return" type="xsd:string"/> </message> <!-- note, ie and oe are ignored by server; all traffic is UTF-8. --> <message name="doGoogleSearch"> <part name="key" type="xsd:string"/> <part name="q" type="xsd:string"/> <part name="start" type="xsd:int"/> <part name="maxResults" type="xsd:int"/> <part name="filter" type="xsd:boolean"/> <part name="restrict" type="xsd:string"/> <part name="safeSearch" type="xsd:boolean"/> <part name="lr" type="xsd:string"/> <part name="ie" type="xsd:string"/> <part name="oe" type="xsd:string"/> </message> <message name="doGoogleSearchResponse"> <part name="return" type="typens:GoogleSearchResult"/> </message> <!-- Port for Google Web APIs, "GoogleSearch" --> <portType name="GoogleSearchPort"> <operation name="doGetCachedPage"> <input message="typens:doGetCachedPage"/> <output message="typens:doGetCachedPageResponse"/> </operation> <operation name="doSpellingSuggestion"> <input message="typens:doSpellingSuggestion"/> <output message="typens:doSpellingSuggestionResponse"/> </operation> <operation name="doGoogleSearch"> <input message="typens:doGoogleSearch"/> <output message="typens:doGoogleSearchResponse"/> </operation> </portType> <!-- Binding for Google Web APIs - RPC, SOAP over HTTP --> <binding name="GoogleSearchBinding" type="typens:GoogleSearchPort"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="doGetCachedPage"> <soap:operation soapAction="urn:GoogleSearchAction"/> <input> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="doSpellingSuggestion"> <soap:operation soapAction="urn:GoogleSearchAction"/> <input> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="doGoogleSearch"> <soap:operation soapAction="urn:GoogleSearchAction"/> <input> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <!-- Endpoint for Google Web APIs --> <service name="GoogleSearchService"> <port name="GoogleSearchPort" binding="typens:GoogleSearchBinding"> <soap:address location="http://api.google.com/search/beta2"/> </port> </service> </definitions> http://cvs.php.net/co.php/presentations/slides/sdphp/output/exwddx.php?r=1.1&p=1 Index: presentations/slides/sdphp/output/exwddx.php +++ presentations/slides/sdphp/output/exwddx.php <?php $data = array(array('name'=>'John Q. Public', 'userID'=>'l337d00d')); echo wddx_serialize_value($data,'results'); ?> http://cvs.php.net/co.php/presentations/slides/sdphp/output/myown.xml?r=1.1&p=1 Index: presentations/slides/sdphp/output/myown.xml +++ presentations/slides/sdphp/output/myown.xml <results> <timestamp> 20040506-141030PST </timestamp> <data> <row> <field> <name>name</name> <value>John Q. Public</name> </field> <field> <name>userID</name> <value>l337d00d</value> </field> </row> </data> </results> http://cvs.php.net/co.php/presentations/slides/sdphp/output/php_google.out?r=1.1&p=1 Index: presentations/slides/sdphp/output/php_google.out +++ presentations/slides/sdphp/output/php_google.out stdClass Object ( [directoryCategories] => [documentFiltering] => [endIndex] => 10 [estimateIsExact] => [estimatedTotalResultsCount] => 238 [resultElements] => Array ( [0] => stdClass Object ( [URL] => http://metallo.scripps.edu/feedback.html [cachedSize] => 13k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => [MDB - TSRI]. Feedback: Thanks for taking the time to send us your feedback.<br> Make sure that you include your e-mail address and your comments. <b>...</b> [summary] => [title] => MDB (Feedback) - Metalloprotein Site Database & Browser ) [1] => stdClass Object ( [URL] => http://metallo.scripps.edu/PROMISE/CHLMAIN_REV.html [cachedSize] => 36k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Created: 8 April 1998 Last modified: 19 April 1999. General references<br> on structure and function of chlorophylls and chlorophyll proteins. <b>...</b> [summary] => [title] => General references on chlorophyll proteins ) [2] => stdClass Object ( [URL] => http://metallo.scripps.edu/sql_docs/sql_help.html [cachedSize] => 15k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => [MDB - TSRI]. SQL Help. <b>...</b> [summary] => [title] => SQL Help Information-Metalloprotein Site Database and Browser <b>...</b> ) [3] => stdClass Object ( [URL] => http://www.geocities.com/dslongley/freedbs.html [cachedSize] => 101k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Free Scientific and Academic Databases and Searchable Data Sets Over<br> 340 resources listed! Last updated 1/31/03. To search for databases <b>...</b> [summary] => [title] => Free Scientific and Academic Databases and Searchable Data Sets ) [4] => stdClass Object ( [URL] => http://www.zend.com/comm_person.php?id=9 [cachedSize] => 33k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Who's Who - Jesus M. Castagnetto, Nominate Someone. Name, Jesus M.<br> Castagnetto, Category, Book authors. Country, United States. Email,<br> for <b>...</b> [summary] => [title] => Zend - The php Company ) [5] => stdClass Object ( [URL] => http://directory.google.com/Top/Science/Physics/Crystallography/Databases/ [cachedSize] => 13k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Google, Directory Help Search only in Databases Search the Web. Databases, <b>...</b> [summary] => [title] => Google Directory - Science > Physics > Crystallography > Databases ) [6] => stdClass Object ( [URL] => http://www.biolinks.net.ru/Databases/more3.htm [cachedSize] => 35k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Your Ad Here! Top : Databases : Page 3. Major Sequence Databases,<br> [4]. Protein Databases, [16]. Protein Domains, [5]. RNA Databases,<br> [9]. <b>...</b> [summary] => [title] => Different databases ) [7] => stdClass Object ( [URL] => http://www.imb-jena.de/IMAGE_ABOUT.html [cachedSize] => 39k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => About the IMB Jena Image Library of Biological Macromolecules. Authors, <b>...</b> [summary] => [title] => IMB Jena Image Library of Biological Macromolecules ) [8] => stdClass Object ( [URL] => http://wwwprof.uniandes.edu.co/~aviswana/bioinfo2.html [cachedSize] => 70k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Bioinformatics Sites. Sequence Analysis GCG Text-based searching Pairwise<br> Alignment Multiple Sequence Alignment Sequence-based searching <b>...</b> [summary] => [title] => Bioinformatics Sites ) [9] => stdClass Object ( [URL] => http://pecl.php.net/user/jmcastagnetto [cachedSize] => 10k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => PECL, Friday, April 30, 2004. <b>...</b> [summary] => [title] => PECL :: Jesus M. Castagnetto ) ) [searchComments] => [searchQuery] => link:metallo.scripps.edu [searchTime] => 0.141005 [searchTips] => [startIndex] => 1 ) http://cvs.php.net/co.php/presentations/slides/sdphp/output/rest-example.out?r=1.1&p=1 Index: presentations/slides/sdphp/output/rest-example.out +++ presentations/slides/sdphp/output/rest-example.out <wddxPacket version='1.0'> <header> <comment>timestamp</comment> </header> <data> <struct> <var name='date'> <string>2004-05-06</string> </var> <var name='time'> <string>15:14:25</string> </var> </struct> </data> </wddxPacket> http://cvs.php.net/co.php/presentations/slides/sdphp/output/test_soap_out.html?r=1.1&p=1 Index: presentations/slides/sdphp/output/test_soap_out.html +++ presentations/slides/sdphp/output/test_soap_out.html <h2>Excercizing the sql method</h2> [query: 'select source_id,description from protein limit 3'] <table border='1'> <tr> <td bgcolor='#eeeeee'> <b>source_id</b>: 1aoo<br> <b>description</b>: 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]<br> <b>0</b>: <br> <b>source_id</b>: 1aqq<br> <b>description</b>: 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]<br> <b>1</b>: <br> <b>source_id</b>: 2aw0<br> <b>description</b>: 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]<br> <b>2</b>: <br> </td> </tr> </table> <hr> <h2>Making a deliberate error using the metallopdb method</h2> [metal: zn][mode: first][count: -3] <br><b>OOPS we got an error</b> <table border='1'> <tr> <td bgcolor='#eeeeee'> <b>error_message_prefix</b>: PHP<br> <b>mode</b>: 1<br> <b>level</b>: 1024<br> <b>code</b>: SOAP-ENV:Server<br> <b>message</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>userinfo</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>file</b>: /home/server/php/lib/php/SOAP/Fault.php<br> <b>line</b>: 49<br> <b>function</b>: pear_error<br> <b>class</b>: pear_error<br> <b>type</b>: ::<br> <b>0</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>1</b>: SOAP-ENV:Server<br> <b>2</b>: <br> <b>3</b>: <br> <b>4</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>args</b>: <br> <b>0</b>: <br> <b>file</b>: /home/server/php/lib/php/SOAP/Base.php<br> <b>line</b>: 320<br> <b>function</b>: soap_fault<br> <b>class</b>: soap_fault<br> <b>type</b>: -><br> <b>0</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>1</b>: SOAP-ENV:Server<br> <b>2</b>: PHP<br> <b>3</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>4</b>: <br> <b>5</b>: <br> <b>args</b>: <br> <b>1</b>: <br> <b>file</b>: /home/server/php/lib/php/SOAP/Client.php<br> <b>line</b>: 508<br> <b>function</b>: _raisesoapfault<br> <b>class</b>: soap_client<br> <b>type</b>: -><br> <b>0</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>1</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>2</b>: PHP<br> <b>3</b>: SOAP-ENV:Server<br> <b>args</b>: <br> <b>2</b>: <br> <b>file</b>: /home/server/php/lib/php/SOAP/Client.php<br> <b>line</b>: 476<br> <b>function</b>: __decoderesponse<br> <b>class</b>: soap_client<br> <b>type</b>: -><br> <b>value</b>: SOAP-ENV:Server<br> <b>name</b>: faultcode<br> <b>type</b>: QName<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: faultcode<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: QName<br> <b>ns</b>: <br> <b>namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>0</b>: <br> <b>value</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>name</b>: faultstring<br> <b>type</b>: string<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: faultstring<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: string<br> <b>ns</b>: <br> <b>namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>1</b>: <br> <b>value</b>: PHP<br> <b>name</b>: faultactor<br> <b>type</b>: anyURI<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: faultactor<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: anyURI<br> <b>ns</b>: <br> <b>namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>2</b>: <br> <b>value</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>name</b>: detail<br> <b>type</b>: string<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: detail<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: string<br> <b>ns</b>: <br> <b>namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>3</b>: <br> <b>value</b>: <br> <b>name</b>: Fault<br> <b>type</b>: Struct<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: <br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: Fault<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: Struct<br> <b>ns</b>: <br> <b>namespace</b>: <br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>0</b>: <br> <b>args</b>: <br> <b>3</b>: <br> <b>file</b>: /home/server/php/lib/php/SOAP/Client.php<br> <b>line</b>: 245<br> <b>function</b>: __parse<br> <b>class</b>: soap_client<br> <b>type</b>: -><br> <b>0</b>: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode xsi:type="xsd:QName">SOAP-ENV:Server</faultcode> <faultstring xsi:type="xsd:string">Parameter count must be an integer > 0, value sent: -3</faultstring> <faultactor xsi:type="xsd:anyURI">PHP</faultactor> <detail xsi:type="xsd:string">Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46 </detail></SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <br> <b>1</b>: UTF-8<br> <b>2</b>: <br> <b>args</b>: <br> <b>4</b>: <br> <b>file</b>: /home/jesus/devel/php/presentations/slides/mdb/test_soap.xml<br> <b>line</b>: 45<br> <b>function</b>: call<br> <b>class</b>: soap_client<br> <b>type</b>: -><br> <b>0</b>: metallopdb<br> <b>metal</b>: zn<br> <b>mode</b>: first<br> <b>count</b>: -3<br> <b>1</b>: <br> <b>2</b>: urn:MDB_SOAP_Server<br> <b>args</b>: <br> <b>5</b>: <br> <b>backtrace</b>: <br> <b>callback</b>: <br> </td> </tr> </table> <hr> <h2>Using the metallopdb method correctly</h2> [metal:zn][mode: random][count: 3] <table border='1'> <tr> <td bgcolor='#eeeeee'> <b>metal</b>: zn<br> <b>source_id</b>: 1eb6<br> <b>revision_date</b>: 2001/11/23<br> <b>deposition_date</b>: 2001/07/19<br> <b>expdata</b>: x-ray diffraction<br> <b>r_value</b>: 0.10<br> <b>resolution</b>: 1.00<br> <b>authors</b>: k.e.mcauley,y.jia-xing,e.j.dodson,j.lehmbeck, p.r.ostergaard,k.s.wilson<br> <b>description</b>: 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]<br> <b>0</b>: <br> <b>metal</b>: zn<br> <b>source_id</b>: 1qf2<br> <b>revision_date</b>: 2000/12/20<br> <b>deposition_date</b>: 1999/04/06<br> <b>expdata</b>: x-ray diffraction<br> <b>r_value</b>: 0.16<br> <b>resolution</b>: 2.06<br> <b>authors</b>: j.-f.gaucher,m.selkti,g.tiraboschi,t.prange,b.p.roques, a.tomas,m.c.fournie-zaluski<br> <b>description</b>: 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]<br> <b>1</b>: <br> <b>metal</b>: zn<br> <b>source_id</b>: 1xuf<br> <b>revision_date</b>: 1998/12/16<br> <b>deposition_date</b>: 1997/10/10<br> <b>expdata</b>: x-ray diffraction<br> <b>r_value</b>: 0.15<br> <b>resolution</b>: 2.04<br> <b>authors</b>: 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<br> <b>description</b>: 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]<br> <b>2</b>: <br> </td> </tr> </table> <hr> <h2>Using the rssmetallopdb method</h2> [metal: zn][mode: last][count: 3] <table border='1'> <tr> <td bgcolor='#eeeeee'> <pre> <?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&amp;metal[]=zn" /> <rdf:li rdf:resource="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9icv&amp;metal[]=zn" /> <rdf:li rdf:resource="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9ici&amp;metal[]=zn" /> </rdf:Seq> </items> </channel> <item rdf:about="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9nse&amp;metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9nse&amp;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&amp;metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9icv&amp;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&amp;metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9ici&amp;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> </pre> </td> </tr> </table> http://cvs.php.net/co.php/presentations/slides/sdphp/output/wddx_example.xml?r=1.1&p=1 Index: presentations/slides/sdphp/output/wddx_example.xml +++ presentations/slides/sdphp/output/wddx_example.xml <wddxPacket version='1.0'> <header> <comment>results</comment> </header> <data> <array length='1'> <struct> <var name='name'> <string>John Q. Public</string> </var> <var name='userID'> <string>l337d00d</string> </var> </struct> </array> </data> </wddxPacket> http://cvs.php.net/co.php/presentations/slides/sdphp/output/xmlrpc_api_out.html?r=1.1&p=1 Index: presentations/slides/sdphp/output/xmlrpc_api_out.html +++ presentations/slides/sdphp/output/xmlrpc_api_out.html <h3>Methods available at http://metallo.scripps.edu:80/services/xmlrpc.php</h3> <hr noshade size=1><H3>method.sql</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>General function to query the MDB database server. Accepts a valid SQL query ("SELECT", "SHOW", or "DESCRIBE" statements only), and returns the resulting rows as a structure.</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>struct method.sql(string)</CODE><BR> </P> <hr noshade size=1><H3>method.metallopdb</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>Specialized function to retrieve a list of PDB structures containing a particular metal ion, as indexed in the MDB. The retrieval mode can be one of "first" (default) to get the first "n" PDB ids (sorted alphabetically), "last" to get the last "n" ids, "random" to get "n" random entries, and "new" to ge the newest "n" entries released/indexed. The number of entries to retrieve is set using "count". The result can be returned as XML-RPC structure, WDDX packet or RSS document</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>struct method.metallopdb(string, string, int, string)</CODE><BR> </P> <hr noshade size=1><H3>method.get</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>Returns the requested file. It accepts 2 parameters: the name of the file, and (optionally) the whether the base64 encoding will be done on the "raw" (default) file, or the file after being compressed with gzip ("gzip").</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>base64 method.get(string, string)</CODE><BR> </P> <hr noshade size=1><H3>system.listMethods</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>This method lists all the methods that the XML-RPC server knows how to dispatch</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>array system.listMethods(string)</CODE><BR> <CODE style='font-size: 1.0em;'>array system.listMethods()</CODE><BR> </P> <hr noshade size=1><H3>system.methodHelp</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>Returns help text if defined for the method passed, otherwise returns an empty string</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>string system.methodHelp(string)</CODE><BR> </P> <hr noshade size=1><H3>system.methodSignature</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>Returns an array of known signatures (an array of arrays) for the method name passed. If no signatures are known, returns a none-array (test for type != array to detect missing signature)</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>array system.methodSignature(string)</CODE><BR> </P> http://cvs.php.net/co.php/presentations/slides/sdphp/output/xmlrpc_method_sql_out.html?r=1.1&p=1 Index: presentations/slides/sdphp/output/xmlrpc_method_sql_out.html +++ presentations/slides/sdphp/output/xmlrpc_method_sql_out.html <b>method.sql:</b> "select source_id,expdata,rev_date,resolution,description from protein limit 10"<br> <table border=1> <tr align='center'> <th>source_id</th> <th>expdata</th> <th>resolution</th> <th>description</th> </tr> <tr align='center'> <td>1d8g</td> <td>x-ray diffraction</td> <td>0.74</td> <td>Header: [deoxyribonucleic acid 23-oct-99 1d8g] Title: [ultrahigh resolution crystal structure of b-dna decamer d(ccagtactgg)] Compound: [mol_id: 1; molecule: 5'-d(*cp*cp*ap*gp*tp*ap*cp*tp*gp*gp*)-3'; chain: a; engineered: yes] Source: [mol_id: 1; synthetic: yes] Keywords: [calcium, alternate conformation, ultrahigh resolution, trp repressor, polyamide]</td> </tr> <tr align='center'> <td>1gci</td> <td>x-ray diffraction</td> <td>0.78</td> <td>Header: [serine protease 02-sep-98 1gci] Title: [the 0.78 angstroms structure of a serine protease - bacillus lentus subtilisin] Compound: [mol_id: 1; molecule: subtilisin; chain: null; ec: 3.4.21.62; engineered: yes; biological_unit: monomer] Source: [mol_id: 1; organism_scientific: bacillus lentus; expression_system: bacillus subtilis] Keywords: [bacillus lentus, hydrolase, serine protease, ultra-high resolution]</td> </tr> <tr align='center'> <td>1iua</td> <td>x-ray diffraction</td> <td>0.80</td> <td>Header: [electron transport 01-mar-02 1iua] Title: [ultra-high resolution structure of hipip from thermochromatium tepidum] Compound: [mol_id: 1; molecule: high-potential iron-sulfur protein; chain: a] Source: [mol_id: 1; organism_scientific: thermochromatium tepidum; organism_common: bacteria] Keywords: [ultra-high resolution, crystal structure]</td> </tr> <tr align='center'> <td>1dpl</td> <td>x-ray diffraction</td> <td>0.83</td> <td>Header: [deoxyribonucleic acid 27-dec-99 1dpl] Title: [a-dna decamer gcgta(t23)tacgc with incorporated 2'-methoxy- 3'-methylenephosphate-thymidine] Compound: [mol_id: 1; molecule: 5'-d(*gp*cp*gp*tp*ap*(t23)p*ap*cp*gp*c)-3'; chain: a, b; engineered: yes] Source: [mol_id: 1; synthetic: yes] Keywords: [deoxyribonucleic acid]</td> </tr> <tr align='center'> <td>1m40</td> <td>x-ray diffraction</td> <td>0.85</td> <td>Header: [hydrolase 01-jul-02 1m40] Title: [ultra high resolution crystal structure of tem-1] Compound: [mol_id: 1; molecule: beta-lactamase tem; chain: a; synonym: tem-1; ec: 3.5.2.6; engineered: yes; mutation: yes] Source: [mol_id: 1; organism_scientific: escherichia coli; organism_common: bacteria; gene: bla; expression_system: escherichia coli; expression_system_common: bacteria; expression_system_strain: sf120; expression_system_vector_type: plasmid; expression_system_plasmid: palter ex ii - tem-1] Keywords: [acylation mechanism, x-ray structure, ultra- high resolution]</td> </tr> </table> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ex_php_google.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ex_php_google.php +++ presentations/slides/sdphp/scripts/ex_php_google.php <?php include_once 'SOAP/Client.php'; $key = 'xxxxxxxxxxxxxxxx' $query = array( 'key' => $key, 'q' => 'link:metallo.scripps.edu', 'start' => 0, 'maxResults' => 10, 'filter' => true, 'restrict' => '', 'safeSearch' => false, 'lr' => '', 'ie' => '', 'oe' => '' ); $wsdl = new SOAP_WSDL('GoogleSearch.wsdl'); $client = $wsdl->getProxy(); $result = $client->doGoogleSearch($query) print_r($result); ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/rest-example.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/rest-example.php +++ presentations/slides/sdphp/scripts/rest-example.php <?php $now = time(); $uptime = `uptime`; $re='/^\s*([0-9]{1,2}:[0-9]{2}(am|pm))\s+up (.+),\s+(\d+) users,\s+load average: (.+), (.+), (.+)/'; $timestamp = gmdate('Y-m-d H:i:s', $now); preg_match($re, $uptime, $part); $uptime = array( 'time' => $part[1], 'duration' => $part[3], 'users' => (int)$part[4], 'load1' => (float)$part[5], 'load5' => (float)$part[6], 'load15' => (float)$part[7], ); $packet = wddx_packet_start('uptime info'); wddx_add_vars($packet, 'timestamp', 'uptime'); $out = wddx_packet_end($packet); echo $out; ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_rest_sample_client.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_rest_sample_client.php +++ presentations/slides/sdphp/scripts/ws_rest_sample_client.php <?php // Sample REST server - returns uptime information // Jesus M. Castagnetto //$host = 'www.example.com'; //$port = 80; //$serverPath = '/xmlrpc/server.php' $host = 'jmc.sdsc.edu'; $port = 6666; $serverPath = '/misc/ws_rest_sample_server.php'; $packet = file_get_contents("http://{$host}:{$port}{$serverPath}"); $tmp = wddx_deserialize($packet); extract($tmp); $sep = str_repeat('*',50); echo <<< _END $sep Uptime for : $host Timestamp (UTC) : $timestamp Local time at host : {$uptime['time']} Host has run for : {$uptime['duration']} Number of current users : {$uptime['users']} Average number of jobs in queue 1 minute : {$uptime['load1']} 5 minutes : {$uptime['load5']} 15 minutes : {$uptime['load15']} $sep _END; ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_rest_sample_server.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_rest_sample_server.php +++ presentations/slides/sdphp/scripts/ws_rest_sample_server.php <?php // Sample REST server - returns uptime information // Jesus M. Castagnetto $re = '/^\s*([0-9]{1,2}:[0-9]{2}(am|pm))\s+up (.+),'; $re .= '\s+(\d+) users,\s+load average: (.+), (.+), (.+)/'; $now = time(); $uptime = `uptime`; preg_match($re, $uptime, $part); $timestamp = gmdate('Y-m-d H:i:s', $now); $uptime = array( 'time' => $part[1], 'duration' => $part[3], 'users' => (int)$part[4], 'load1' => (float)$part[5], 'load5' => (float)$part[6], 'load15' => (float)$part[7], ); $packet = wddx_packet_start('uptime info'); wddx_add_vars($packet, 'timestamp', 'uptime'); $out = wddx_packet_end($packet); echo $out; ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_util_functions.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_util_functions.php +++ presentations/slides/sdphp/scripts/ws_util_functions.php <?php function getUptime() { $now = time(); $uptime = `uptime`; $re = '/^\s*([0-9]{1,2}:[0-9]{2}(am|pm))\s+up (.+),'; $re .= '\s+(\d+) users,\s+load average: (.+), (.+), (.+)/'; $timestamp = gmdate('Y-m-d H:i:s', $now); preg_match($re, $uptime, $part); $uptime = array( 'time' => $part[1], 'duration' => $part[3], 'users' => (int)$part[4], 'load1' => (float)$part[5], 'load5' => (float)$part[6], 'load15' => (float)$part[7], ); return array($timestamp, $uptime); } ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_xmlrpc_sample_client.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_xmlrpc_sample_client.php +++ presentations/slides/sdphp/scripts/ws_xmlrpc_sample_client.php <?php require_once 'XML/RPC.php'; //$host = 'www.example.com'; //$port = 80; //$serverPath = /rest/uptime.php'; $host = 'jmc.sdsc.edu'; $port = 6666; $serverPath = '/misc/ws_xmlrpc_sample_server.php'; $message = new XML_RPC_Message('method.serverUptime'); $client = new XML_RPC_Client($serverPath, $host, $port); $resp = $client->send($message); $value = $resp->value(); $uptime = $value->getval(); $sep = str_repeat('~',56); echo <<< _END $sep Uptime for : $host Timestamp (UTC) : {$uptime['timestampUTC']} Local time at host : {$uptime['timestampLocal']} Host has run for : {$uptime['duration']} Number of current users : {$uptime['users']} Average number of jobs in queue 1 minute : {$uptime['load1']} 5 minutes : {$uptime['load5']} 15 minutes : {$uptime['load15']} $sep _END; ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_xmlrpc_sample_server.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_xmlrpc_sample_server.php +++ presentations/slides/sdphp/scripts/ws_xmlrpc_sample_server.php <?php require_once 'XML/RPC/Server.php'; function hostUptime() { $now = time(); $uptime = `uptime`; $re = '/^\s*([0-9]{1,2}:[0-9]{2}(am|pm))\s+up (.+),'; $re .= '\s+(\d+) users,\s+load average: (.+), (.+), (.+)/'; preg_match($re, $uptime, $part); // create the XML-RPC values $timestamp = new XML_RPC_Value(gmdate('Ymd\TH:i:s', $now), 'dateTime.iso8601'); $host_ts = new XML_RPC_Value(date('Ymd\TH:i:s', $now), 'dateTime.iso8601'); $host_uptime = new XML_RPC_Value($part[3], 'string'); $host_users = new XML_RPC_Value($part[4], 'int'); $host_load1 = new XML_RPC_Value($part[5], 'double'); $host_load5 = new XML_RPC_Value($part[6], 'double'); $host_load15 = new XML_RPC_Value($part[7], 'double'); $hostInfo = array( 'timestampUTC' => $timestamp, 'timestampLocal' => $host_ts, 'duration' => $host_uptime, 'users' => $host_users, 'load1' => $host_load1, 'load5' => $host_load5, 'load15' => $host_load15 ); $uptime = new XML_RPC_Value($hostInfo, 'struct'); return new XML_RPC_Response($uptime); } // method metainfo $hostUptime_sig = array(array($XML_RPC_Struct)); $hostUptime_doc = 'Returns the uptime information of the host,' .' and a timestamp (UTC timezone) when the' .' measure was made.'; // dispatch map $map = array ( 'method.serverUptime' => array ( 'function' => 'hostUptime', 'signature' => $hostUptime_sig, 'docstring' => $hostUptime_doc ) ); // start server $server = new XML_RPC_Server($map); $server->service(); ?>
http://cvs.php.net/co.php/presentations/sdphp_webservices.xml?r=1.1&p=1 Index: presentations/sdphp_webservices.xml +++ presentations/sdphp_webservices.xml <presentation template="php2" titlecolor="#1111aa" logo1="presentations/slides/sdphp/images/testsdphplogo.png" navbarbackground="#ffffff" navbarheight="4.1em" > <!-- navbarbackground="url(images/trans-ffffff.png)" --> <topic>Web Services</topic> <title>Overview of Web Services</title> <subtitle>or "A Web Service by any other name... REST, XML-RPC, SOAP"</subtitle> <!-- subtitle>Understanding the alphabet soup: REST, XML-RPC, SOAP</subtitle --> <event>SDPHP monthly meeting</event> <location>San Diego</location> <url>http://www.sdphp.net/</url> <date>May 6, 2004</date> <speaker>Jesus M. Castagnetto</speaker> <email>jmcastagnetto@php.net</email> <slide>slides/sdphp/ws_title.xml</slide> <slide>slides/sdphp/ws_toc.xml</slide> <chapter title='Introduction'> <slide>slides/sdphp/ws_definition.xml</slide> <slide>slides/sdphp/ws_whyuse.xml</slide> <slide>slides/sdphp/ws_aslibrary.xml</slide> <slide>slides/sdphp/ws_protocols.xml</slide> </chapter> <chapter title="REST"> <slide>slides/sdphp/ws_rest.xml</slide> <slide>slides/sdphp/ws_rest-xml.xml</slide> <slide>slides/sdphp/ws_rest-example.xml</slide> </chapter> <chapter title="XML-RPC"> <slide>slides/sdphp/ws_xmlrpc.xml</slide> <slide>slides/sdphp/ws_xmlrpc2.xml</slide> <slide>slides/sdphp/ws_xmlrpc-example.xml</slide> </chapter> <chapter title="SOAP"> <slide>slides/sdphp/ws_soap.xml</slide> <slide>slides/sdphp/ws_soap2.xml</slide> <slide>slides/sdphp/ws_wsdl.xml</slide> <slide>slides/sdphp/ws_soap-example.xml</slide> </chapter> <chapter title='MDB Services'> <slide>slides/sdphp/ws_mdbasexample.xml</slide> <slide>slides/sdphp/ws_mdballapis.xml</slide> </chapter> <slide>slides/sdphp/ws_glossary.xml</slide> <slide>slides/sdphp/ws_ref-libraries.xml</slide> <slide>slides/sdphp/ws_ref-moreinfo.xml</slide> </presentation> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_aslibrary.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_aslibrary.xml +++ presentations/slides/sdphp/ws_aslibrary.xml <slide title='WS as library'> <image align='center' filename='images/local_extrnl_libs.png'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_definition.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_definition.xml +++ presentations/slides/sdphp/ws_definition.xml <slide title='What & How'> <break lines='2'/> <blurb title='What is a web service?'> Basically, a *web service* is an application with which other applications can communicate over via a network, often using XML to encapsulate data and context, and HTTP as the transport layer. </blurb> <break lines='2'/> <blurb title='How do we expose a Web Service?'> There are several ways (protocols) we can expose our web services to the rest of the world, from a the minimalistic approach of the "RESTafarians", to using XML-RPC, to SOAP and all its accompanying specifications (UDDI, WSDL, WS-Security, WS-Context, etc.) </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_glossary.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_glossary.xml +++ presentations/slides/sdphp/ws_glossary.xml <slide title='Glossary'> <list> <bullet>*REST*: REpresentational State Transfer (the architecture style of the Net)</bullet> <bullet>*XML-RPC*: XML Remote Procedure Call</bullet> <bullet>*SOAP*: Simple Object Access Protocol</bullet> <bullet>*WSDL*: Web Services Description Language</bullet> <bullet>*HTTP*: HyperText Transfer Protocol</bullet> <bullet>*UDDI*: Universal Description, Discovery, and Integration</bullet> <bullet>*CORBA*: Common Object Request Broker Architecture</bullet> <bullet>*IDL*: (CORBA's) Interface Description Language</bullet> <bullet>*RMI*: (Java's) Remote Method Invocation</bullet> <bullet>*JINI*: Sun's Java-based system to network devices and applications (includes Javaspaces, JINI Extensible Remote Incovation, etc.)</bullet> <bullet>*SOA*: Services Oriented Architecture</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_mdballapis.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_mdballapis.xml +++ presentations/slides/sdphp/ws_mdballapis.xml <slide title='MDB services'> <list title='REST' fontsize='2.5em'> <bullet> URL: *http://metallo.scripps.edu/services/rest.php* </bullet> <bullet> Functions: *sql* and *metallopdb* </bullet> <bullet> Example: http://metallo.scripps.edu/services/rest.php?func=metallopdb &metal=zn&mode=new&count=5&format=rss </bullet> <!-- bullet> *sql* Parameters: _query_ = urlencoded SQL query; [_format_] = csv (default), wddx, serialized, table. Example: http://metallo.scripps.edu/services/rest.php?function=sql&query=select +source_id+from+protein+limit+10&format=wddx </bullet --> <!-- bullet> *metallopdb* Parameters: _metal_ = atomic symbol for the metal; [_mode_]: one of: first (default), last, random, new; [_count_]: how many PDB entries to retrieve (default = 5); [_format_]: csv (default), wddx, rss, serialized </bullet --> </list> <list title='XML-RPC' fontsize='2.5em'> <bullet> URL: *http://metallo.scripps.edu/services/xmlrpc.php* </bullet> <bullet> struct *method.sql*(string query) <!-- General function to query the MDB database server. Accepts a valid SQL query ("SELECT", "SHOW", or "DESCRIBE" statements only), and returns the resulting rows as a structure. --> </bullet> <bullet> struct *method.metallopdb*(string metal, string mode, int count, string format) <!-- Specialized function to retrieve a list of PDB structures containing a particular metal ion, as indexed in the MDB. The retrieval mode can be one of "first" (default) to get the first "n" PDB ids (sorted alphabetically), "last" to get the last "n" ids, "random" to get "n" random entries, and "new" to ge the newest "n" entries released/indexed. The number of entries to retrieve is set using "count". The result can be returned as XML-RPC structure, WDDX packet or RSS document --> </bullet> </list> <list title='SOAP' fontsize='2.5em'> <bullet> URL: *http://metallo.scripps.edu/services/soap.php* </bullet> <bullet> Methods: *sql*, *metallopdb*, *rssmetallopdb* </bullet> <!-- bullet> *sql* : allows for SELECT, SHOW, DESCRIBE SQL queries </bullet> <bullet> *metallopdb* : information about metal containing proteins given a metal, a mode, and a count </bullet> <bullet> *rssmetallopdb* : similar to the _metallopdb_ with an RSS document as output. </bullet --> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_mdbasexample.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_mdbasexample.xml +++ presentations/slides/sdphp/ws_mdbasexample.xml <slide title='Multi-WS'> <blurb title='The MDB case'> A set of simple modular functions that can be wrapped in each of the services. </blurb> <image align='center' filename='images/mdbapi_impl.png'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_protocols.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_protocols.xml +++ presentations/slides/sdphp/ws_protocols.xml <slide title='Protocols'> <break lines='4'/> <blurb title='The Good, The Bad, and The Ugly'> There are at least 3 ways to expose a web service. Two are what we understand as communication/transport protocols (XML-RPC and SOAP), and the other is more a "way of doing things" (REST). </blurb> <blurb> You decide which is which %:-)% </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_ref-libraries.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_ref-libraries.xml +++ presentations/slides/sdphp/ws_ref-libraries.xml <slide title='Libraries'> <list title='REST' fontsize='2.5em'> <bullet>PEAR::XML_Wddx, http://pear.php.net/package/XML_Wddx</bullet> <bullet>PHP's wddx extension (--enable-wddx)</bullet> </list> <list title='XML-RPC' fontsize='2.5em'> <bullet>PEAR::XML_RPC, http://pear.php.net/package/XML_RPC</bullet> <bullet>Useful Inc's XML-RPC, http://xmlrpc.usefulinc.com/php.html </bullet> <bullet>PHP's xmlrpc extension (--with-xmlrpc)</bullet> <bullet>More implementations: http://www.xmlrpc.com/directory/1568/implementations</bullet> </list> <list title='SOAP' fontsize='2.5em'> <bullet>PEAR::SOAP, http://pear.php.net/package/SOAP</bullet> <bullet>NuSOAP, http://dietrich.ganx4.com/nusoap/</bullet> <bullet>PHP5's SOAP extension (--enable-soap)</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_ref-moreinfo.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_ref-moreinfo.xml +++ presentations/slides/sdphp/ws_ref-moreinfo.xml <slide title='More refs'> <list fontsize='2.5em' title='Basic specs to know'> <bullet>*XML*: http://www.w3.org/XML</bullet> <bullet>*XML Namespaces*: http://www.w3.org/TR/REC-xml-names</bullet> <bullet>*XML Schemas*: http://www.w3.org/XML/Schema</bullet> <bullet>*WDDX*: http://www.openwddx.org/</bullet> <bullet>*REST*: http://internet.conveyor.com/RESTwiki/moin.cgi/FrontPage</bullet> <bullet>*XML-RPC*: http://www.xmlrpc.com/</bullet> <bullet>*SOAP*: http://www.w3.org/TR/soap</bullet> <bullet>*WSDL*: http://www.w3.org/TR/wsdl</bullet> <bullet>*Web Services Activity*: http://www.w3.org/2002/ws/</bullet> </list> <list fontsize='2.5em' title='Sites, talks, articles, etc.'> <bullet>*W3C*: http://www.w3.org/</bullet> <bullet>*OASIS committees*: BR/ http://www.oasis-open.org/committees/committees.php</bullet> <bullet>*Cover Pages*: http://xml.coverpages.org/</bullet> <bullet>*WebServices.org*: http://webservices.org/</bullet> <bullet>Web Services section at http://talks.php.net/</bullet> <bullet>Papers at http://webservices.org/</bullet> <bullet>XML-RPC tutorials at http://www.xmlrpc.com/directory/1568/tutorialspress</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_ref-specs.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_ref-specs.xml +++ presentations/slides/sdphp/ws_ref-specs.xml <slide title='More information'> <list fontsize='2.5em' title='Basic specs to know' type='none'> <bullet>*XML*: http://www.w3.org/XML</bullet> <bullet>*XML Namespaces*: http://www.w3.org/TR/REC-xml-names</bullet> <bullet>*XML Schemas*: http://www.w3.org/XML/Schema</bullet> <bullet>*WDDX*: http://www.openwddx.org/</bullet> <bullet>*REST*: http://internet.conveyor.com/RESTwiki/moin.cgi/FrontPage</bullet> <bullet>*XML-RPC*: http://www.xmlrpc.com/</bullet> <bullet>*SOAP*: http://www.w3.org/TR/soap</bullet> <bullet>*WSDL*: http://www.w3.org/TR/wsdl</bullet> <bullet>*Web Services Activity*: http://www.w3.org/2002/ws/</bullet> </list> <list fontsize='2.5em' title='Sites, talks, articles, etc.' type='none'> <bullet>*W3C*: http://www.w3.org/</bullet> <bullet>*OASIS committees*: BR/ http://www.oasis-open.org/committees/committees.php</bullet> <bullet>*Cover Pages*: http://xml.coverpages.org/</bullet> <bullet>*WebServices.org*: http://webservices.org/</bullet> <bullet>Web Services section at http://talks.php.net/</bullet> <bullet>Papers at http://webservices.org/</bullet> <bullet>XML-RPC tutorials at http://www.xmlrpc.com/directory/1568/tutorialspress</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_ref-talks-articles.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_ref-talks-articles.xml +++ presentations/slides/sdphp/ws_ref-talks-articles.xml <slide title='Articles, etc.'> <list> <bullet>Web Services section at http://talks.php.net/</bullet> <bullet>Papers at http://webservices.org/</bullet> <bullet>XML-RPC tutorials at http://www.xmlrpc.com/directory/1568/tutorialspress</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_references.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_references.xml +++ presentations/slides/sdphp/ws_references.xml <slide title='References'> <list title='Presentations and articles'> <bullet>*SOAP*: Simple Object Access Protocol</bullet> <bullet>The RESTful way</bullet> <bullet>XML-RPC: remote calls made easy</bullet> <bullet>SOAP: flexible, extendable, and not so "simple"</bullet> <bullet>WSDL, WS-SIG and other SOAP buddies</bullet> <bullet>References</bullet> </list> <list title='Packages and libraries'> <bullet>PEAR::SOAP http://pear.php.net/SOAP</bullet> <bullet>The RESTful way</bullet> <bullet>XML-RPC: remote calls made easy</bullet> <bullet>SOAP: flexible, extendable, and not so "simple"</bullet> <bullet>WSDL, WS-SIG and other SOAP buddies</bullet> <bullet>References</bullet> </list> <list title='Specifications'> <bullet>*SOAP*: Simple Object Access Protocol</bullet> <bullet>The RESTful way</bullet> <bullet>XML-RPC: remote calls made easy</bullet> <bullet>SOAP: flexible, extendable, and not so "simple"</bullet> <bullet>WSDL, WS-SIG and other SOAP buddies</bullet> <bullet>References</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_rest-example.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_rest-example.xml +++ presentations/slides/sdphp/ws_rest-example.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="REST service"> <example type='php' filename='scripts/rest-example.php' output='0'/> <example type='xml' filename='output/rest-example.out'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_rest-xml.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_rest-xml.xml +++ presentations/slides/sdphp/ws_rest-xml.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="REST & XML"> <example title='Assume we have the array' type='php'> <![CDATA[$data = array( array( 'name'=>'John Q. Public', 'userID'=>'l337d00d' ));]]> </example> <blurb title='WDDX'> Simple data enconding format, handles scalars, arrays/structures, date and time. </blurb> <example type='xml' fontsize='2em' filename='output/wddx_example.xml'/> <example title='... or use my own XML format' type='xml' fontsize='2em' filename='output/myown.xml'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_rest.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_rest.xml +++ presentations/slides/sdphp/ws_rest.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="Being RESTful"> <blurb> *REST* is the acronym for *RE*presentational *S*tate *T*ransfer, and is a term coined by Roy Fielding [1] in a dissertation attempting to describe formally the Web architectural style. </blurb> <blurb> The argument is that the HTTP methods (GET, POST, etc.) define a limited set of *verbs* that can be applied to an (in principle) infinite number of *nouns* (URIs). </blurb> <blurb> This design has some beneficial effects: </blurb> <list type="alpha" fontsize="2.5em" marginright="1em"> <bullet> It allows simpler interoperation between otherwise uncoordinated agents (web clients, servers, spiders, etc.) </bullet> <bullet> The HTTP semantics constitutes a coordination language general enough to be of use in any desired communication pattern. Its methods make it akin to message passing or function calling protocols. </bullet> <bullet> Offering a service is a simple as publishing a URL. </bullet> </list> <blurb fontsize="1.5em"> [1] Roy Fielding's Ph.D. dissertation "_Architectural Styles and the Design of Network-based Software Architectures_" </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_soap-example.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_soap-example.xml +++ presentations/slides/sdphp/ws_soap-example.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="SOAP client"> <example title='A simple Google search client' fontsize='2em' output='0' type='php' filename='scripts/ex_php_google.php'/> <example title='... and the result of running it' fontsize='1.5em' filename='output/php_google.out'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_soap.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_soap.xml +++ presentations/slides/sdphp/ws_soap.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="SOAP"> <blurb title="Simple Object Access Protocol"> It is a "lightweight protocol for exchange of information in a decentralized, distributed environment" [1] </blurb> <list type="arrow" title="SOAP provides"> <bullet>XML based messaging</bullet> <bullet>Support for message routing</bullet> <bullet>Encoding rules for expressing data types (XML Schema)</bullet> <bullet>Conventions for using SOAP for RPC</bullet> <bullet>Transport Independence</bullet> </list> <blurb title="Related specs and standards"> WSDL, UDDI, MIME and DIME attachements, SOAP Authentication, ebXML, XML Security, etc. </blurb> <blurb fontsize="1.5em"> [1] from the SOAP specs, http://www.w3.org/TR/SOAP/ </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_soap2.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_soap2.xml +++ presentations/slides/sdphp/ws_soap2.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title='MDB SOAP'> <list title='Methods'> <bullet>_sql_ : allows for SELECT, SHOW, DESCRIBE SQL queries</bullet> <bullet>_metallopdb_ : information about metal containing proteins given a metal, a mode, and a count</bullet> <bullet>_rssmetallopdb_ : similar to the _metallopdb_ with the output formated as an RSS document</bullet> </list> <example title='Using the methods sql, metallopdb and rssmetallopdb' type='html' align='center' examplebackground='#ffffdd' result='0' fontsize='1.5em' filename='output/test_soap_out.html'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_title.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_title.xml +++ presentations/slides/sdphp/ws_title.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide template="titlepage" fontsize='3.5em'> <title>Welcome!</title> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_toc.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_toc.xml +++ presentations/slides/sdphp/ws_toc.xml <slide title='Contents'> <break lines='2'/> <list fontsize='4em' type='darrow' effect='hide'> <bullet>What is a web service?</bullet> <bullet>The RESTful way</bullet> <bullet>XML-RPC: remote calls made easy</bullet> <bullet>SOAP: flexible, extendable, and not so "simple"</bullet> <bullet>WSDL and an example (Google Search)</bullet> <bullet>Glossary, libraries, and references</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_wddx.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_wddx.xml +++ presentations/slides/sdphp/ws_wddx.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="Using XML"> <blurb title='WDDX'> Simple data enconding format, handles scalars, arrays/structures, date and time. [http://www.openwddx.org/] </blurb> <blurb title='CML'> A very complete format specification for chemical data: structural information (coordinates, sequence, etc.) and properties (charges, spectroscopical data, etc.). One of the first XML applications designed. [http://www.xml-cml.org/] </blurb> <blurb title='RSS'> Widely used for news syndication (e.g. Slashdot, Freshmeat, PHPBuilder). [http://groups.yahoo.com/group/rss-dev/files/namespace.html] </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_whyuse.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_whyuse.xml +++ presentations/slides/sdphp/ws_whyuse.xml <slide title='Why use WS?'> <list title='A WS gives you'> <bullet>Language, Operating System, and Implementation independence</bullet> <bullet>Loose coupling between components/applications</bullet> <bullet>Abstract way of exposing what each service offers</bullet> </list> <blurb> When we have components that are loosely coupled, can be composed easily, and are independent, we have a system designed using a "Services Oriented Architecture" (SOA). </blurb> <blurb> In the past, SOAs were built from CORBA/IDL components, JINI/RMI, or other similar approaches, none of which combined the characteristics provided by Web Services. </blurb> <blurb> *But*, at the present time, Web Services do support some of the more interesting parts of SOAs: orchestration and dynamic composition of services, reliable aysnchronous communication, etc. Although there are specs in the works for all of these aspects. </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_wsdl.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_wsdl.xml +++ presentations/slides/sdphp/ws_wsdl.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="WSDL"> <blurb> The Web Services Description Language, describes the API a web service exposes to the world. It is usually generated from an interface, rarely written from scratch (unless the programmer likes pain, a lot) </blurb> <blurb> A WSDL document usually has 4 major sections: type definition, message definition (which refers to the types), port description (what input and output message are associated), and a binding definitions (how the ports map into the services methods). </blurb> <example title='The Google Search WSDL' type='xml' fontsize='1em' filename='misc/GoogleSearch.wsdl'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_xmlrpc-example.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_xmlrpc-example.xml +++ presentations/slides/sdphp/ws_xmlrpc-example.xml <slide title='method.sql'> <example title='Using method.sql from the XML-RPC service' result='0' fontsize='1.2em' rfontsize='1em' outputbackground='#ffffdd'> <![CDATA[<?php require_once "XML/RPC.php"; require_once "slides/mdb/scripts/xmlrpc_util.php"; require_once "slides/mdb/scripts/mdb_tests.cfg"; ?> <b>method.sql:</b> <small>"select source_id,expdata,rev_date,resolution,description from protein limit 10"</small><br> <?php $method = "method.sql"; $query = "select source_id,expdata,resolution,description "; $query .= "from protein where expdata like '%x-ray%' and "; $query .= "resolution >= 0.7 order by resolution limit 5"; $q = new XML_RPC_Value($query, $GLOBALS['XML_RPC_String']); $msg = new XML_RPC_Message($method,array($q)); $c=new XML_RPC_Client(XMLRPC_URI, MDB_SERVER_NAME, MDB_SERVER_PORT); $r = $c->send($msg); if (!$r->faultCode()) { echo toTable(XML_RPC_decode($r->value())); } else { echo "<pre>\n"; echo "ERROR: ".$r->faultCode()." -- ".$r->faultString(); echo "</pre>\n"; } ?> ]]> </example> <example title='Output' type='html' filename='output/xmlrpc_method_sql_out.html' fontsize='1.5em' examplebackground='#ffffdd'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_xmlrpc.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_xmlrpc.xml +++ presentations/slides/sdphp/ws_xmlrpc.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide title="XML-RPC"> <blurb> "It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet." [1] </blurb> <blurb> "It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned." [1] </blurb> <blurb> It supports server introspection. Making it easy for a client application to interrogate and discover the available methods and their paramaters. </blurb> <blurb> XML-RPC also supports "box-carring" of requests, i.e. sending a series of RPC calls at one time. Uses the *system.multicall* method. </blurb> <blurb> It does not support message passing/redirection, or complex data type definitions. But it does support mappings to simple and structured data types to/from many languages. </blurb> <blurb fontsize="1.5em"> [1] from http://www.xmlrpc.org/ </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/ws_xmlrpc2.xml?r=1.1&p=1 Index: presentations/slides/sdphp/ws_xmlrpc2.xml +++ presentations/slides/sdphp/ws_xmlrpc2.xml <slide title='XML-RPC (2)'> <example type='php' result='0' fontsize='1.0em' rfontsize='1.0em' outputbackground='#ffffdd'> <![CDATA[ <?php require_once "XML/RPC.php"; require_once "xmlrpc_util.php"; require_once "myconfig.cfg"; $c=new XML_RPC_Client(XMLRPC_URI, MDB_SERVER_NAME, MDB_SERVER_PORT); $f=new XML_RPC_Message('system.listMethods'); $v=rpc_call($c, $f); print "<h2>Methods available at http://" . $c->server . ":" . $c->port . $c->path . "</h2>\n"; if ($v) { for($i=0; $i<$v->arraysize(); $i++) { $mname=$v->arraymem($i); print "<hr noshade size=1><H3>" . $mname->scalarval() . "</H3>\n"; $f=new XML_RPC_Message('system.methodHelp'); $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); $w=rpc_call($c, $f); if ($w) { $txt=$w->scalarval(); if ($txt!="") { print "<H4>Documentation</H4><P style='font-size: 1.0em;'>${txt}</P>\n"; } else { print "<P>No documentation available.</P>\n"; } } $f=new XML_RPC_Message('system.methodSignature'); $f->addParam(new XML_RPC_Value($mname->scalarval(), "string")); $w=rpc_call($c, $f); if ($w) { print "<H4>Signature</H4><P style='font-size: 1.0em;'>\n"; if ($w->kindOf()=="array") { for($j=0; $j<$w->arraysize(); $j++) { $x=$w->arraymem($j); $ret=$x->arraymem(0); print "<CODE style='font-size: 1.0em;'>" . $ret->scalarval() . " " . $mname->scalarval() ."("; if ($x->arraysize()>1) { for($k=1; $k<$x->arraysize(); $k++) { $y=$x->arraymem($k); print $y->scalarval(); if ($k<$x->arraysize()-1) { print ", "; } } } print ")</CODE><BR>\n"; } } else { print "Signature unknown\n"; } print "</P>\n"; } } } ?> ]]> </example> <example title='Output' type='html' filename='output/xmlrpc_api_out.html' fontsize='1em' examplebackground='#ffffdd'/> </slide> http://cvs.php.net/co.php/presentations/slides/sdphp/misc/GoogleSearch.wsdl?r=1.1&p=1 Index: presentations/slides/sdphp/misc/GoogleSearch.wsdl +++ presentations/slides/sdphp/misc/GoogleSearch.wsdl <?xml version="1.0"?> <!-- WSDL description of the Google Web APIs. The Google Web APIs are in beta release. All interfaces are subject to change as we refine and extend our APIs. Please see the terms of use for more information. --> <!-- Revision 2002-08-16 --> <definitions name="GoogleSearch" targetNamespace="urn:GoogleSearch" xmlns:typens="urn:GoogleSearch" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <!-- Types for search - result elements, directory categories --> <types> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:GoogleSearch"> <xsd:complexType name="GoogleSearchResult"> <xsd:all> <xsd:element name="documentFiltering" type="xsd:boolean"/> <xsd:element name="searchComments" type="xsd:string"/> <xsd:element name="estimatedTotalResultsCount" type="xsd:int"/> <xsd:element name="estimateIsExact" type="xsd:boolean"/> <xsd:element name="resultElements" type="typens:ResultElementArray"/> <xsd:element name="searchQuery" type="xsd:string"/> <xsd:element name="startIndex" type="xsd:int"/> <xsd:element name="endIndex" type="xsd:int"/> <xsd:element name="searchTips" type="xsd:string"/> <xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/> <xsd:element name="searchTime" type="xsd:double"/> </xsd:all> </xsd:complexType> <xsd:complexType name="ResultElement"> <xsd:all> <xsd:element name="summary" type="xsd:string"/> <xsd:element name="URL" type="xsd:string"/> <xsd:element name="snippet" type="xsd:string"/> <xsd:element name="title" type="xsd:string"/> <xsd:element name="cachedSize" type="xsd:string"/> <xsd:element name="relatedInformationPresent" type="xsd:boolean"/> <xsd:element name="hostName" type="xsd:string"/> <xsd:element name="directoryCategory" type="typens:DirectoryCategory"/> <xsd:element name="directoryTitle" type="xsd:string"/> </xsd:all> </xsd:complexType> <xsd:complexType name="ResultElementArray"> <xsd:complexContent> <xsd:restriction base="soapenc:Array"> <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:ResultElement[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="DirectoryCategoryArray"> <xsd:complexContent> <xsd:restriction base="soapenc:Array"> <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:DirectoryCategory[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="DirectoryCategory"> <xsd:all> <xsd:element name="fullViewableName" type="xsd:string"/> <xsd:element name="specialEncoding" type="xsd:string"/> </xsd:all> </xsd:complexType> </xsd:schema> </types> <!-- Messages for Google Web APIs - cached page, search, spelling. --> <message name="doGetCachedPage"> <part name="key" type="xsd:string"/> <part name="url" type="xsd:string"/> </message> <message name="doGetCachedPageResponse"> <part name="return" type="xsd:base64Binary"/> </message> <message name="doSpellingSuggestion"> <part name="key" type="xsd:string"/> <part name="phrase" type="xsd:string"/> </message> <message name="doSpellingSuggestionResponse"> <part name="return" type="xsd:string"/> </message> <!-- note, ie and oe are ignored by server; all traffic is UTF-8. --> <message name="doGoogleSearch"> <part name="key" type="xsd:string"/> <part name="q" type="xsd:string"/> <part name="start" type="xsd:int"/> <part name="maxResults" type="xsd:int"/> <part name="filter" type="xsd:boolean"/> <part name="restrict" type="xsd:string"/> <part name="safeSearch" type="xsd:boolean"/> <part name="lr" type="xsd:string"/> <part name="ie" type="xsd:string"/> <part name="oe" type="xsd:string"/> </message> <message name="doGoogleSearchResponse"> <part name="return" type="typens:GoogleSearchResult"/> </message> <!-- Port for Google Web APIs, "GoogleSearch" --> <portType name="GoogleSearchPort"> <operation name="doGetCachedPage"> <input message="typens:doGetCachedPage"/> <output message="typens:doGetCachedPageResponse"/> </operation> <operation name="doSpellingSuggestion"> <input message="typens:doSpellingSuggestion"/> <output message="typens:doSpellingSuggestionResponse"/> </operation> <operation name="doGoogleSearch"> <input message="typens:doGoogleSearch"/> <output message="typens:doGoogleSearchResponse"/> </operation> </portType> <!-- Binding for Google Web APIs - RPC, SOAP over HTTP --> <binding name="GoogleSearchBinding" type="typens:GoogleSearchPort"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="doGetCachedPage"> <soap:operation soapAction="urn:GoogleSearchAction"/> <input> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="doSpellingSuggestion"> <soap:operation soapAction="urn:GoogleSearchAction"/> <input> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="doGoogleSearch"> <soap:operation soapAction="urn:GoogleSearchAction"/> <input> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <!-- Endpoint for Google Web APIs --> <service name="GoogleSearchService"> <port name="GoogleSearchPort" binding="typens:GoogleSearchBinding"> <soap:address location="http://api.google.com/search/beta2"/> </port> </service> </definitions> http://cvs.php.net/co.php/presentations/slides/sdphp/output/exwddx.php?r=1.1&p=1 Index: presentations/slides/sdphp/output/exwddx.php +++ presentations/slides/sdphp/output/exwddx.php <?php $data = array(array('name'=>'John Q. Public', 'userID'=>'l337d00d')); echo wddx_serialize_value($data,'results'); ?> http://cvs.php.net/co.php/presentations/slides/sdphp/output/myown.xml?r=1.1&p=1 Index: presentations/slides/sdphp/output/myown.xml +++ presentations/slides/sdphp/output/myown.xml <results> <timestamp> 20040506-141030PST </timestamp> <data> <row> <field> <name>name</name> <value>John Q. Public</name> </field> <field> <name>userID</name> <value>l337d00d</value> </field> </row> </data> </results> http://cvs.php.net/co.php/presentations/slides/sdphp/output/php_google.out?r=1.1&p=1 Index: presentations/slides/sdphp/output/php_google.out +++ presentations/slides/sdphp/output/php_google.out stdClass Object ( [directoryCategories] => [documentFiltering] => [endIndex] => 10 [estimateIsExact] => [estimatedTotalResultsCount] => 238 [resultElements] => Array ( [0] => stdClass Object ( [URL] => http://metallo.scripps.edu/feedback.html [cachedSize] => 13k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => [MDB - TSRI]. Feedback: Thanks for taking the time to send us your feedback.<br> Make sure that you include your e-mail address and your comments. <b>...</b> [summary] => [title] => MDB (Feedback) - Metalloprotein Site Database & Browser ) [1] => stdClass Object ( [URL] => http://metallo.scripps.edu/PROMISE/CHLMAIN_REV.html [cachedSize] => 36k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Created: 8 April 1998 Last modified: 19 April 1999. General references<br> on structure and function of chlorophylls and chlorophyll proteins. <b>...</b> [summary] => [title] => General references on chlorophyll proteins ) [2] => stdClass Object ( [URL] => http://metallo.scripps.edu/sql_docs/sql_help.html [cachedSize] => 15k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => [MDB - TSRI]. SQL Help. <b>...</b> [summary] => [title] => SQL Help Information-Metalloprotein Site Database and Browser <b>...</b> ) [3] => stdClass Object ( [URL] => http://www.geocities.com/dslongley/freedbs.html [cachedSize] => 101k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Free Scientific and Academic Databases and Searchable Data Sets Over<br> 340 resources listed! Last updated 1/31/03. To search for databases <b>...</b> [summary] => [title] => Free Scientific and Academic Databases and Searchable Data Sets ) [4] => stdClass Object ( [URL] => http://www.zend.com/comm_person.php?id=9 [cachedSize] => 33k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Who's Who - Jesus M. Castagnetto, Nominate Someone. Name, Jesus M.<br> Castagnetto, Category, Book authors. Country, United States. Email,<br> for <b>...</b> [summary] => [title] => Zend - The php Company ) [5] => stdClass Object ( [URL] => http://directory.google.com/Top/Science/Physics/Crystallography/Databases/ [cachedSize] => 13k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Google, Directory Help Search only in Databases Search the Web. Databases, <b>...</b> [summary] => [title] => Google Directory - Science > Physics > Crystallography > Databases ) [6] => stdClass Object ( [URL] => http://www.biolinks.net.ru/Databases/more3.htm [cachedSize] => 35k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Your Ad Here! Top : Databases : Page 3. Major Sequence Databases,<br> [4]. Protein Databases, [16]. Protein Domains, [5]. RNA Databases,<br> [9]. <b>...</b> [summary] => [title] => Different databases ) [7] => stdClass Object ( [URL] => http://www.imb-jena.de/IMAGE_ABOUT.html [cachedSize] => 39k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => About the IMB Jena Image Library of Biological Macromolecules. Authors, <b>...</b> [summary] => [title] => IMB Jena Image Library of Biological Macromolecules ) [8] => stdClass Object ( [URL] => http://wwwprof.uniandes.edu.co/~aviswana/bioinfo2.html [cachedSize] => 70k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => Bioinformatics Sites. Sequence Analysis GCG Text-based searching Pairwise<br> Alignment Multiple Sequence Alignment Sequence-based searching <b>...</b> [summary] => [title] => Bioinformatics Sites ) [9] => stdClass Object ( [URL] => http://pecl.php.net/user/jmcastagnetto [cachedSize] => 10k [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => [hostName] => [relatedInformationPresent] => 1 [snippet] => PECL, Friday, April 30, 2004. <b>...</b> [summary] => [title] => PECL :: Jesus M. Castagnetto ) ) [searchComments] => [searchQuery] => link:metallo.scripps.edu [searchTime] => 0.141005 [searchTips] => [startIndex] => 1 ) http://cvs.php.net/co.php/presentations/slides/sdphp/output/rest-example.out?r=1.1&p=1 Index: presentations/slides/sdphp/output/rest-example.out +++ presentations/slides/sdphp/output/rest-example.out <wddxPacket version='1.0'> <header> <comment>timestamp</comment> </header> <data> <struct> <var name='date'> <string>2004-05-06</string> </var> <var name='time'> <string>15:14:25</string> </var> </struct> </data> </wddxPacket> http://cvs.php.net/co.php/presentations/slides/sdphp/output/test_soap_out.html?r=1.1&p=1 Index: presentations/slides/sdphp/output/test_soap_out.html +++ presentations/slides/sdphp/output/test_soap_out.html <h2>Excercizing the sql method</h2> [query: 'select source_id,description from protein limit 3'] <table border='1'> <tr> <td bgcolor='#eeeeee'> <b>source_id</b>: 1aoo<br> <b>description</b>: 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]<br> <b>0</b>: <br> <b>source_id</b>: 1aqq<br> <b>description</b>: 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]<br> <b>1</b>: <br> <b>source_id</b>: 2aw0<br> <b>description</b>: 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]<br> <b>2</b>: <br> </td> </tr> </table> <hr> <h2>Making a deliberate error using the metallopdb method</h2> [metal: zn][mode: first][count: -3] <br><b>OOPS we got an error</b> <table border='1'> <tr> <td bgcolor='#eeeeee'> <b>error_message_prefix</b>: PHP<br> <b>mode</b>: 1<br> <b>level</b>: 1024<br> <b>code</b>: SOAP-ENV:Server<br> <b>message</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>userinfo</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>file</b>: /home/server/php/lib/php/SOAP/Fault.php<br> <b>line</b>: 49<br> <b>function</b>: pear_error<br> <b>class</b>: pear_error<br> <b>type</b>: ::<br> <b>0</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>1</b>: SOAP-ENV:Server<br> <b>2</b>: <br> <b>3</b>: <br> <b>4</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>args</b>: <br> <b>0</b>: <br> <b>file</b>: /home/server/php/lib/php/SOAP/Base.php<br> <b>line</b>: 320<br> <b>function</b>: soap_fault<br> <b>class</b>: soap_fault<br> <b>type</b>: -><br> <b>0</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>1</b>: SOAP-ENV:Server<br> <b>2</b>: PHP<br> <b>3</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>4</b>: <br> <b>5</b>: <br> <b>args</b>: <br> <b>1</b>: <br> <b>file</b>: /home/server/php/lib/php/SOAP/Client.php<br> <b>line</b>: 508<br> <b>function</b>: _raisesoapfault<br> <b>class</b>: soap_client<br> <b>type</b>: -><br> <b>0</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>1</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>2</b>: PHP<br> <b>3</b>: SOAP-ENV:Server<br> <b>args</b>: <br> <b>2</b>: <br> <b>file</b>: /home/server/php/lib/php/SOAP/Client.php<br> <b>line</b>: 476<br> <b>function</b>: __decoderesponse<br> <b>class</b>: soap_client<br> <b>type</b>: -><br> <b>value</b>: SOAP-ENV:Server<br> <b>name</b>: faultcode<br> <b>type</b>: QName<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: faultcode<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: QName<br> <b>ns</b>: <br> <b>namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>0</b>: <br> <b>value</b>: Parameter count must be an integer > 0, value sent: -3<br> <b>name</b>: faultstring<br> <b>type</b>: string<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: faultstring<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: string<br> <b>ns</b>: <br> <b>namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>1</b>: <br> <b>value</b>: PHP<br> <b>name</b>: faultactor<br> <b>type</b>: anyURI<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: faultactor<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: anyURI<br> <b>ns</b>: <br> <b>namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>2</b>: <br> <b>value</b>: Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46<br> <b>name</b>: detail<br> <b>type</b>: string<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: detail<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: string<br> <b>ns</b>: <br> <b>namespace</b>: http://www.w3.org/2001/XMLSchema<br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>3</b>: <br> <b>value</b>: <br> <b>name</b>: Fault<br> <b>type</b>: Struct<br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>type_namespace</b>: <br> <b>attributes</b>: <br> <b>arrayType</b>: <br> <b>options</b>: <br> <b>name</b>: Fault<br> <b>ns</b>: <br> <b>namespace</b>: http://schemas.xmlsoap.org/soap/envelope/<br> <b>nqn</b>: <br> <b>name</b>: Struct<br> <b>ns</b>: <br> <b>namespace</b>: <br> <b>tqn</b>: <br> <b>type_prefix</b>: <br> <b>0</b>: <br> <b>args</b>: <br> <b>3</b>: <br> <b>file</b>: /home/server/php/lib/php/SOAP/Client.php<br> <b>line</b>: 245<br> <b>function</b>: __parse<br> <b>class</b>: soap_client<br> <b>type</b>: -><br> <b>0</b>: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode xsi:type="xsd:QName">SOAP-ENV:Server</faultcode> <faultstring xsi:type="xsd:string">Parameter count must be an integer > 0, value sent: -3</faultstring> <faultactor xsi:type="xsd:anyURI">PHP</faultactor> <detail xsi:type="xsd:string">Errno: 256 Filename: /export/asd/metallo2/metallodb/webdocs/services/soap.php Lineno: 46 </detail></SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <br> <b>1</b>: UTF-8<br> <b>2</b>: <br> <b>args</b>: <br> <b>4</b>: <br> <b>file</b>: /home/jesus/devel/php/presentations/slides/mdb/test_soap.xml<br> <b>line</b>: 45<br> <b>function</b>: call<br> <b>class</b>: soap_client<br> <b>type</b>: -><br> <b>0</b>: metallopdb<br> <b>metal</b>: zn<br> <b>mode</b>: first<br> <b>count</b>: -3<br> <b>1</b>: <br> <b>2</b>: urn:MDB_SOAP_Server<br> <b>args</b>: <br> <b>5</b>: <br> <b>backtrace</b>: <br> <b>callback</b>: <br> </td> </tr> </table> <hr> <h2>Using the metallopdb method correctly</h2> [metal:zn][mode: random][count: 3] <table border='1'> <tr> <td bgcolor='#eeeeee'> <b>metal</b>: zn<br> <b>source_id</b>: 1eb6<br> <b>revision_date</b>: 2001/11/23<br> <b>deposition_date</b>: 2001/07/19<br> <b>expdata</b>: x-ray diffraction<br> <b>r_value</b>: 0.10<br> <b>resolution</b>: 1.00<br> <b>authors</b>: k.e.mcauley,y.jia-xing,e.j.dodson,j.lehmbeck, p.r.ostergaard,k.s.wilson<br> <b>description</b>: 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]<br> <b>0</b>: <br> <b>metal</b>: zn<br> <b>source_id</b>: 1qf2<br> <b>revision_date</b>: 2000/12/20<br> <b>deposition_date</b>: 1999/04/06<br> <b>expdata</b>: x-ray diffraction<br> <b>r_value</b>: 0.16<br> <b>resolution</b>: 2.06<br> <b>authors</b>: j.-f.gaucher,m.selkti,g.tiraboschi,t.prange,b.p.roques, a.tomas,m.c.fournie-zaluski<br> <b>description</b>: 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]<br> <b>1</b>: <br> <b>metal</b>: zn<br> <b>source_id</b>: 1xuf<br> <b>revision_date</b>: 1998/12/16<br> <b>deposition_date</b>: 1997/10/10<br> <b>expdata</b>: x-ray diffraction<br> <b>r_value</b>: 0.15<br> <b>resolution</b>: 2.04<br> <b>authors</b>: 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<br> <b>description</b>: 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]<br> <b>2</b>: <br> </td> </tr> </table> <hr> <h2>Using the rssmetallopdb method</h2> [metal: zn][mode: last][count: 3] <table border='1'> <tr> <td bgcolor='#eeeeee'> <pre> <?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&amp;metal[]=zn" /> <rdf:li rdf:resource="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9icv&amp;metal[]=zn" /> <rdf:li rdf:resource="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9ici&amp;metal[]=zn" /> </rdf:Seq> </items> </channel> <item rdf:about="http://metallo.scripps.edu/remote/remote.php3?source_id[]=9nse&amp;metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9nse&amp;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&amp;metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9icv&amp;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&amp;metal[]=zn"> <link>http://metallo.scripps.edu/remote/remote.php3?source_id[]=9ici&amp;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> </pre> </td> </tr> </table> http://cvs.php.net/co.php/presentations/slides/sdphp/output/wddx_example.xml?r=1.1&p=1 Index: presentations/slides/sdphp/output/wddx_example.xml +++ presentations/slides/sdphp/output/wddx_example.xml <wddxPacket version='1.0'> <header> <comment>results</comment> </header> <data> <array length='1'> <struct> <var name='name'> <string>John Q. Public</string> </var> <var name='userID'> <string>l337d00d</string> </var> </struct> </array> </data> </wddxPacket> http://cvs.php.net/co.php/presentations/slides/sdphp/output/xmlrpc_api_out.html?r=1.1&p=1 Index: presentations/slides/sdphp/output/xmlrpc_api_out.html +++ presentations/slides/sdphp/output/xmlrpc_api_out.html <h3>Methods available at http://metallo.scripps.edu:80/services/xmlrpc.php</h3> <hr noshade size=1><H3>method.sql</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>General function to query the MDB database server. Accepts a valid SQL query ("SELECT", "SHOW", or "DESCRIBE" statements only), and returns the resulting rows as a structure.</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>struct method.sql(string)</CODE><BR> </P> <hr noshade size=1><H3>method.metallopdb</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>Specialized function to retrieve a list of PDB structures containing a particular metal ion, as indexed in the MDB. The retrieval mode can be one of "first" (default) to get the first "n" PDB ids (sorted alphabetically), "last" to get the last "n" ids, "random" to get "n" random entries, and "new" to ge the newest "n" entries released/indexed. The number of entries to retrieve is set using "count". The result can be returned as XML-RPC structure, WDDX packet or RSS document</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>struct method.metallopdb(string, string, int, string)</CODE><BR> </P> <hr noshade size=1><H3>method.get</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>Returns the requested file. It accepts 2 parameters: the name of the file, and (optionally) the whether the base64 encoding will be done on the "raw" (default) file, or the file after being compressed with gzip ("gzip").</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>base64 method.get(string, string)</CODE><BR> </P> <hr noshade size=1><H3>system.listMethods</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>This method lists all the methods that the XML-RPC server knows how to dispatch</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>array system.listMethods(string)</CODE><BR> <CODE style='font-size: 1.0em;'>array system.listMethods()</CODE><BR> </P> <hr noshade size=1><H3>system.methodHelp</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>Returns help text if defined for the method passed, otherwise returns an empty string</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>string system.methodHelp(string)</CODE><BR> </P> <hr noshade size=1><H3>system.methodSignature</H3> <H4>Documentation</H4><P style='font-size: 1.0em;'>Returns an array of known signatures (an array of arrays) for the method name passed. If no signatures are known, returns a none-array (test for type != array to detect missing signature)</P> <H4>Signature</H4><P style='font-size: 1.0em;'> <CODE style='font-size: 1.0em;'>array system.methodSignature(string)</CODE><BR> </P> http://cvs.php.net/co.php/presentations/slides/sdphp/output/xmlrpc_method_sql_out.html?r=1.1&p=1 Index: presentations/slides/sdphp/output/xmlrpc_method_sql_out.html +++ presentations/slides/sdphp/output/xmlrpc_method_sql_out.html <b>method.sql:</b> "select source_id,expdata,rev_date,resolution,description from protein limit 10"<br> <table border=1> <tr align='center'> <th>source_id</th> <th>expdata</th> <th>resolution</th> <th>description</th> </tr> <tr align='center'> <td>1d8g</td> <td>x-ray diffraction</td> <td>0.74</td> <td>Header: [deoxyribonucleic acid 23-oct-99 1d8g] Title: [ultrahigh resolution crystal structure of b-dna decamer d(ccagtactgg)] Compound: [mol_id: 1; molecule: 5'-d(*cp*cp*ap*gp*tp*ap*cp*tp*gp*gp*)-3'; chain: a; engineered: yes] Source: [mol_id: 1; synthetic: yes] Keywords: [calcium, alternate conformation, ultrahigh resolution, trp repressor, polyamide]</td> </tr> <tr align='center'> <td>1gci</td> <td>x-ray diffraction</td> <td>0.78</td> <td>Header: [serine protease 02-sep-98 1gci] Title: [the 0.78 angstroms structure of a serine protease - bacillus lentus subtilisin] Compound: [mol_id: 1; molecule: subtilisin; chain: null; ec: 3.4.21.62; engineered: yes; biological_unit: monomer] Source: [mol_id: 1; organism_scientific: bacillus lentus; expression_system: bacillus subtilis] Keywords: [bacillus lentus, hydrolase, serine protease, ultra-high resolution]</td> </tr> <tr align='center'> <td>1iua</td> <td>x-ray diffraction</td> <td>0.80</td> <td>Header: [electron transport 01-mar-02 1iua] Title: [ultra-high resolution structure of hipip from thermochromatium tepidum] Compound: [mol_id: 1; molecule: high-potential iron-sulfur protein; chain: a] Source: [mol_id: 1; organism_scientific: thermochromatium tepidum; organism_common: bacteria] Keywords: [ultra-high resolution, crystal structure]</td> </tr> <tr align='center'> <td>1dpl</td> <td>x-ray diffraction</td> <td>0.83</td> <td>Header: [deoxyribonucleic acid 27-dec-99 1dpl] Title: [a-dna decamer gcgta(t23)tacgc with incorporated 2'-methoxy- 3'-methylenephosphate-thymidine] Compound: [mol_id: 1; molecule: 5'-d(*gp*cp*gp*tp*ap*(t23)p*ap*cp*gp*c)-3'; chain: a, b; engineered: yes] Source: [mol_id: 1; synthetic: yes] Keywords: [deoxyribonucleic acid]</td> </tr> <tr align='center'> <td>1m40</td> <td>x-ray diffraction</td> <td>0.85</td> <td>Header: [hydrolase 01-jul-02 1m40] Title: [ultra high resolution crystal structure of tem-1] Compound: [mol_id: 1; molecule: beta-lactamase tem; chain: a; synonym: tem-1; ec: 3.5.2.6; engineered: yes; mutation: yes] Source: [mol_id: 1; organism_scientific: escherichia coli; organism_common: bacteria; gene: bla; expression_system: escherichia coli; expression_system_common: bacteria; expression_system_strain: sf120; expression_system_vector_type: plasmid; expression_system_plasmid: palter ex ii - tem-1] Keywords: [acylation mechanism, x-ray structure, ultra- high resolution]</td> </tr> </table> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ex_php_google.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ex_php_google.php +++ presentations/slides/sdphp/scripts/ex_php_google.php <?php include_once 'SOAP/Client.php'; $key = 'xxxxxxxxxxxxxxxx' $query = array( 'key' => $key, 'q' => 'link:metallo.scripps.edu', 'start' => 0, 'maxResults' => 10, 'filter' => true, 'restrict' => '', 'safeSearch' => false, 'lr' => '', 'ie' => '', 'oe' => '' ); $wsdl = new SOAP_WSDL('GoogleSearch.wsdl'); $client = $wsdl->getProxy(); $result = $client->doGoogleSearch($query) print_r($result); ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/rest-example.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/rest-example.php +++ presentations/slides/sdphp/scripts/rest-example.php <?php $now = time(); $uptime = `uptime`; $re='/^\s*([0-9]{1,2}:[0-9]{2}(am|pm))\s+up (.+),\s+(\d+) users,\s+load average: (.+), (.+), (.+)/'; $timestamp = gmdate('Y-m-d H:i:s', $now); preg_match($re, $uptime, $part); $uptime = array( 'time' => $part[1], 'duration' => $part[3], 'users' => (int)$part[4], 'load1' => (float)$part[5], 'load5' => (float)$part[6], 'load15' => (float)$part[7], ); $packet = wddx_packet_start('uptime info'); wddx_add_vars($packet, 'timestamp', 'uptime'); $out = wddx_packet_end($packet); echo $out; ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_rest_sample_client.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_rest_sample_client.php +++ presentations/slides/sdphp/scripts/ws_rest_sample_client.php <?php // Sample REST server - returns uptime information // Jesus M. Castagnetto //$host = 'www.example.com'; //$port = 80; //$serverPath = '/xmlrpc/server.php' $host = 'jmc.sdsc.edu'; $port = 6666; $serverPath = '/misc/ws_rest_sample_server.php'; $packet = file_get_contents("http://{$host}:{$port}{$serverPath}"); $tmp = wddx_deserialize($packet); extract($tmp); $sep = str_repeat('*',50); echo <<< _END $sep Uptime for : $host Timestamp (UTC) : $timestamp Local time at host : {$uptime['time']} Host has run for : {$uptime['duration']} Number of current users : {$uptime['users']} Average number of jobs in queue 1 minute : {$uptime['load1']} 5 minutes : {$uptime['load5']} 15 minutes : {$uptime['load15']} $sep _END; ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_rest_sample_server.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_rest_sample_server.php +++ presentations/slides/sdphp/scripts/ws_rest_sample_server.php <?php // Sample REST server - returns uptime information // Jesus M. Castagnetto $re = '/^\s*([0-9]{1,2}:[0-9]{2}(am|pm))\s+up (.+),'; $re .= '\s+(\d+) users,\s+load average: (.+), (.+), (.+)/'; $now = time(); $uptime = `uptime`; preg_match($re, $uptime, $part); $timestamp = gmdate('Y-m-d H:i:s', $now); $uptime = array( 'time' => $part[1], 'duration' => $part[3], 'users' => (int)$part[4], 'load1' => (float)$part[5], 'load5' => (float)$part[6], 'load15' => (float)$part[7], ); $packet = wddx_packet_start('uptime info'); wddx_add_vars($packet, 'timestamp', 'uptime'); $out = wddx_packet_end($packet); echo $out; ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_util_functions.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_util_functions.php +++ presentations/slides/sdphp/scripts/ws_util_functions.php <?php function getUptime() { $now = time(); $uptime = `uptime`; $re = '/^\s*([0-9]{1,2}:[0-9]{2}(am|pm))\s+up (.+),'; $re .= '\s+(\d+) users,\s+load average: (.+), (.+), (.+)/'; $timestamp = gmdate('Y-m-d H:i:s', $now); preg_match($re, $uptime, $part); $uptime = array( 'time' => $part[1], 'duration' => $part[3], 'users' => (int)$part[4], 'load1' => (float)$part[5], 'load5' => (float)$part[6], 'load15' => (float)$part[7], ); return array($timestamp, $uptime); } ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_xmlrpc_sample_client.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_xmlrpc_sample_client.php +++ presentations/slides/sdphp/scripts/ws_xmlrpc_sample_client.php <?php require_once 'XML/RPC.php'; //$host = 'www.example.com'; //$port = 80; //$serverPath = /rest/uptime.php'; $host = 'jmc.sdsc.edu'; $port = 6666; $serverPath = '/misc/ws_xmlrpc_sample_server.php'; $message = new XML_RPC_Message('method.serverUptime'); $client = new XML_RPC_Client($serverPath, $host, $port); $resp = $client->send($message); $value = $resp->value(); $uptime = $value->getval(); $sep = str_repeat('~',56); echo <<< _END $sep Uptime for : $host Timestamp (UTC) : {$uptime['timestampUTC']} Local time at host : {$uptime['timestampLocal']} Host has run for : {$uptime['duration']} Number of current users : {$uptime['users']} Average number of jobs in queue 1 minute : {$uptime['load1']} 5 minutes : {$uptime['load5']} 15 minutes : {$uptime['load15']} $sep _END; ?> http://cvs.php.net/co.php/presentations/slides/sdphp/scripts/ws_xmlrpc_sample_server.php?r=1.1&p=1 Index: presentations/slides/sdphp/scripts/ws_xmlrpc_sample_server.php +++ presentations/slides/sdphp/scripts/ws_xmlrpc_sample_server.php <?php require_once 'XML/RPC/Server.php'; function hostUptime() { $now = time(); $uptime = `uptime`; $re = '/^\s*([0-9]{1,2}:[0-9]{2}(am|pm))\s+up (.+),'; $re .= '\s+(\d+) users,\s+load average: (.+), (.+), (.+)/'; preg_match($re, $uptime, $part); // create the XML-RPC values $timestamp = new XML_RPC_Value(gmdate('Ymd\TH:i:s', $now), 'dateTime.iso8601'); $host_ts = new XML_RPC_Value(date('Ymd\TH:i:s', $now), 'dateTime.iso8601'); $host_uptime = new XML_RPC_Value($part[3], 'string'); $host_users = new XML_RPC_Value($part[4], 'int'); $host_load1 = new XML_RPC_Value($part[5], 'double'); $host_load5 = new XML_RPC_Value($part[6], 'double'); $host_load15 = new XML_RPC_Value($part[7], 'double'); $hostInfo = array( 'timestampUTC' => $timestamp, 'timestampLocal' => $host_ts, 'duration' => $host_uptime, 'users' => $host_users, 'load1' => $host_load1, 'load5' => $host_load5, 'load15' => $host_load15 ); $uptime = new XML_RPC_Value($hostInfo, 'struct'); return new XML_RPC_Response($uptime); } // method metainfo $hostUptime_sig = array(array($XML_RPC_Struct)); $hostUptime_doc = 'Returns the uptime information of the host,' .' and a timestamp (UTC timezone) when the' .' measure was made.'; // dispatch map $map = array ( 'method.serverUptime' => array ( 'function' => 'hostUptime', 'signature' => $hostUptime_sig, 'docstring' => $hostUptime_doc ) ); // start server $server = new XML_RPC_Server($map); $server->service(); ?>