Expand my Community achievements bar.

Web Service Output

Avatar

Level 1
I have a CFC with access="remote" that returns the follownig
XML :

<section id="Main">

<field>

<fquestion>Named Insured</fquestion>

<id>s36</id>

<ftype>text</ftype>

<flabel>ABC Daycare</flabel>

</field>

<field>

<fquestion>Insured Address</fquestion>

<id>12</id>

<ftype>text</ftype>

<flabel>123 Main Street</flabel>

</field>

</section>



I have ServiceCapture running and can verify that the XML is
being generated.



In my Flex app I create the WS :

<mx:WebService wsdl="
http://www.thomcoins.com/Services/appData.cfc?wsdl"
id="fXML" showBusyCursor="true">

<mx:operation name="getXML">

<mx:request xmlns="">

<section>{textData.text}

</section>

</mx:request>

</mx:operation>

</mx:WebService>



But when I try to set the results into a text area :

xmlTextNew.text = fXML.getXML.lastResult;

nothing displays at all.

If I change it to fXML.getXML.lastResult.section;

I get the error TypeError: Error #1009: Cannot access a
property or method of a null object reference.



What am I missing?



Thanks,

3 Replies

Avatar

Employee
Hi,



What value are you passing to the CFC to get that XML result
?



I can hit the CFC and get a result to display, but I'm
getting back a larger XML result set when passing an empty string
or some random text. So if you can get me to the same point you are
I can help debug.



regards,

peter

Avatar

Level 1
That's the whole data set. To save space in the code I
trimmed it down. RIght now the input parameter is not used in the
CFC, its going to retunt the same XML regardless.



I was just saving space in the post ;-)

Avatar

Employee
Ok thanks for clarifying. I was getting a result back
yesterday, but today I can't hit the CFC for some reason, did
something change?



- peter