Hi All.
I am using a HTTPservice to retrieve data, it works fine when there's
multiple items in the xml.
But if there's only one (1) item in the data, it fails with this error:

Type Coercion failed: cannot convert mx.utils::[EMAIL PROTECTED] to
mx.collections.ArrayCollection.

Can anyone please shed some light on this issue ?

Thanks,
Mark

Here's the resulthandler:
        private function jobDetailsHandler(event:ResultEvent):void {
                jobDetails = event.result.action.item;
                }
        }

Here's the xml (that fails):
<action name="jobdetaljer">
<item>
<id>2</id>
<ts>05-02-2007 10:34:36</ts>
<kid>2</kid>
<jobnr>1046</jobnr>
<titel>id&#65533;-nyt test job</titel>
<beskrivelse>Visitkort idenyt</beskrivelse>
<antal>1</antal>
<format>sm&#65533;</format>
<farver>2</farver>
<papir>130g</papir>
<oplag>1500</oplag>
<efterbehandling>nej</efterbehandling>
<reproinfo>ingen</reproinfo>
<levadresse>Klausdalsbrovej 195, 2700 Herlev</levadresse>
</item>
</action>

And finally here's the httpservice:
        <mx:HTTPService id="xmlJobDetaljer"
        url = "data/xml.asp"
        showBusyCursor="true" method="POST" result="jobDetailsHandler(event)">
        <mx:request>
        <action>jobdetaljer</action>
        <jobid>
                {jobid}
        </jobid>
        </mx:request>
        </mx:HTTPService>

Reply via email to