6 Replies Latest reply on Jul 3, 2006 12:30 AM by SallyZhao

    [Newbie] Stuck in simple Google web service app

    SallyZhao Level 1
      I am using Flex2.0 and try to build a simple application to consum Google web service and get some search results. I just cant get it work. There is an error as following when I run it:

      [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://api.google.com/search/beta2" URL: http://api.google.com/search/beta2"
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()
      at mx.rpc::Responder/fault()
      at mx.rpc::AsyncRequest/fault()
      at ::DirectHTTPMessageResponder/errorHandler()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()


      And this is my code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:WebService id="ws" wsdl=" http://api.google.com/GoogleSearch.wsdl">
      <mx:operation name="doGoogleSearch">
      <mx:request>
      <key>p2rYjt1QFHI2VSchlhc9oSzM9rMzjn0n</key>
      <q>{input.text}</q>
      <start>0</start>
      <maxResults>10</maxResults>
      <filter>true</filter>
      <safeSearch>false</safeSearch>
      <restrict/>
      <lr/>
      <ie>latin1</ie>
      <oe>latin1</oe>
      </mx:request>
      </mx:operation>
      </mx:WebService>

      <mx:TextInput x="63" y="57" height="22" id="input"/>
      <mx:Button x="244" y="57" label="Search" click="ws.doGoogleSearch.send()"/>
      <mx:TextArea text="{ws.doGoogleSearch.result}" x="63" y="96" height="29"/>
      </mx:Application>


      I don't know what cause this. Can anybody give some idea? Thanks in advance.

      Sally