0 Replies Latest reply on May 10, 2010 4:17 AM by Mete Atamel

    [svn:fx-trunk] 15982: Bug: BLZ-522 - Enhancement request to run BlazeDS messaging code in ActionScript outside of a Flex Application .

    Mete Atamel Level 1

      Revision: 15982

      Revision: 15982

      Author:   matamel@adobe.com

      Date:     2010-05-10 04:17:02 -0700 (Mon, 10 May 2010)

      Log Message:

      ***********

      Bug: BLZ-522 - Enhancement request to run BlazeDS messaging code in ActionScript outside of a Flex Application.

      QA: Yes

      Doc: Maybe - it'd be good to mention what people need to do if they want to use rpc.swc without a Flex UI component. See the bug for details.

      Checkintests: Pass

       

      Details: rpc.swc couldn't be used without a Flex UI component before, this was due to:

       

      1- Some client-side classes need to be registered with Flash player; this normally is handled by generated AS code when an MXML is compiled to SWF, but when MXML is not involved, one needs to register these classes manually.

      2- LoaderConfig.url is not available outside Flex and this was causing "url is null" error in Channel url token replacement code.

       

      There isn't much we can do for #1, classes still need to be registered with Flash player so strong types are used instead of generic Objects on the client/server. For #2, I added a URLUtil.hasTokens(url:String) method that takes in a url and returns true if the url contains server.name/server.port tokens. Then, I changed Channel url token replacement code to use this new method. This resolves the "url is null" error.

       

      Ticket Links:

      ***********

          http://bugs.adobe.com/jira/browse/BLZ-522

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as

          flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/URLUtil.as