• λ我爱Aspx >> Asp.Net >> 使用Google的Web Service
  • 使用Google的Web Service

  • :aspxer  Դ:internet  :2007-5-28 20:36:38  ؼ:web,google
  • 3)申请Google访问帐号,目前Google支持免费申请的方式,用户需要使用一个email帐号来获取新帐号。注意,目前免费帐号支持每天1000条的最大查询量。申请地址:http://www.google.com/apis。

    4)(可选) 如果用户需要通过Java程序直接发送SOAP请求,开发人员需要下载相关的Java 软件包,JAXM。下载地址:http://java.sun.com/xml

    三、SOAP的使用

    Google提供了基于SOAP的Web Service,因此用户可以向Google服务器提交SOAP的查询请求,而后Google服务器将处理这些请求,并返回SOAP格式的查询结果。以下就是一个查询请求和查询结果。

    查询:例如,有一个查询请求,请求类型为搜索,查询的内容为“world cup”,帐号为“123456789”,如下为该查询的一个例子。

    <?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/">

    Ҷƪл˵?
  • һƪ利用正则表达式将html网页数据变成Web Service
    һƪ新浪短信Web Service