[
Lists Home |
Date Index |
Thread Index
]
Mike Champion wrote:
>
>...
>
> Hmm, one comment on that weblog may say it all: "There's one significant
> difference between Google's XML results and Google's SOAP API: the
> XML results gave you a document and left you on your own; the SOAP
> API gives you pre-digested data structures."
That's not true for a variety of reasons.
First, Google shipped Java and C# client libraries. They could have used
ASN.1 running on UDP for all Java and C# programmers care about the
underlying protocol.
Second, the returned results are just XML. It does not "pre-digest" data
structures. Rather there are tools for various languages that read XML
Schemas and WSDLs and generate "digesters" for the data. SOAP is
irrelevant. XML Schema obviously doesn't care about HTTP versus SOAP and
WSDL actually has sufficient HTTP support to handle the Google API (it
doesn't need PUT or DELETE). This actually works in practice with
Microsoft's WSDL toolkits -- though there are a raft of bugs and missing
features that you have to work around.
Third, consider for a second the response messages for two out of the
three methods:
1: doSpellingSuggestion
<?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:doSpellingSuggestionResponse xmlns:ns1="urn:GoogleSearch"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:string">britney spears</return>
</ns1:doSpellingSuggestionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Ten lines to return two words! This is the exact opposite of
"pre-digested."
2:
<?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:doGetCachedPageResponse xmlns:ns1="urn:GoogleSearch"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:base64">PEJBU0UgSFJFRj0iaHR0cDovL3d3dy5nb29nbGUuY29tLyI+PHRhYmxlIGJvcmRlcj0xIHdpZHRoPTEwMCU+PHRyPjx0ZD48dGFibGUgYm9yZGVyPTEgYmdjb2xvcj0jZmZmZmZmIGNlbGxwYWRkaW5nPTEwIGNlbGxzcGFjaW5nPTAgd2
</return>
</ns1:doGetCachedPageResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
A Base64-ed encoding of a web page that *already has a URL* and can
*already be fetched through HTTP*. This is again the opposite of
pre-digestion: it's obfuscation!
Paul Prescod
|