What are the input parameters of the operation "SearchParams"? What data types? Does it have a single argument of type array that that contains an array of "searchcriteria" objects, which have the three search specification values?
The request object is a dynamic "Object", not xml. build it something like this: Var oRequest:Object = new Object(); oRequest.criterialist = buildSearchCriteriaArray() webService.SearchParams.request = oRequest; Be sure to remove the declarative mx:request tag. Tracy Spratt Lariat Services Flex development bandwidth available ________________________________ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of thibodeau.alain Sent: Monday, February 09, 2009 10:30 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Webservice with Dynamic request? Hi All, I am not sure how to go about this and couldn't find a sample anywhere...I am trying to consume a webservice that contains dynamic request data. Meaning that my request will change depending on what the user has entered... I've always used services that had the same request params, but in this case they change... I tried building out in AS my request like this: webService.SearchParams.request = "<criterialist><searchcriteria><title>string</title><item>string</it em><criteria>string</criteria></searchcriteria></criterialist>"; And I have been staring at the request tag not knowing how to make it "loop" <mx:WebService id="webService" wsdl="myservice"> <mx:operation name="SearchParams" result="getSearchDetails_result(event)" fault="getSearchDetails_fault (event)"> <mx:request xmlns="schema"> <!-- This has to be dynamic depending on how many search params were given by user--> <criterialist> <searchcriteria> <title>string</title> <item>string</item> <criteria>string</criteria> </searchcriteria> </criterialist> <!----> </mx:request> </mx:operation> </mx:WebService> I hope it's clear what I am trying to accomplish and that someone can point me in the correct direction... thank-you!