Announcement Announcement Module
Collapse
No announcement yet.
DI of Custom Request/Response Objects Causes Remoting Runtime Errors Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DI of Custom Request/Response Objects Causes Remoting Runtime Errors

    Surprised no one else has run into this issue here, so I'm wondering if there's a simpler way...if not, here's my post on it:

    http://www.webappsolution.com/wordpr...ssue-with-fix/

  • #2
    hmm

    Somehow I have the feeling after reading this article that this person is including the class info in a very elaborate way.

    I have the feeling that simply adding this anonymous code block somewhere in his application will also do the trick:
    Code:
    {
        LoginRequestDTO
    }
    Or he can use the other 1.000 ways of doing it described in the docs:

    http://www.springactionscript.org/do...inclusion.html

    Which will just include his value object properly.
    But I could be reading this wrong... (After all, its nine in the morning,hehe)

    cheers,

    Roland
    Last edited by 666shooter; Sep 1st, 2009, 02:13 AM. Reason: Added doc link

    Comment


    • #3
      yah, I actually do have all of my other injected classes in a ClassReferences.properties file so they're compiled into the app like so:

      FrontController = ClassReference("org.springextensions.actionscript. cairngorm.control.CairngormFrontController")

      ...and for some reason I simply didn't do it for all the request and response objects....probably b/c I generate them...silly me...which is why i posted it here...seemed like I was overlooking something extremely simple ;-)

      In that case, I guess the post is still useful if you're doing Flash or AS3 only projects with Remoting or if you forget to put a reference to your request and response objects somewhere in the app, as the error you'll encounter isn't exactly intuitive:

      TypeError: Error #1034: Type Coercion failed: cannot convert Object@13e9921 to mx.messaging.messages.ErrorMessage.

      Unlike the the class not found exception with the helpful message on inclusion impls that's in the SAS framework.

      NOTE: if you don't get this error you'll get it for one of the other unmapped core Remoting AS/Java objects...like:

      TypeError: Error #1034: Type Coercion failed: cannot convert Object@13e9921 to flex.messaging.messages.RemotingMessage.

      Thanks for pointing out my overly complex solution.

      Comment


      • #4
        I'm stupid and blind

        Hey Brian,

        looks like I read ur post too quickly as well, the blogpost was actually yours
        I thought it was just something you stumbled upon, had I known it was you I would, naturally, have been a lot more insulting and condescending.

        All kidding aside, its true that the post has enough useful information on the registerClassAlias() function, which is always good.

        Slightly OT:
        Did you, for instance know, that when you use ObjectUtil.copy() to duplicate an object the result is untyped?
        Unless, right before you make the ObjectUtil.copy() call you call the registerClassAlias().

        Here's an interesting article about this:

        http://aheadofthewave.wordpress.com/...tionscript-30/

        cheers,

        Roland

        Comment


        • #5
          roland...you are dead to me ;-)

          honestly, i tend to over-think things sometimes and this is a classic example...nonetheless, I think the registerClassAlias() method is incredibly powerful and is not discussed often enough...

          on a slight tangent, I need to write some more posts about using RSLs with SAS to get around some of the inclusion issues as well...hmmm.

          Comment


          • #6
            yes please

            Hey Brian,

            yes please do, the more articles about SAS, the better, any kind of effort in this area is greatly appreciated!

            By the way, didn't you volunteer to become a team member? Or am I mistaken you with someone else?

            cheers,

            Roland
            Last edited by 666shooter; Sep 2nd, 2009, 03:34 AM. Reason: typo fix

            Comment


            • #7
              I did, and I'd like to help out in the SAS + CG area, but I got hit with 4 projects at once so my "extra" time has been extremely limited for the last month or so ;-)

              My team is working on 3 SAS + CG impls, though, so I'll continue to post anything I find as we put it into use...probably the best I can do is offer real world experience over using it in small PoCs.

              Comment


              • #8
                alright

                Did you contact Christophe directly about this? Or are your SpringSource papers being processed already?
                If you haven't had contact with Christophe yet, I suggest you drop him an email directly, you can get a hold of him through the developer mailinglist.
                He will make sure you receive the necessary paperwork (well, PDF work).

                cheers,

                Roland

                Comment

                Working...
                X