[flexcoders] Re: Sequence Diagram for Cairngorm
Hi Bjorn, Thanks for your reply. Unfortunately the "Cairngorm Diagram" at cairngormdocs.org isn't what I'm looking for - what I'm after is an actual UML sequence diagram... Cheers, Lawrie --- In flexcoders@yahoogroups.com, Bjorn Schultheiss <[EMAIL PROTECTED]> wrote: > > cairngormdocs.org > > > > On 06/12/2007, at 5:30 AM, lawriegallardo wrote: > > > Hi, > > > > Just wondering if anyone has a sequence diagram for Cairngorm? > > > > If so, I'd be ever so grateful if you could post it... > > > > Thanks, > > > > Lawrie > > > > > > >
[flexcoders] Sequence Diagram for Cairngorm
Hi, Just wondering if anyone has a sequence diagram for Cairngorm? If so, I'd be ever so grateful if you could post it... Thanks, Lawrie
[flexcoders] Re: Is it possible to see the Actionscript generated by MXML files?
Thanks ever so much Jim - that's exactly what I was after! Cheers, Lawrie --- In flexcoders@yahoogroups.com, "Jim Hayes" <[EMAIL PROTECTED]> wrote: > > There's a compiler option : from the docs > > > keep-generated-actionscript=true|false > Determines whether to keep the generated ActionScript class files. > The generated class files include stubs and classes that are generated > by the compiler and used to build the SWF file. > The default location of the files is the /generated subdirectory, which > is directly below the target MXML file. If the /generated directory does > not exist, the compiler creates one. > The default names of the primary generated class files are > filename-generated.as and filename-interface.as. > The default value is false. > This is an advanced option. > Hth, Jim. > > > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of lawriegallardo > Sent: 21 November 2007 09:42 > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Is it possible to see the Actionscript generated > by MXML files? > > Hi, > > I'm currently learning Flex and LCDS and, in order to improve my > understanding of how MXML code is translated into Actionscript code > during the compilation process, I'd like to be able to look at the > generated Actionscript code. Is this possible? > > If not, are there any good explanations of this in the Flex > documentation or in any of the Flex books? > > Thanks, > > Lawrie > > > __ > This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. > > This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. > This email has been scanned for Primal Pictures by the MessageLabs Email Security System. > __ >
[flexcoders] Is it possible to see the Actionscript generated by MXML files?
Hi, I'm currently learning Flex and LCDS and, in order to improve my understanding of how MXML code is translated into Actionscript code during the compilation process, I'd like to be able to look at the generated Actionscript code. Is this possible? If not, are there any good explanations of this in the Flex documentation or in any of the Flex books? Thanks, Lawrie
[flexcoders] Re: Confused by context.root, services-config.xml and remoting-config.xml...
Hi Stephen, I don't think there are any problems with my services-config.xml and remoting-config.xml files - they were working fine when I was compiling using mxmlc Ant task using the services property to point at the services-config.xml, and I haven't made any changes since... Here are the files: services-config.xml: ... http://{server.name}:{server.port}/{context.root}/messagebroker/amf"; class="flex.messaging.endpoints.AMFEndpoint"/> false ... remoting-config.xml: myService spring ... Do these look ok to you? Cheers, Lawrie --- In flexcoders@yahoogroups.com, Stephen Allison <[EMAIL PROTECTED]> wrote: > > > Now when I run the app I get a "Destination 'MyService' has no > > channels defined and the application does not define any default > > channels." > > That sounds like a server configuration problem. > > My guess is that you have a 'destination' set up in your remoting- > config.xml that isn't specifying a channel., and that there is no > default channel element in your remoting-config file. The usual set > up is something like: > > > > > > > > > > > > You can also specify channels on a per-destination basis. You need > to make sure that whatever is in the "ref" attribute of the channel > tags corresponds to one of the channel-definition's set up in your > services-config.xml file, so in the above, you must have a channel > with id="my-amf" present. > > Hope this is of some use. > > Stephen >
[flexcoders] Re: Confused by context.root, services-config.xml and remoting-config.xml...
Thanks Stephen, great explanation - that's really cleared things up for me. Cheers, Lawrie
[flexcoders] Re: Confused by context.root, services-config.xml and remoting-config.xml...
Hi Peter, Yes, I'm still assigning the myService.channelSet property with my programmatically created ChannelSet. Here's the code: Services.mxml: ... public function init():void { var amfChannel:AMFChannel = new AMFChannel("my-amf", getContextRootUrl() + "/messagebroker/amf"); amfChannel.pollingEnabled = false; var myChannelSet:ChannelSet = new ChannelSet(); myChannelSet.addChannel(amfChannel); myService.channelSet = myChannelSet; } private function getContextRootUrl():String { var i:int = Application.application.url.lastIndexOf("/"); var contextRootUrl:String = Application.application.url.substring(0, i); return contextRootUrl; } ... And my top-level MyApp.mxml file includes the following: ... ... Cheers, Lawrie --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote: > > But you're still assigning the mService.channelSet property with your > programmatically created ChannelSet, right? > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of lawriegallardo > Sent: Monday, November 19, 2007 3:28 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Confused by context.root, services-config.xml > and remoting-config.xml... > > As suggested, I removed the endpoint property from my mx:RemoteObject > tag, removed the services property from my mxmlc Ant task and did a > clean, build, deploy. > > id="mService" > destination="MyService" > showBusyCursor="true" > result="event.token.resultHandler( event )" > fault="event.token.faultHandler( event )" > requestTimeout="30" /> > > Now when I run the app I get a "Destination 'MyService' has no channels > defined and the application does not define any default channels." > > Any thoughts? > > Cheers, > > Lawrie >
[flexcoders] Re: Confused by context.root, services-config.xml and remoting-config.xml...
As suggested, I removed the endpoint property from my mx:RemoteObject tag, removed the services property from my mxmlc Ant task and did a clean, build, deploy. Now when I run the app I get a "Destination 'MyService' has no channels defined and the application does not define any default channels." Any thoughts? Cheers, Lawrie --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote: > > For the MXML RemoteObject API, it's true there is an endpoint property > and what steve writes about it automatically selecting the right channel > based on HTTP(S) URLs is correct, but it is not marked bindable and I've > not seen it used with MXML binding statements. So, I am suggesting that > while you're trying to get this to work - just use the programmatic > approach you're using with ChannelSet exclusively for now. > > Pete > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of lawriegallardo > Sent: Monday, November 19, 2007 1:52 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Confused by context.root, services-config.xml > and remoting-config.xml... > > No, we're not at crossed purposes at all - that's really useful thanks! > > Do I still need to worry about the services-config.xml and > remote-config.xml files? If not, how do the destinations and their > properties (i.e. the source property that specifies which Java service > gets called) get set up? > > Cheers, > > Lawrie > > --- In flexcoders@yahoogroups.com, "Stephen Allison" > wrote: > > > > > Thanks for your help - Apologies if I'm being a bit thick , but I'm > > > a not quite sure what you mean when you say that you "set the > > > endpoint property of the RemoteObject to point at whatever AMF > > > endpoint url you want". Could you clarify this a bit, please? > > > > Hi, > > RemoteObject defines an endpoint property which allows you to > > programatically set the AMF endpoint used by that instance. So: > > > > var ro:RemoteObject = new RemoteObject(...); ro.endpoint = > > Application.application.parameters["gatewayUrl"] > > > > and you're ready to go, the RemoteObject will use either a secure AMF > > channel or a regular AMF channel depending on whether or not the url > you > > provide it is https or not. > > > > You can probably (and I've not checked) set it in mxml using data > binding: > > > endpoint={Application.application.parameters['gatewayUrl']} ...> > > > > or somesuch. We set gatewayUrl from FlashVars in the containing ASP > page, > > so the server decides which endpoint a given application talks to. > > > > Apologies if we're at crossed purposes here! > > > > Stephen > > > > > > > -- > 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] Re: Confused by context.root, services-config.xml and remoting-config.xml...
No, we're not at crossed purposes at all - that's really useful thanks! Do I still need to worry about the services-config.xml and remote-config.xml files? If not, how do the destinations and their properties (i.e. the source property that specifies which Java service gets called) get set up? Cheers, Lawrie --- In flexcoders@yahoogroups.com, "Stephen Allison" <[EMAIL PROTECTED]> wrote: > > > Thanks for your help - Apologies if I'm being a bit thick , but I'm a > > not quite sure what you mean when you say that you "set the endpoint > > property of the RemoteObject to point at whatever AMF endpoint url you > > want". Could you clarify this a bit, please? > > Hi, > RemoteObject defines an endpoint property which allows you to > programatically set the AMF endpoint used by that instance. So: > > var ro:RemoteObject = new RemoteObject(...); > ro.endpoint = Application.application.parameters["gatewayUrl"] > > and you're ready to go, the RemoteObject will use either a secure AMF > channel or a regular AMF channel depending on whether or not the url you > provide it is https or not. > > You can probably (and I've not checked) set it in mxml using data binding: > endpoint={Application.application.parameters['gatewayUrl']} ...> > > or somesuch. We set gatewayUrl from FlashVars in the containing ASP page, > so the server decides which endpoint a given application talks to. > > Apologies if we're at crossed purposes here! > > Stephen >
[flexcoders] Re: Confused by context.root, services-config.xml and remoting-config.xml...
> if you're only using RPC services like RemoteObject and you're creating ChannelSets, then you don't need to compile against a services-config.xml. I'm using RemoteObject services which connect to Java services via the Spring Framework factory - will I need to compile against a services-config.xml in this case? I'm still a bit confused about when services-config.xml and remoting-config.xml actually get used. Are they only used by Flex Builder / mxmlc when you build your app to produce your .swf file? Or do these files also used get used when your web server loads the LCDS web app? If not, how and when do the destinations you configure in remoting-config.xml get set up? Thanks again, Gavin --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote: > > If you're programmatically creating a ChannelSet then I wouldn't use the > endpoint attribute as that might override what you're doing. Also, if > you're only using RPC services like RemoteObject and you're creating > ChannelSets, then you don't need to compile against a > services-config.xml. > > Other than that, I'd modify your code to look to see whether the URL was > HTTPS or not so that you'd create a SecureAMFChannel instead of an > AMFChannel. > > > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of lawriegallardo > Sent: Monday, November 19, 2007 11:46 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Confused by context.root, services-config.xml > and remoting-config.xml... > > Hi Peter, > > Thanks for your reply. The answer is yes to all your questions. > > This is the code I used: > > public function init():void { > var amfChannel:AMFChannel > = new AMFChannel("my-amf", getContextRootUrl() > + "/messagebroker/amf"); > amfChannel.pollingEnabled = false; > var myChannelSet:ChannelSet = new ChannelSet(); > myChannelSet.addChannel(amfChannel); > myService.channelSet = myChannelSet; > } > > private function getContextRootUrl():String { > var i:int = Application.application.url.lastIndexOf("/"); > var contextRootUrl:String > = Application.application.url.substring(0, i); > return contextRootUrl; > } > > ... > >id="myService" > destination="MyService" > endpoint="{getEndpointUrl()}/messagebroker/amf" > showBusyCursor="true" > result="event.token.resultHandler( event )" > fault="event.token.faultHandler( event )" > requestTimeout="30"/> > > > Can you see any possible issues? > > I'm still using the same services and compiler.context-root properties > for mxmlc, and I haven't amended my services-config.xml, so it still has > the following channel definition: > >class="mx.messaging.channels.AMFChannel"> >url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf > " > class="flex.messaging.endpoints.AMFEndpoint"/> > > false > > > > Do I need to change any of this? > > Cheers, > > Lawrie > > --- In flexcoders@yahoogroups.com, "Peter Farland" wrote: > > > > > > If you host your SWF inside the same WAR that hosts the remoting > > service, then you should be able to programmatically create a > > ChannelSet of Channels that is based on the URL that was used to load > > the SWF (at runtime you could look at the value of > > mx.core.Application.application.url). Did you create a ChannelSet and > > add your AMFChannel to that and then set that on your RemoteObject? > > > > > > > > -Original Message- > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > > On Behalf Of lawriegallardo > > Sent: Monday, November 19, 2007 10:46 AM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Confused by context.root, services-config.xml > > and remoting-config.xml... > > > > Hi, > > > > I've got an application that uses LCDS RemoteObjects and this worked > > fine as a development build - I used the Ant mxmlc task and configured > > > the services and compiler.context-root properties to point at my > > development LCDS web-app and everything was dandy. > > > > However, when I tried to rename my web-app it stopped working... After > > > some googling I discovered that using {context.root} in your > > services-config.xml and building with Flex Builder or mxmlc > > effectively hard-code
[flexcoders] Re: Confused by context.root, services-config.xml and remoting-config.xml...
Hi Stephen, Thanks for your help - Apologies if I'm being a bit thick , but I'm a not quite sure what you mean when you say that you "set the endpoint property of the RemoteObject to point at whatever AMF endpoint url you want". Could you clarify this a bit, please? Cheers, Lawrie --- In flexcoders@yahoogroups.com, "Stephen Allison" <[EMAIL PROTECTED]> wrote: > > > - Client1 will access the app via www.mycomp.com/myapp/client1, > > Client2 will access the app via www.mycomp.com/myapp/client2, etc). > > The way I've usually dealt with this is to set the endpoint property of the > RemoteObject to point at whatever AMF endpoint url you want and then pass > the value into the app via Flashvars, we then usually have an ASP page > generate the HTML holding the swf and have it set whatever endpoint is > required. > > I think the real problem is that if you use Flex Builder to build a 'data > services' project then it automatically figures out endpoints for you, which > is great until you need to change them. > > > Stephen >
[flexcoders] Re: Confused by context.root, services-config.xml and remoting-config.xml...
Hi Peter, Thanks for your reply. The answer is yes to all your questions. This is the code I used: public function init():void { var amfChannel:AMFChannel = new AMFChannel("my-amf", getContextRootUrl() + "/messagebroker/amf"); amfChannel.pollingEnabled = false; var myChannelSet:ChannelSet = new ChannelSet(); myChannelSet.addChannel(amfChannel); myService.channelSet = myChannelSet; } private function getContextRootUrl():String { var i:int = Application.application.url.lastIndexOf("/"); var contextRootUrl:String = Application.application.url.substring(0, i); return contextRootUrl; } ... Can you see any possible issues? I'm still using the same services and compiler.context-root properties for mxmlc, and I haven't amended my services-config.xml, so it still has the following channel definition: http://{server.name}:{server.port}/{context.root}/messagebroker/amf"; class="flex.messaging.endpoints.AMFEndpoint"/> false Do I need to change any of this? Cheers, Lawrie --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote: > > > If you host your SWF inside the same WAR that hosts the remoting > service, then you should be able to programmatically create a ChannelSet > of Channels that is based on the URL that was used to load the SWF (at > runtime you could look at the value of > mx.core.Application.application.url). Did you create a ChannelSet and > add your AMFChannel to that and then set that on your RemoteObject? > > > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of lawriegallardo > Sent: Monday, November 19, 2007 10:46 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Confused by context.root, services-config.xml and > remoting-config.xml... > > Hi, > > I've got an application that uses LCDS RemoteObjects and this worked > fine as a development build - I used the Ant mxmlc task and configured > the services and compiler.context-root properties to point at my > development LCDS web-app and everything was dandy. > > However, when I tried to rename my web-app it stopped working... After > some googling I discovered that using {context.root} in your > services-config.xml and building with Flex Builder or mxmlc effectively > hard-codes the endpoint urls for your services into your swf file. > > This is an issue for me because I need to be able to do is compile my > app once, but then be able to be able copy this app for different > clients (i.e. each client will have a separate copy of the application > - Client1 will access the app via www.mycomp.com/myapp/client1, > Client2 will access the app via www.mycomp.com/myapp/client2, etc). > > I've tried creating an AMFChannel in my client code and setting this as > the channel for my mx:RemoteObjects, but this doesn't seem to work. > I'm guessing I might also need to amend my services-config-xml file to > get this to work??? > > If anyone can shed any light on this it would be greatly appreciated. > > Thanks, > > Lawrie > > > > -- > 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] Confused by context.root, services-config.xml and remoting-config.xml...
Hi, I've got an application that uses LCDS RemoteObjects and this worked fine as a development build - I used the Ant mxmlc task and configured the services and compiler.context-root properties to point at my development LCDS web-app and everything was dandy. However, when I tried to rename my web-app it stopped working... After some googling I discovered that using {context.root} in your services-config.xml and building with Flex Builder or mxmlc effectively hard-codes the endpoint urls for your services into your swf file. This is an issue for me because I need to be able to do is compile my app once, but then be able to be able copy this app for different clients (i.e. each client will have a separate copy of the application - Client1 will access the app via www.mycomp.com/myapp/client1, Client2 will access the app via www.mycomp.com/myapp/client2, etc). I've tried creating an AMFChannel in my client code and setting this as the channel for my mx:RemoteObjects, but this doesn't seem to work. I'm guessing I might also need to amend my services-config-xml file to get this to work??? If anyone can shed any light on this it would be greatly appreciated. Thanks, Lawrie
[flexcoders] How to code/configure remoting so endpoint URLs not hardcoded in .swf ?
Hi, I am developing an application which needs to have a separate installation for each client (i.e. Client1 will access the app via www.mycomp.com/myapp/client1, Client2 will access the app via www.mycomp.com/myapp/client2, etc). However, as I understand things from the documentation for mx:RemoteObject and LCDS, the mxmlc compiler uses context-root property (and other properties) in conjunction with the remoting-config.xml and services-config.xml to build your swf file, and basically hard-codes the context root into this file. This means that I would have to recompile the app for each client - obviously far from ideal. Having googled extensively, I have amended my flex code as follows to try and get around the above issue: ... public function init():void { var amfChannel:AMFChannel = new AMFChannel("my-amf", getContextRootUrl() + "/messagebroker/amf"); amfChannel.pollingEnabled = false; var myChannelSet:ChannelSet = new ChannelSet(); myChannelSet.addChannel(amfChannel); myService.channelSet = myChannelSet; } private function getContextRootUrl():String { var i:int = Application.application.url.lastIndexOf("/"); var contextRootUrl:String = Application.application.url.substring(0, i); return contextRootUrl; } ... ... I have left my services-config.xml and remoting-config.xml files unchanged: services-config.xml: ... http://{server.name}:{server.port}/{context.root}/messagebroker/amf"; class="flex.messaging.endpoints.AMFEndpoint"/> false ... remoting-config.xml: greetingService spring ... But when I run this my application just sits there with the message "transferring data from localhost" in the browser statusbar, and I just get the following in the server log: [Flex] FlexSession created with id 'BA4C42E6D831EB63DE0D1434F2FE18F8' for an Http-based client connection. [Flex] Channel endpoint my-amf received request. [Flex] Deserializing AMF/HTTP request Version: 3 (Message #0 targetURI=null, responseURI=/1) (Array #0) [0] = (Typed Object #0 'flex.messaging.messages.CommandMessage') operation = 5 correlationId = "" timeToLive = 0 messageId = "2E92B241-911C-415A-43CB-572AE0D5C7C9" timestamp = 0 headers = (Object #1) DSId = "nil" body = (Object #2) clientId = null destination = "" [Flex] Serializing AMF/HTTP response Version: 3 (Message #0 targetURI=/1/onResult, responseURI=) (Typed Object #0 'flex.messaging.messages.AcknowledgeMessage') timestamp = 1.195463337201E12 headers = (Object #1) DSId = "8ACFB8D7-F70F-8E40-4804-8C86D86721EE" body = null correlationId = "2E92B241-911C-415A-43CB-572AE0D5C7C9" messageId = "8ACFB8F0-611A-3D28-E76F-46B3AAAFAB6E" timeToLive = 0.0 clientId = "8ACFB8F0-610B-CE71-3071-807D68A228AF" destination = null flashlog.txt: 11/19/2007 12:53:04.184 [INFO] mx.messaging.Producer 'E5FB0ACC-815D-67DA-FA20-57F8143815C0' producer set destination to 'MyService'. authenticationWorkflowState: Dispatching Apply Permissions 11/19/2007 12:53:05.546 [INFO] mx.messaging.Producer 'E5FB0ACC-815D-67DA-FA20-57F8143815C0' producer sending message 'DB177CC3-9C87-B12D-2673-57F81980DBE7' 11/19/2007 12:53:05.556 [INFO] mx.messaging.Channel 'my-amf' channel endpoint set to http://localhost:8080/myapp/messagebroker/amf 11/19/2007 12:53:05.556 [INFO] mx.messaging.Channel 'my-amf' channel settings are: http://{server.name}:{server.port}/myapp/messagebroker/amf"/> false 11/19/2007 12:53:05.606 [INFO] mx.messaging.Producer 'E5FB0ACC-815D-67DA-FA20-57F8143815C0' producer sending message '59988D12-B086-73BA-EFC8-57F819C635D4' started 11/19/2007 12:53:05.616 [INFO] mx.messaging.Channel 'my-amf' channel endpoint set to http://localhost:8080/myapp/messagebroker/amf 11/19/2007 12:53:05.656 [DEBUG] mx.messaging.Channel 'my-amf' pinging endpoint. 11/19/2007 12:53:07.188 [INFO] mx.messaging.Channel 'my-amf' channel is connected. authenticationWorkflowState: Dispatching Apply Permissions I'm now completely confused - I don't know where I'm going wrong or what to try next. Do I need to make changes to my services-config.xml configuration? Do I still want to compile my app with -compiler option? Perhaps I'm missing something obvious, or perhaps there is an easier way to achieve what I'm trying to do? Any help would be very much appreciated... Thanks, Lawrie.