cvs: presentations /slides/webservices BabelFishService.wsdl GoogleSearch.wsdl babelfish.php buzzword.xml mice-small.jpg mice.jpg simple.wsdl soap.xml
soap1.xml soap2.xml soap3.xml soapex1.xml wsdl.xml wsdl1.xml

From: Date: Sat, 05 Jul 2003 22:19:23 +0000
Subject: cvs: presentations /slides/webservices BabelFishService.wsdl GoogleSearch.wsdl babelfish.php buzzword.xml mice-small.jpg mice.jpg simple.wsdl soap.xml
soap1.xml soap2.xml soap3.xml soapex1.xml wsdl.xml wsdl1.xml
Groups: php.pres 
Request: Send a blank email to pres+get-788@lists.php.net to get a copy of this message
sterling Sat Jul 5 18:19:23 2003 EDT Added files: /presentations/slides/webservices BabelFishService.wsdl babelfish.php mice-small.jpg mice.jpg simple.wsdl soap.xml soap1.xml soap2.xml soap3.xml soapex1.xml wsdl.xml wsdl1.xml Modified files: /presentations/slides/webservices GoogleSearch.wsdl buzzword.xml Log: add some new files and examples

Index: presentations/slides/webservices/GoogleSearch.wsdl diff -u presentations/slides/webservices/GoogleSearch.wsdl:1.1 presentations/slides/webservices/GoogleSearch.wsdl:1.2 --- presentations/slides/webservices/GoogleSearch.wsdl:1.1 Sat Jul 5 14:57:40 2003 +++ presentations/slides/webservices/GoogleSearch.wsdl Sat Jul 5 18:19:23 2003 @@ -1,198 +1,168 @@ -<?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 --> +<?xml version="1.0" ?> <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> + 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> + <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> + +<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> + +<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> + +<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 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> + +<service name="GoogleSearchService"> + <port name="GoogleSearchPort" binding="typens:GoogleSearchBinding"> + <soap:address location="http://api.google.com/search/beta2"/> + </port> +</service> </definitions> Index: presentations/slides/webservices/buzzword.xml diff -u presentations/slides/webservices/buzzword.xml:1.2 presentations/slides/webservices/buzzword.xml:1.3 --- presentations/slides/webservices/buzzword.xml:1.2 Sat Jul 5 15:36:24 2003 +++ presentations/slides/webservices/buzzword.xml Sat Jul 5 18:19:23 2003 @@ -1,7 +1,7 @@ <slide title="Of Mice and Buzzwords"> -<image filename="weirdsisters-small.jpg" align="right"/> +<image filename="mice.jpg" align="left"/> <break lines="3"/> -<blurb align="center" fontsize="4.0em"> +<blurb align="right" fontsize="3.5em"> <![CDATA[ But, Mousie, thou art no thy lane<br /> In proving foresight may be vain:<br /> Index: presentations/slides/webservices/BabelFishService.wsdl +++ presentations/slides/webservices/BabelFishService.wsdl <?xml version="1.0"?> <definitions name="BabelFishService" xmlns:tns="http://www.xmethods.net/sd/BabelFishService.wsdl" targetNamespace="http://www.xmethods.net/sd/BabelFishService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <message name="BabelFishRequest"> <part name="translationmode" type="xsd:string"/> <part name="sourcedata" type="xsd:string"/> </message> <message name="BabelFishResponse"> <part name="return" type="xsd:string"/> </message> <portType name="BabelFishPortType"> <operation name="BabelFish"> <input message="tns:BabelFishRequest" /> <output message="tns:BabelFishResponse" /> </operation> </portType> <binding name="BabelFishBinding" type="tns:BabelFishPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="BabelFish"> <soap:operation soapAction="urn:xmethodsBabelFish#BabelFish"/> <input> <soap:body use="encoded" namespace="urn:xmethodsBabelFish" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:xmethodsBabelFish" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="BabelFishService"> <documentation>Translates text of up to 5k in length, between a variety of languages.</documentation> <port name="BabelFishPort" binding="tns:BabelFishBinding"> <soap:address location="http://services.xmethods.net:80/perl/soaplite.cgi"/> </port> </service> </definitions> Index: presentations/slides/webservices/babelfish.php +++ presentations/slides/webservices/babelfish.php <?php require_once('SOAP/Client.php'); $wsdlurl = 'BabelFishService.wsdl'; $WSDL = new SOAP_WSDL($wsdlurl); $babel = $WSDL->getProxy(); echo $babel->BabelFish('de_en', 'Unser erstes Beispiel'); ?> Index: presentations/slides/webservices/simple.wsdl +++ presentations/slides/webservices/simple.wsdl <?xml version="1.0"?> <definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:SQ="http://example.com/stockquote.wsdl" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <message name="GetTradePriceInput"> <part name="tickerSymbol" element="xsd:string"/> <part name="time" element="xsd:timeInstant"/> </message> <message name="GetTradePriceOutput"> <part name="result" type="xsd:float"/> </message> <portType name="StockQuotePortType"> <operation name="GetTradePrice"> <input message="SQ:GetTradePriceInput"/> <output message="SQ:GetTradePriceOutput"/> </operation> </portType> <binding name="StockQuoteSoapBinding" type="SQ:StockQuotePortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetTradePrice"> <soap:operation soapAction="http://example.com/GetTradePrice"/> <input> <soap:body use="encoded" namespace="http://example.com/stockquote" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="http://example.com/stockquote" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="StockQuoteService"> <documentation>My first service</documentation> <port name="StockQuotePort" binding="tns:StockQuoteBinding"> <soap:address location="http://example.com/stockquote"/> </port> </service> </definitions> Index: presentations/slides/webservices/soap.xml +++ presentations/slides/webservices/soap.xml <slide title="SOAP"> <image filename="mice-small.jpg" align="right"/> <break lines="6"/> <blurb fontsize="4.0em"> SOAP is not an acronym </blurb> <blurb fontsize="4.0em"> If it were, it would stand for Simple Object Access Protocol </blurb> <blurb fontsize="4.0em"> But SOAP is not an acronym </blurb> </slide> Index: presentations/slides/webservices/soap1.xml +++ presentations/slides/webservices/soap1.xml <slide title="SOAP"> <image filename="mice-small.jpg" align="right"/> <break lines="6"/> <blurb fontsize="4.0em"> SOAP is a messaging format, not an RPC format </blurb> <blurb fontsize="4.0em"> SOAP is primarily used for RPC </blurb> <blurb fontsize="4.0em"> But SOAP is a messaging format! </blurb> </slide> Index: presentations/slides/webservices/soap2.xml +++ presentations/slides/webservices/soap2.xml <slide title="SOAP Document"> <image filename="mice-small.jpg" align="right"/> <break lines="4"/> <blurb fontsize="4.0em"> A SOAP Document must meet the following requirements </blurb> <list fontsize="4.0em"> <bullet>Must have a top-level %Envelope% namespaced to http://soapinterop.org/</bullet> <bullet>Must contain a %Header% and %Body% element</bullet> <bullet>The contents of that %Header% and %Body% must be properly namespaced</bullet> </list> </slide> Index: presentations/slides/webservices/soap3.xml +++ presentations/slides/webservices/soap3.xml <slide title="SOAP Doc Cont."> <image filename="mice-small.jpg" align="right"/> <break lines="8"/> <blurb fontsize="4.5em">Simplest SOAP Document</blurb> <break/> <example><![CDATA[<?xml version="1.0"?> <Envelope xmlns="http://soapinterop.org"/> <Header> </Header> <Body> </Body> </Envelope>]]></example> </slide> Index: presentations/slides/webservices/soapex1.xml +++ presentations/slides/webservices/soapex1.xml <slide title="SOAP and WSDL"> <image filename="mice-small.jpg" align="right"/> <php><![CDATA[<?php chdir(getcwd() . '/presentations/slides/webservices/'); ?>]]></php> <break lines="2"/> <blurb fontsize="4.0em"> We will use the WSDL file from %xmethods.net% to autogenerate a wrapper call, and then call the appropriate method. </blurb> <example filename="babelfish.php" result="1"/> </slide> Index: presentations/slides/webservices/wsdl.xml +++ presentations/slides/webservices/wsdl.xml <slide title="WSDL"> <image filename="mice-small.jpg" align="right"/> <break lines="4"/> <blurb fontsize="4.0em"> WSDL *is* an acronym </blurb> <blurb fontsize="4.0em"> It stands for Web Services Description Layer. </blurb> <blurb fontsize="4.0em"> Its certainly not Simple. </blurb> </slide> Index: presentations/slides/webservices/wsdl1.xml +++ presentations/slides/webservices/wsdl1.xml <slide title="Welcome to the jungle"> <image filename="mice-small.jpg" align="right"/> <break lines="10"/> <example filename="simple.wsdl" fontsize="1.9em"/> </slide>
« previous php.pres (#788) next »