[flexcoders] Re: Passing values using mx:WebService

2009-02-04 Thread valdhor
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"  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  - got it working by placing the SOAP
> request inside of the  tag and adding the namespace in
> mx:application-
> xmlns:typ="http://ruleburst.com/ruleserver/9.1/rulebase/types
>  "
> 
> (code @ EOM )
> 
> However when I try to dynamically pass selectedItem to the
>  they don not come through. I'm aware of adding values to
> the  ie. 
> 
> 
> 
> {dept.selectedItem.data}
> {dept2.selectedItem.data}
> 
> 
> 
> but keep getting an end of file error.
> 
> Question is how do I turn the SOAP request into and 
> request?
> 
> Thanks in advance 
> rgds
> martin
> 
> 
> 
> 
> 
> 
> 
>  outcome-style="attribute-only"/>
>  outcome-style="attribute-only"/>
>  outcome-style="attribute-only"/>
>  outcome-style="attribute-only"/>
> 
> "GERM"
> 
> 
> "GERM"
> 
> 
> true
> 
> 
> 
> 
> 
> 
>




[flexcoders] Re: Passing values using mx:WebService

2009-02-04 Thread m_ollman
Great advice and thanks for your comments valdhor & tracey.

I have re-coded the ws call in AS - and am running into the "Error
parsing request: Unexpected end element assess-request"

I figure that means that this is braking it:

var oRequest:Object = {Q2: sQ2, Q5: sQ5};

values are tracing ok



[flexcoders] Re: Passing values using mx:WebService

2009-02-04 Thread m_ollman
Great advice and thanks for your comments valdhor & tracey.

I have re-coded the ws call in AS - and am running into the "Error
parsing request: Unexpected end element assess-request"

(code @ EOM)

I figure that means that this call has the Unexpected end element in it:

 var oRequest:Object = {Q2: sQ2, Q5: sQ5};

values are tracing ok.

I actually need to pass more vaules anyhoo -  -
string,- string,  - Boolean

I figure I can ignore these - attribute-outcome elements?



Appreciate the help
rgds
martin




  
 

   
  
  
  
  
  
 "GERM"
  
  
 "GERM"
  
  
 true
  
   

 
  

  



[flexcoders] Re: Passing values using mx:WebService

2009-02-04 Thread m_ollman
FYI ws call

private function button_click():void { 
var wsOperation:Operation = ws.Assess;
wsOperation.resultFormat = "e4x";   
var atCall:AsyncToken;  
var sQ2:String = Q2.selectedItem.data;
trace (sQ2);
var sQ5:String = Q5.selectedItem.data; 
trace (sQ5);
var oRequest:Object = {Q2: sQ2, Q5: sQ5};   
atCall  = wsOperation.send(oRequest);   
atCall.callId = sCallId;  
}



[flexcoders] Re: Passing values using mx:WebService

2009-02-05 Thread valdhor
Well, that's something I could do (I pored over lots of WSDL files
whilst learning Web Service clients and servers). I have become
somewhat of an expert on building clients based just on a WSDL file.
Post the link to the WSDL.



--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Well, what arguments does the Assess operation/method require?  Don't
> send more or less.
> 
>  
> 
> I have been able to work with WebService because I do both ends, but I
> am not good enough to offer to intrepret your wsdl for you.  Maybe
> someone else here could.
> 
>  
> 
> Tracy Spratt 
> Lariat Services 
> 
> Flex development bandwidth available 
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of m_ollman
> Sent: Wednesday, February 04, 2009 6:33 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Passing values using mx:WebService
> 
>  
> 
> FYI ws call
> 
> private function button_click():void { 
> var wsOperation:Operation = ws.Assess;
> wsOperation.resultFormat = "e4x"; 
> var atCall:AsyncToken; 
> var sQ2:String = Q2.selectedItem.data;
> trace (sQ2); 
> var sQ5:String = Q5.selectedItem.data; 
> trace (sQ5); 
> var oRequest:Object = {Q2: sQ2, Q5: sQ5}; 
> atCall = wsOperation.send(oRequest); 
> atCall.callId = sCallId; 
> }
>




RE: [flexcoders] Re: Passing values using mx:WebService

2009-02-04 Thread Tracy Spratt
Well, what arguments does the Assess operation/method require?  Don't
send more or less.

 

I have been able to work with WebService because I do both ends, but I
am not good enough to offer to intrepret your wsdl for you.  Maybe
someone else here could.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of m_ollman
Sent: Wednesday, February 04, 2009 6:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Passing values using mx:WebService

 

FYI ws call

private function button_click():void { 
var wsOperation:Operation = ws.Assess;
wsOperation.resultFormat = "e4x"; 
var atCall:AsyncToken; 
var sQ2:String = Q2.selectedItem.data;
trace (sQ2); 
var sQ5:String = Q5.selectedItem.data; 
trace (sQ5); 
var oRequest:Object = {Q2: sQ2, Q5: sQ5}; 
atCall = wsOperation.send(oRequest); 
atCall.callId = sCallId; 
}