Re: [SOAP] googles web services and php-soap
| From: | Brad LaFountain | Date: | Sun, 04 Aug 2002 10:47:01 +0000 |
| Subject: | Re: [SOAP] googles web services and php-soap | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-209@lists.php.net to get a copy of this message | ||
You sure can.
<?
$s = new SoapObject("GoogleSearch.wsdl");
$results = $s->doGoogleSearch("XXX", "rodif_bl", 0, 10, false,
'', false,
'', '','');
?>
This is from SourceForge's CVS.
-brad
--- Niklas Fondberg <niklas.fondberg@i3micro.com> wrote:
> Can I use php-soap to interface googles soap?
>
> Examples:
>
> request:
> ----
> <?xml version='1.0' encoding='UTF-8'?>
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"
>
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"v‡!C
> ‘6çðÇdþó>
> <key xsi:type="xsd:string">00000000000000000000000000000000</key>
> <q xsi:type="xsd:string">shrdlu winograd maclisp teletype</q>
> <start xsi:type="xsd:int">0</start>
> <maxResults xsi:type="xsd:int">10</maxResults>
> <filter xsi:type="xsd:boolean">true</filter>
> <restrict xsi:type="xsd:string"></restrict>
> <safeSearch xsi:type="xsd:boolean">false</safeSearch>
> <lr xsi:type="xsd:string"></lr>
> <ie xsi:type="xsd:string">latin1</ie>
> <oe xsi:type="xsd:string">latin1</oe>
> </ns1:doGoogleSearch>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
>
> response:
> ----
> <?xml version='1.0' encoding='UTF-8'?>
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:doGoogleSearchResponse xmlns:ns1="urn:GoogleSearch" SOAP-
>
> ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <return xsi:type="ns1:GoogleSearchResult">
> <documentFiltering
> xsi:type="xsd:boolean">false</documentFiltering>
> <estimatedTotalResultsCount
> xsi:type="xsd:int">3</estimatedTotalResultsCount>
> <directoryCategories
> xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns2:Array"
> ns2:arrayType="ns1:DirectoryCategory[0]"></directoryCategories>
> <searchTime xsi:type="xsd:double">0.194871</searchTime>
> <resultElements
> xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
>
> xsi:type="ns3:Array" ns3:arrayType="ns1:ResultElement[3]">
> <item xsi:type="ns1:ResultElement">
> <cachedSize xsi:type="xsd:string">12k</cachedSize>
> <hostName xsi:type="xsd:string"></hostName>
> <snippet xsi:type="xsd:string">
> <b>...</b> on a
> simple
> dialog (via <b>teletype</b>) with a user, about a
> <b>...</b>
>
http://hci.stanford.edu/<b>winograd</b>/<b>shrdlu</b><
> ;br> . It is written in <b>MacLisp</b>, vintage 1970, and to
>
> <b>...</b></snippet>
> <directoryCategory xsi:type="ns1:DirectoryCategory">
> <specialEncoding xsi:type="xsd:string"></specialEncoding>
> <fullViewableName xsi:type="xsd:string"></fullViewableName>
> </directoryCategory>
> <relatedInformationPresent
> xsi:type="xsd:boolean">true</relatedInformationPresent>
> <directoryTitle xsi:type="xsd:string"></directoryTitle>
> <summary xsi:type="xsd:string"></summary>
> <URL
>
> xsi:type="xsd:string">http://hci.stanford.edu/cs147/examples/shrdlu/</URL>
> <title
> xsi:type="xsd:string"><b>SHRDLU</b></title>
> </item>
> <item xsi:type="ns1:ResultElement">
> <cachedSize xsi:type="xsd:string">12k</cachedSize>
> <hostName xsi:type="xsd:string"></hostName>
> <snippet xsi:type="xsd:string">
> <b>...</b> on a
> simple
> dialog (via <b>teletype</b>) with a user, about a
> <b>...</b>
>
http://hci.stanford.edu/<b>winograd</b>/<b>shrdlu</b>/co
> de<br> . It is written in <b>MacLisp</b>, vintage
> 1970, and
>
> to <b>...</b></snippet>
> <directoryCategory xsi:type="ns1:DirectoryCategory">
> <specialEncoding xsi:type="xsd:string"></specialEncoding>
> <fullViewableName xsi:type="xsd:string"></fullViewableName>
> </directoryCategory>
> <relatedInformationPresent
> xsi:type="xsd:boolean">true</relatedInformationPresent>
> <directoryTitle xsi:type="xsd:string"></directoryTitle>
> <summary xsi:type="xsd:string"></summary>
> <URL
>
> xsi:type="xsd:string">http://hci.stanford.edu/winograd/shrdlu</URL>
> <title
> xsi:type="xsd:string"><b>SHRDLU</b></title>
> </item>
> <item xsi:type="ns1:ResultElement">
> <cachedSize xsi:type="xsd:string">32k</cachedSize>
> <hostName xsi:type="xsd:string"></hostName>
> <snippet xsi:type="xsd:string">
> <b>...</b> man and
> woman through <b>teletype</b> and has to
> <b>...</b>
> human diseases) 1970* Terry <b>Winograd's</b>
> <b>SHRDLU</b><br> (Natural Language Processing
> <b>...</b> Lisp Machine Lisp,
> <b>MacLisp</b>, NIL,
> S-1
> <b>...</b></snippet>
> <directoryCategory xsi:type="ns1:DirectoryCategory">
> <specialEncoding xsi:type="xsd:string"></specialEncoding>
> <fullViewableName xsi:type="xsd:string"></fullViewableName>
> </directoryCategory>
> <relatedInformationPresent
> xsi:type="xsd:boolean">true</relatedInformationPresent>
> <directoryTitle xsi:type="xsd:string"></directoryTitle>
> <summary xsi:type="xsd:string"></summary>
> <URL
>
xsi:type="xsd:string">http://www.trentu.ca/csd/newsarchives/trentu/csp/cr350/79<
> /URL>
> <title xsi:type="xsd:string"></title>
> </item>
> </resultElements>
> <endIndex xsi:type="xsd:int">3</endIndex>
> <searchTips xsi:type="xsd:string"></searchTips>
> <searchComments xsi:type="xsd:string"></searchComments>
> <startIndex xsi:type="xsd:int">1</startIndex>
> <estimateIsExact xsi:type="xsd:boolean">true</estimateIsExact>
> <searchQuery xsi:type="xsd:string">shrdlu winograd maclisp
> teletype</searchQuery>
> </return>
> </ns1:doGoogleSearchResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com