<mx:operation name=”doGoogleSearch” resultFormat=”xml” />

 

Matt

 


From: dduuggllaa [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 20053:25 PM
To: [email protected]
Subject: [flexcoders] Doesn't a Web Service return XML? Confused

 


I implemented the Google WebService in Flex.Works fine. I now want to
snoop in the returned results. I'm having a very difficult time
extracting the XML payload.

My service:
<mx:WebService id="ws wsdl="http://api.google.com/GoogleSearch.wsdl">
     
  <mx:operation name="doGoogleSearch">
           
    // ...
           
  </mx:operation>
           
</mx:WebService>

The query:
<mx:HBox>
  <mx:TextInput id="query" width="400"/>
  <mx:Button label="Search" click="ws.doGoogleSearch.send()"/>
</mx:HBox>

According to a Macromedia technote this should work:

<mx:TextArea id="theDump" text="{ws.doGoogleSearch.result}" />

Nope. Instead it produces this:
[object Object]

Huh?

So I tried:
<mx:TextArea id="theDump"
text="{ws.doGoogleSearch.result.resultElements}" />

Producing:
[object Object],[object Object],[object Object],[object
Object],[object Object],[object Object],[object Object],[object
Object],[object Object],[object Object]

Huh? Again.

What am I missing here?

-Douglass





Reply via email to