PDA

View Full Version : using webservices


philcruz
10-05-2004, 01:16 PM
I have an web service (produced by ColdFusion MX) that queries a database for users and returns them as an array of structs. I have a Flash client that consumes the service and is able to display the results in a datagrid.

I'm trying to implement this with Laslo. I'm using the <soap> tag and it seems to be loading the web service. The ondata is getting a value. I'm not clear on how to access that data and display in a data grid. Any tips appreciated.

Is there a "dump" function that will take any variable and output it's (nested)contents to the debug window?

Thanks,
Phil

whisperstorm
10-05-2004, 02:25 PM
Try poking around here - the examples there seem to do what you are looking for

http://www.laszlosystems.com/lps-2.2/docs/reference/soap.html

philcruz
10-06-2004, 01:29 PM
I'm working off that example. I seem to be getting the data from the web service but I'm not sure how to specify the datapath (for an array of structs).

When I inspect() the data I see

«array#0| [[object Object]]» {
0: «object#1| {[object Object]: item, item: [object Object]}»
}

If I do inspect(data[0]) I see

«object#2| {key: lastname, value: Cruz}» {
key: lastname
value: Cruz
}

philcruz
10-06-2004, 02:14 PM
I'm calling a getUsers method on the web service. The wsdl (auto-generated by CFMX) is:

<wsdl:message name="getUsersResponse">
<wsdl:part name="getUsersReturn" type="impl:ArrayOf_xsd_anyType"/>
</wsdl:message>

Could this be the issue?