[flexcoders] Re: Passing values using mx:WebService
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 tspr...@... 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; }
[flexcoders] Re: Passing values using mx:WebService
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-valGERM/typ:text-val /typ:attribute typ:attribute id=Q5 typ:text-valGERM/typ:text-val /typ:attribute typ:attribute id=XYZ988 typ:boolean-valtrue/typ:boolean-val /typ:attribute /typ:entity /typ:list-entity /typ:session-data /typ:assess-request /mx:request
[flexcoders] Re: Passing values using mx:WebService
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
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 - typ:attribute id=Q2 - string, typ:attribute id=Q5 - string, typ:attribute id=Eligible988 - Boolean I figure I can ignore these - attribute-outcome elements? typ:attribute-outcome id=ProcessingTime outcome-style=attribute-only/ Appreciate the help rgds martin typ:assess-request typ:session-data typ:list-entity entity-type=global typ:entity id=global_1 typ:attribute-outcome id=LodgementLocation outcome-style=attribute-only/ typ:attribute-outcome id=LodgementChannel988 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-valGERM/typ:text-val /typ:attribute typ:attribute id=Q5 typ:text-valGERM/typ:text-val /typ:attribute typ:attribute id=Eligible988 typ:boolean-valtrue/typ:boolean-val /typ:attribute /typ:entity /typ:list-entity /typ:session-data /typ:assess-request
[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
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; }
[flexcoders] Re: Passing Values between windows
It may not be best practice but create a public variable in your main (WindowedApplication) file and then access it with Application.application.myPublicVariable. This can be a custom object if you need to have more data. --- In flexcoders@yahoogroups.com, bredwards358 [EMAIL PROTECTED] wrote: In the application I'm currently developing, end users need to log in to utilize it. Also I need to keep track of who is logged in so that I can input that into a local database after certain actions. I've tried using a public variable in a commonly used class, however since an instance of that class is newly declared when a new window opens up the value is set back to null, making it unusable. I've heard of using an actionscript file inside a package used by the App containing the variables but since the examples I've seen have them as static and const variables and thus can't be changed from their default values. So my question is this, is it possible in AIR to pass the value of a variable from the native application window to another window component? To help clear things up, essentially the user logs in and the username is set as the value of a variable declared someplace, then in another window, an action takes place, info is recorded in the database and the app looks up the username in the variable, and records it along with the other stuff in the db.
[flexcoders] Re: Passing values
--- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I'm trying to pass the dimensions of the main window to a component for positioning of a popup. I keep getting the following error: Error /Main.mxml:18 The property being referenced does not have the static attribute. Here are some code snippets: -- Main.mxml -- mx:Panel title=Team Management width=1280 height=1024 id=mainBox ... local:teamList id=teamList width=400 height=100% parentX={mainBox.x} parentY={mainBox.y}/ -- teamList.mxml -- mx:Script ![CDATA[ import mx.managers.PopUpManager; public var parentX:Number; public var parentY:Number; function showWindow():Void { var xPos:Number = parentX + 2; var yPos:Number = parentY + this.height + 5; var initObj:Object = {deferred:true, x:xPos, y:yPos}; var popup:Object = PopUpManager.createPopUp(this, teamListModify, true, initObj); } ]] /mx:Script ... mx:Button label=Modify click=showWindow()/mx:Button I've looked around and I can't find a solution that helps me. I'm new to Flex, so I would appreciate a detailed explaination since I'm obviously not getting it. Thanks, GTB Sorry, I posted some wrong code. I have fixed it above, but I still get the same error. Thanks, GTB -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Passing values
You can't have a variable named the same as your class name because it thinks you're referring to the class. So change the id of your local:teamList. Matt -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Thursday, February 02, 2006 12:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Passing values --- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote: I'm trying to pass the dimensions of the main window to a component for positioning of a popup. I keep getting the following error: Error /Main.mxml:18 The property being referenced does not have the static attribute. Here are some code snippets: -- Main.mxml -- mx:Panel title=Team Management width=1280 height=1024 id=mainBox ... local:teamList id=teamList width=400 height=100% parentX={mainBox.x} parentY={mainBox.y}/ -- teamList.mxml -- mx:Script ![CDATA[ import mx.managers.PopUpManager; public var parentX:Number; public var parentY:Number; function showWindow():Void { var xPos:Number = parentX + 2; var yPos:Number = parentY + this.height + 5; var initObj:Object = {deferred:true, x:xPos, y:yPos}; var popup:Object = PopUpManager.createPopUp(this, teamListModify, true, initObj); } ]] /mx:Script ... mx:Button label=Modify click=showWindow()/mx:Button I've looked around and I can't find a solution that helps me. I'm new to Flex, so I would appreciate a detailed explaination since I'm obviously not getting it. Thanks, GTB Sorry, I posted some wrong code. I have fixed it above, but I still get the same error. Thanks, GTB -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Passing values
Ugh!!! I was beatting my head over that. Thanks so much. GTB --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: You can't have a variable named the same as your class name because it thinks you're referring to the class. So change the id of your local:teamList. Matt -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Thursday, February 02, 2006 12:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Passing values --- In flexcoders@yahoogroups.com, Geoffrey gtb104@ wrote: I'm trying to pass the dimensions of the main window to a component for positioning of a popup. I keep getting the following error: Error /Main.mxml:18 The property being referenced does not have the static attribute. Here are some code snippets: -- Main.mxml -- mx:Panel title=Team Management width=1280 height=1024 id=mainBox ... local:teamList id=teamList width=400 height=100% parentX={mainBox.x} parentY={mainBox.y}/ -- teamList.mxml -- mx:Script ![CDATA[ import mx.managers.PopUpManager; public var parentX:Number; public var parentY:Number; function showWindow():Void { var xPos:Number = parentX + 2; var yPos:Number = parentY + this.height + 5; var initObj:Object = {deferred:true, x:xPos, y:yPos}; var popup:Object = PopUpManager.createPopUp(this, teamListModify, true, initObj); } ]] /mx:Script ... mx:Button label=Modify click=showWindow()/mx:Button I've looked around and I can't find a solution that helps me. I'm new to Flex, so I would appreciate a detailed explaination since I'm obviously not getting it. Thanks, GTB Sorry, I posted some wrong code. I have fixed it above, but I still get the same error. Thanks, GTB -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/