I have to agree with Tracy - data service calls can be very tricky
with mxml; I'd rather use AS.

This thread may give you some pointers:

http://tech.groups.yahoo.com/group/flexcoders/message/134966


--- In flexcoders@yahoogroups.com, "Tracy Spratt" <tspr...@...> wrote:
>
> I like mxml for a lot of things, but invoking data service calls is not
> one of them.  One big problem I have is that declarative binding is hard
> to debug.  My pattern is this:
> 
>  
> 
> var wsOperation:Operation = ws.getList;
> 
> wsOperation.resultFormat = "e4x";
> 
> var atCall:AsyncToken;
> 
> var sQ2:String = dept.selectedItem.data; // trace this value to be sure
> it is good
> 
> var sQ5:String = dept2.selectedItem.data; // trace this value to be sure
> it is good
> 
> var oRequest:Object = {q2 sQ2, q5: sQ5 };
> 
> atCall  = wsOperation.send(oRequest);
> 
> atCall.callId = sCallId;
> 
> ...
> 
>  
> 
> Are you trying to format the SOAP request yourself?  Just pass the
> correctly typed vars in the operation arguments.
> 
>  
> 
> Also, the component namespace, xmlns in the mxml tags should not have
> anything to do with a WebService call.
> 
> Tracy Spratt 
> Lariat Services 
> 
> Flex development bandwidth available 
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of m_ollman
> Sent: Tuesday, February 03, 2009 10:39 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Passing values using mx:WebService
> 
>  
> 
> Hiya flexcoders
> 
> Trying to pass values to a SOAP request. Having some fun :-)
> 
> Working with <mx:WebService> - got it working by placing the SOAP
> request inside of the <mx:request> tag and adding the namespace in
> mx:application-
> xmlns:typ="http://ruleburst.com/ruleserver/9.1/rulebase/types
> <http://ruleburst.com/ruleserver/9.1/rulebase/types> "
> 
> (code @ EOM )
> 
> However when I try to dynamically pass selectedItem to the
> <mx:request> they don not come through. I'm aware of adding values to
> the <mx:request> ie. 
> 
> <mx:operation name="getList">
> <mx:request>
> <q2>{dept.selectedItem.data}</q2>
> <q5>{dept2.selectedItem.data}</q5>
> </mx:request>
> </mx:operation>
> 
> but keep getting an end of file error.
> 
> Question is how do I turn the SOAP request into and <mx:request>
> request?
> 
> Thanks in advance 
> rgds
> martin
> 
> <mx:request format="xml">
> 
> <typ:assess-request>
> <typ:session-data>
> <typ:list-entity entity-type="global">
> <typ:entity id="global_1">
> <typ:attribute-outcome id="LL"
> outcome-style="attribute-only"/>
> <typ:attribute-outcome id="LC998"
> outcome-style="attribute-only"/>
> <typ:attribute-outcome id="AssessmentLevel"
> outcome-style="attribute-only"/>
> <typ:attribute-outcome id="ProcessingTime"
> outcome-style="attribute-only"/>
> <typ:attribute id="Q2">
> <typ:text-val>"GERM"</typ:text-val>
> </typ:attribute>
> <typ:attribute id="Q5">
> <typ:text-val>"GERM"</typ:text-val>
> </typ:attribute>
> <typ:attribute id="XYZ988">
> <typ:boolean-val>true</typ:boolean-val>
> </typ:attribute>
> </typ:entity>
> </typ:list-entity>
> </typ:session-data>
> </typ:assess-request>
> </mx:request>
>


Reply via email to