Re: [flexcoders] data returned from WSDL call

2008-12-17 Thread Nate Beck
You can also put a  at the top of your MXML document to
see all the data going back and forth.  That's how I troubleshoot when I'm
dealing with SOAP.
Cheers,
Nate

On Wed, Dec 17, 2008 at 9:21 AM, Tracy Spratt  wrote:

>Have you set resultFormat="e4x"?  If not, you are not working with
> xml.  Flex has generated a tree of dynamic objects.  Though it allows you to
> go straight to an arrayCollection, this format is rarely desirable.
>
>
>
> Set the resultFormat, then in your result handler do:
>
> var xmlResult = event.result as XML;
>
> trace(xmlResult.toXMLString);
>
>
>
> You will see your xml as flex sees it.
>
>
>
> Be aware that you may have xml namespace issues accessing the nodes via e4x
> expressions.  Google, check archives and see the docs for help with this.
>
>
>
> Tracy
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
> Behalf Of *Louise Rains
> *Sent:* Wednesday, December 17, 2008 9:28 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] data returned from WSDL call
>
>
>
> I'm getting data back from a wsdl call that looks like this:
>
>
>
>   xmlns:ns0="urn:AMAT_Asset_KeyGen" xmlns:xsd="
>
> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
>
> http://www.w3.org/2001/XMLSchema-instance";>
>
> 
>
> 0200362
>
>
> 2007-03-31T00:00:00-04:00
>
>
>
> SOME COMPANY
>
> ALFLSS3300-1400
>
> PER
>
> AUTOMOD
>
> 1.00
>
> SOME SITE
>
>  
>
> …
>
> 
>
>
>
> If I have multiple  returned, I can use an ArrayCollection
> and step through each object in the collection to get the data.  However,
> I'm having a hard time determining the type of event.result in the case
> where there is only one  object returned.  When I trace
> event.result, I get [object Object].  If I try to cast it to XML, XMLList or
> ArrayCollection, I get null objects.
>
>
>
> Is there a way to use reflection to determine what the [object Object]
> really is?  How can I access the data that's coming back?
>
>
>
> Thanks!
>
>
>
> LG Rains
>
>  
>



-- 

Cheers,
Nate

http://blog.natebeck.net


RE: [flexcoders] data returned from WSDL call

2008-12-17 Thread Tracy Spratt
Have you set resultFormat="e4x"?  If not, you are not working with xml.
Flex has generated a tree of dynamic objects.  Though it allows you to
go straight to an arrayCollection, this format is rarely desirable.

 

Set the resultFormat, then in your result handler do:

var xmlResult = event.result as XML;

trace(xmlResult.toXMLString);

 

You will see your xml as flex sees it.

 

Be aware that you may have xml namespace issues accessing the nodes via
e4x expressions.  Google, check archives and see the docs for help with
this.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Louise Rains
Sent: Wednesday, December 17, 2008 9:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] data returned from WSDL call

 

I'm getting data back from a wsdl call that looks like this:

 

 http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
xmlns:xsi="

http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> ">



0200362

2007-03-31T00:00:00-04:00

 

SOME COMPANY

ALFLSS3300-1400

PER

AUTOMOD

1.00

SOME SITE

  

...



 

If I have multiple  returned, I can use an
ArrayCollection and step through each object in the collection to get
the data.  However, I'm having a hard time determining the type of
event.result in the case where there is only one  object
returned.  When I trace event.result, I get [object Object].  If I try
to cast it to XML, XMLList or ArrayCollection, I get null objects.  

 

Is there a way to use reflection to determine what the [object Object]
really is?  How can I access the data that's coming back?

 

Thanks!

 

LG Rains

 



[flexcoders] data returned from WSDL call

2008-12-17 Thread Louise Rains
I'm getting data back from a wsdl call that looks like this:

 

 http://www.w3.org/2001/XMLSchema"; xmlns:xsi="

http://www.w3.org/2001/XMLSchema-instance";>



0200362

2007-03-31T00:00:00-04:00

 

SOME COMPANY

ALFLSS3300-1400

PER

AUTOMOD

1.00

SOME SITE

  

.



 

If I have multiple  returned, I can use an ArrayCollection
and step through each object in the collection to get the data.  However,
I'm having a hard time determining the type of event.result in the case
where there is only one  object returned.  When I trace
event.result, I get [object Object].  If I try to cast it to XML, XMLList or
ArrayCollection, I get null objects.  

 

Is there a way to use reflection to determine what the [object Object]
really is?  How can I access the data that's coming back?

 

Thanks!

 

LG Rains