Try:
 
<web service name>.<method>.lastResult.<method>Result.<top xml>.<xml children>
 
This works for me with .NET web services that return XML.

Darren Houle <[EMAIL PROTECTED]> wrote:
Bump??

Darren

>From: "Darren Houle" <[EMAIL PROTECTED]com>
>Reply-To: [EMAIL PROTECTED]ups.com
>To: [EMAIL PROTECTED]ups.com
>Subject: [flexcoders] How to cast a WebService lastResult when CFC
>returnType="xml"
>Date: Fri, 18 Aug 2006 23:08:44 -0400
>
>I have a ColdFusion Component (web service) that looks like...
>
><cffunction name="getEmployees" access="remote" output="false"
>returntype="xml">
> <cfxml variable="myxml">
> <people>
> <person>
> <firstname>John</firstname>
> <lastname>Smith</lastname>
> <job>
> <title>Doctor</title>
> <description>blah blah blah</description>
> </job>
> </person>
> <person>
> <firstname>Jane</firstname>
> <lastname>Doe</lastname>
> <job>
> <title>Lawyer</title>
> <description>blah blah blah</description>
> </job>
> </person>
> </people>
> </cfxml>
> <cfreturn myxml>
></cffunction>
>
>and some Flex code that looks like...
>
><?xml version="1.0" encoding="utf-8"?>
><mx:Application
> xmlns:mx="http://www.adobe.com/2006/mxml"
> creationComplete="TestService.getEmployees.send();">
> <mx:WebService id="TestService" wsdl="http://localhost/hr.cfc?wsdl">
> <mx:operation name="getEmployees" />
> </mx:WebService>
> <mx:Tree
> id="myTree"
> width="50%"
> height="50%"
> showRoot="false"
> dataProvider="{TestService.getEmployees.lastResult}"/>
></mx:Application>
>
>But what I get is a Tree that looks like:
>
>Flex doesn't seem to be able to extract the XML from the SOAP message,
>which
>is just SOAP XML wrapping my XML data.
>
>Changing the Operation's resultFormat from "e4x" to "xml" to "object"
>changes the amount of junk in the Tree, but doesn't fix the problem. As a
>matter of fact, it works best when I leave off this attribute and let the
>Operation decide what resultFormat to use.
>
>Casting lastResult as XML or XMLList doesn't seem to help either, and
>neither does
>ArrayUtil.toArray(TestService.getEmployee.lastResult)
>
>Is there something I need to do to the lastResult to get it to work in
>Trees, DataGrids, etc? Like cast it as some other data type? Why doesn't
>e4x parse the SOAP message properly and extract my XML?
>
>Just about every example I can find out there shows people using
>HTTPService
>to pull back just the XML data without the SOAP webservice stuff, or else
>shows how to create XML inside the mxml code itself using <mx:XML> but I
>can
>find nothing that shows how to return XML from a CFC web service and
>use/parse it in Flex properly (as easy as, say, a CFC that returns a Query
>object.)
>
>Darren



Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less. __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to