|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
ArrayCollection items deserializing as type Object
by philmk
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hi All, This is my first time posting, but I’ve looked through
the online forum to try to find a similar issue, and couldn’t. This is
probably a newbie issue, so hopefully someone has come across this before… I have a .Net service which returns a custom complex object.
This object has a number of generic List<> properties, which are lists of
other custom objects. In Flex I have a set of Value Objects to match each of the
objects returned in the service response. Each Value Object contains a line of
code to register the class alias, e.g.: private static const ALIAS_REMOTE:*
= registerClassAlias("ServerObjectName", ClientValueObject); When the call to my service returns to the Flex Client, each
object in the object graph gets deserialized to the correct type, except for
one particular class which is contained in one of the ArrayCollections, and my
problem is I can’t see why. The object is declared and registered the
same as everything else, the client-side object code is generated and I’ve
double-checked for typo’s. I’ve also tried registering the class
mappings on the server. There is nothing special, or different about this class
(that I can see). I’ve also tried logging the server DEBUG events, which
have not shown any issues. Is there anything else I can check or try? Sorry if this sounds a bit confusing, I’m trying to
keep the post short! Thanks, Philip McKeown _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: ArrayCollection items deserializing as type Object
by philmk
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Ah, it’s typical that you find
the solution after you’ve posted the question! I’ve discovered that the problem
was that using the “private static const” to register the class alias worked
most of the time because the Class object had been referenced somehow before
the call was made. In this case, the alias didn’t get registered until after
the server request was made, and so, the Flash runtime didn’t know how to map
the response object. After moving this line of code
to another location, the deserialization worked fine! Thanks for listening!! ;-) Philip McKeown From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Philip
McKeown Hi All, This is my first time posting, but I’ve looked through the
online forum to try to find a similar issue, and couldn’t. This is probably a
newbie issue, so hopefully someone has come across this before… I have a .Net service which returns a custom complex object.
This object has a number of generic List<> properties, which are lists of
other custom objects. In Flex I have a set of Value Objects to match each of the
objects returned in the service response. Each Value Object contains a line of
code to register the class alias, e.g.: private static const ALIAS_REMOTE:*
= registerClassAlias("ServerObjectName", ClientValueObject); When the call to my service returns to the Flex Client, each
object in the object graph gets deserialized to the correct type, except for
one particular class which is contained in one of the ArrayCollections, and my
problem is I can’t see why. The object is declared and registered the same as
everything else, the client-side object code is generated and I’ve
double-checked for typo’s. I’ve also tried registering the class mappings on
the server. There is nothing special, or different about this class (that
I can see). I’ve also tried logging the server DEBUG events, which have not
shown any issues. Is there anything else I can check or try? Sorry if this sounds a bit confusing, I’m trying to keep the
post short! Thanks, Philip McKeown _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: ArrayCollection items deserializing as type Object
by Support-179
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hi Philip,
Glad to be able to help :))
Anyway when you check the log file for such cases you will
notice the following traces (DEBUG level):
DEBUG FluorineFx.FluorineGateway - Begin AMF
request
DEBUG FluorineFx.Messaging.MessageServer - Query endpoint
.....
DEBUG FluorineFx.IO.AMFReader - Class definition
flex.messaging.messages.RemotingMessage loaded <----- this is the first class
definition for Flex RPC
After these lines you should see what types FluorineFx
will deserialize. Everything that has no corresponding class mapped will be
traced as "Class definition (untyped) loaded"
When you do not see a trace about the specific type then
probably class mapping info was not sent from the client.
Zoli
From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Philip McKeown Sent: Tuesday, September 23, 2008 3:26 PM To: 'Fluorine Mailing List' Subject: Re: [Fluorine] ArrayCollection items deserializing as type Object Ah, it’s typical that you find
the solution after you’ve posted the question! I’ve discovered that the problem
was that using the “private static const” to register the class alias worked
most of the time because the Class object had been referenced somehow before the
call was made. In this case, the alias didn’t get registered until after the
server request was made, and so, the Flash runtime didn’t know how to map the
response object. After moving this line of code
to another location, the deserialization worked fine! Thanks for listening!!
;-) Philip
McKeown From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Philip
McKeown Hi All, This is my first time posting, but I’ve looked through the
online forum to try to find a similar issue, and couldn’t. This is probably a
newbie issue, so hopefully someone has come across this before… I have a .Net service which returns a custom complex object.
This object has a number of generic List<> properties, which are lists of
other custom objects. In Flex I have a set of Value Objects to match each of the
objects returned in the service response. Each Value Object contains a line of
code to register the class alias, e.g.: private
static
const
ALIAS_REMOTE:* = registerClassAlias("ServerObjectName",
ClientValueObject); When the call to my service returns to the Flex Client, each
object in the object graph gets deserialized to the correct type, except for one
particular class which is contained in one of the ArrayCollections, and my
problem is I can’t see why. The object is declared and registered the same as
everything else, the client-side object code is generated and I’ve
double-checked for typo’s. I’ve also tried registering the class mappings on the
server. There is nothing special, or different about this class (that
I can see). I’ve also tried logging the server DEBUG events, which have not
shown any issues. Is there anything else I can check or try? Sorry if this sounds a bit confusing, I’m trying to keep the
post short! Thanks, Philip McKeown _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: ArrayCollection items deserializing as type Object
by Azeem Ahmed
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hello everyone, This is a fairly newbie
question. :) I’ve been subscribed to
this list for some time now and have recently started using fluorine for one of
my projects. I think this project is wonderful and I can’t wait for v1.1.
Recently, I ran into the issue discussed in this particular thread. Of course,
without this thread, I would have been lost. :) Having said that, I’ve
several ‘value objects’ in flex and the corresponding custom
objects on the .net side. However, because of the issue described below, every
time I add a new object, I’ve to add a line of code in my
creationComplete handler for the application to register the class alias (using
registerClassAlias). That is rather cumbersome and is definitely prone to
errors as others start maintaining the product (and even as I continue to add
more and more classes – initially I was thinking using the RemoteClass
meta tag would be sufficient but it looks like you have to call
registerClassAlias). Anyway, I was looking for some guidance from the experts
on this list on what they do for this scenario. Is there a way to automatically
register all VO classes at start up of the application and by that I mean
without having to code in the creationComplete handler? Please let me know and
any guidance would be much appreciated. Thanks! – Azeem From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Support Hi Philip, Glad to be able to help :)) Anyway when you check the log file for such cases you will notice
the following traces (DEBUG level): DEBUG FluorineFx.FluorineGateway - Begin AMF request DEBUG FluorineFx.Messaging.MessageServer - Query endpoint ..... DEBUG FluorineFx.IO.AMFReader - Class definition
flex.messaging.messages.RemotingMessage loaded <----- this is the first
class definition for Flex RPC After these lines you should see what types FluorineFx
will deserialize. Everything that has no corresponding class mapped will
be traced as "Class definition (untyped) loaded" When you do not see a trace about the specific type then probably
class mapping info was not sent from the client. Zoli From: fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Philip
McKeown Ah, it’s typical that you
find the solution after you’ve posted the question! I’ve discovered that the
problem was that using the “private static const” to register the
class alias worked most of the time because the Class object had been referenced
somehow before the call was made. In this case, the alias didn’t get
registered until after the server request was made, and so, the Flash runtime
didn’t know how to map the response object. After moving this line of code
to another location, the deserialization worked fine! Thanks for listening!! ;-) Philip McKeown From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Philip
McKeown Hi All, This is my first time posting, but I’ve looked through
the online forum to try to find a similar issue, and couldn’t. This is
probably a newbie issue, so hopefully someone has come across this
before… I have a .Net service which returns a custom complex object.
This object has a number of generic List<> properties, which are lists of
other custom objects. In Flex I have a set of Value Objects to match each of the
objects returned in the service response. Each Value Object contains a line of
code to register the class alias, e.g.: private static const ALIAS_REMOTE:*
= registerClassAlias("ServerObjectName", ClientValueObject); When the call to my service returns to the Flex Client, each
object in the object graph gets deserialized to the correct type, except for
one particular class which is contained in one of the ArrayCollections, and my
problem is I can’t see why. The object is declared and registered the
same as everything else, the client-side object code is generated and
I’ve double-checked for typo’s. I’ve also tried registering
the class mappings on the server. There is nothing special, or different about this class (that
I can see). I’ve also tried logging the server DEBUG events, which have
not shown any issues. Is there anything else I can check or try? Sorry if this sounds a bit confusing, I’m trying to
keep the post short! Thanks, Philip McKeown No virus
found in this incoming message. _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: ArrayCollection items deserializing as type Object
by Support-179
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hi Azeem,
Important is to have your classes referenced somewhere in
your application so the compiler will pick them up.
In that case you can use the [RemoteClass(alias=".NET type
name")] metadata tag without calling registerClassAlias
As last resort a "registerClassAlias" will ensure that your
class is compiled (as you are referencing the AS class in the registerClassAlias
parameter)
Zoli From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Azeem Ahmed Sent: Friday, April 10, 2009 2:16 AM To: 'Fluorine Mailing List' Subject: Re: [Fluorine] ArrayCollection items deserializing as type Object Hello everyone,
This is a fairly newbie
question. :) I’ve been subscribed to this
list for some time now and have recently started using fluorine for one of my
projects. I think this project is wonderful and I can’t wait for v1.1. Recently,
I ran into the issue discussed in this particular thread. Of course, without
this thread, I would have been lost. :) Having said that, I’ve several
‘value objects’ in flex and the corresponding custom objects on the .net side.
However, because of the issue described below, every time I add a new object,
I’ve to add a line of code in my creationComplete handler for the application to
register the class alias (using registerClassAlias). That is rather cumbersome
and is definitely prone to errors as others start maintaining the product (and
even as I continue to add more and more classes – initially I was thinking using
the RemoteClass meta tag would be sufficient but it looks like you have to call
registerClassAlias). Anyway, I was looking for some guidance from the experts on
this list on what they do for this scenario. Is there a way to automatically
register all VO classes at start up of the application and by that I mean
without having to code in the creationComplete handler? Please let me know and
any guidance would be much appreciated. Thanks! – Azeem
From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of
Support Hi
Philip, Glad to
be able to help :)) Anyway
when you check the log file for such cases you will notice the following traces
(DEBUG level): DEBUG
FluorineFx.FluorineGateway - Begin AMF request DEBUG
FluorineFx.Messaging.MessageServer - Query endpoint ..... DEBUG
FluorineFx.IO.AMFReader - Class definition
flex.messaging.messages.RemotingMessage loaded <----- this is the first class
definition for Flex RPC After
these lines you should see what types FluorineFx will deserialize.
Everything that has no corresponding class mapped will be traced as "Class
definition (untyped) loaded" When you
do not see a trace about the specific type then probably class mapping info was
not sent from the client. Zoli From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Philip
McKeown Ah, it’s typical that you find
the solution after you’ve posted the question! I’ve discovered that the problem
was that using the “private static const” to register the class alias worked
most of the time because the Class object had been referenced somehow before the
call was made. In this case, the alias didn’t get registered until after the
server request was made, and so, the Flash runtime didn’t know how to map the
response object. After moving this line of code
to another location, the deserialization worked fine! Thanks for listening!!
;-) Philip
McKeown From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Philip
McKeown Hi All, This is my first time posting, but I’ve looked through the
online forum to try to find a similar issue, and couldn’t. This is probably a
newbie issue, so hopefully someone has come across this before… I have a .Net service which returns a custom complex object.
This object has a number of generic List<> properties, which are lists of
other custom objects. In Flex I have a set of Value Objects to match each of the
objects returned in the service response. Each Value Object contains a line of
code to register the class alias, e.g.: private
static
const
ALIAS_REMOTE:* = registerClassAlias("ServerObjectName",
ClientValueObject); When the call to my service returns to the Flex Client, each
object in the object graph gets deserialized to the correct type, except for one
particular class which is contained in one of the ArrayCollections, and my
problem is I can’t see why. The object is declared and registered the same as
everything else, the client-side object code is generated and I’ve
double-checked for typo’s. I’ve also tried registering the class mappings on the
server. There is nothing special, or different about this class (that
I can see). I’ve also tried logging the server DEBUG events, which have not
shown any issues. Is there anything else I can check or try? Sorry if this sounds a bit confusing, I’m trying to keep the
post short! Thanks, Philip McKeown No virus
found in this incoming message. _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: ArrayCollection items deserializing as type Object
by Azeem Ahmed
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hi Zoli, Thank you for your help. I ended
up writing some ant scripts to automate the creation of VOs in the flex builder.
The ant script automatically adds a reference to one of the classes that serves
as a placeholder for the registration of all the VOs (I’ve noticed that the
RemoteClass metadata tag doesn’t necessarily register the class if the class
has never been used before the remote object invocation – I could be using it
incorrectly though). Anyway, the ant build thing works out fairly well and
helps me avoid any issues with some class not being compiled. By the way, I was
very excited to see the video on the fluorine blog on v1.1. It would be great
if you could add a facility to the Visual Studio (along with everything else) to
generate a class that does all the registrations for all the VO classes –
thereby avoiding issues like the ones in this thread. :) Thanks again for a
wonderful project and the excellent support. Thanks! – Azeem From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Support Hi Azeem, Important is to have your classes referenced somewhere in your
application so the compiler will pick them up. In that case you can use the [RemoteClass(alias=".NET type
name")] metadata tag without calling registerClassAlias As last resort a "registerClassAlias" will ensure that
your class is compiled (as you are referencing the AS class in the
registerClassAlias parameter) Zoli From:
fluorine-bounces@... [mailto:fluorine-bounces@...]
On Behalf Of Azeem Ahmed Hello everyone, This is a fairly newbie question.
:) I’ve been subscribed to this
list for some time now and have recently started using fluorine for one of my
projects. I think this project is wonderful and I can’t wait for v1.1.
Recently, I ran into the issue discussed in this particular thread. Of course,
without this thread, I would have been lost. :) Having said that, I’ve several
‘value objects’ in flex and the corresponding custom objects on the .net side.
However, because of the issue described below, every time I add a new object,
I’ve to add a line of code in my creationComplete handler for the application
to register the class alias (using registerClassAlias). That is rather
cumbersome and is definitely prone to errors as others start maintaining the
product (and even as I continue to add more and more classes – initially I was
thinking using the RemoteClass meta tag would be sufficient but it looks like
you have to call registerClassAlias). Anyway, I was looking for some guidance
from the experts on this list on what they do for this scenario. Is there a way
to automatically register all VO classes at start up of the application and by
that I mean without having to code in the creationComplete handler? Please let
me know and any guidance would be much appreciated. Thanks! – Azeem From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Support Hi Philip, Glad to be able to help :)) Anyway when you check the log file for such cases you will notice
the following traces (DEBUG level): DEBUG FluorineFx.FluorineGateway - Begin AMF request DEBUG FluorineFx.Messaging.MessageServer - Query endpoint ..... DEBUG FluorineFx.IO.AMFReader - Class definition
flex.messaging.messages.RemotingMessage loaded <----- this is the first
class definition for Flex RPC After these lines you should see what types FluorineFx
will deserialize. Everything that has no corresponding class mapped will
be traced as "Class definition (untyped) loaded" When you do not see a trace about the specific type then probably
class mapping info was not sent from the client. Zoli From:
fluorine-bounces@... [mailto:fluorine-bounces@...]
On Behalf Of Philip McKeown Ah, it’s typical that you find
the solution after you’ve posted the question! I’ve discovered that the problem
was that using the “private static const” to register the class alias worked
most of the time because the Class object had been referenced somehow before
the call was made. In this case, the alias didn’t get registered until after
the server request was made, and so, the Flash runtime didn’t know how to map
the response object. After moving this line of code
to another location, the deserialization worked fine! Thanks for listening!! ;-) Philip McKeown From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Philip
McKeown Hi All, This is my first time posting, but I’ve looked through the
online forum to try to find a similar issue, and couldn’t. This is probably a
newbie issue, so hopefully someone has come across this before… I have a .Net service which returns a custom complex object.
This object has a number of generic List<> properties, which are lists of
other custom objects. In Flex I have a set of Value Objects to match each of the
objects returned in the service response. Each Value Object contains a line of
code to register the class alias, e.g.: private static const ALIAS_REMOTE:*
= registerClassAlias("ServerObjectName", ClientValueObject); When the call to my service returns to the Flex Client, each
object in the object graph gets deserialized to the correct type, except for
one particular class which is contained in one of the ArrayCollections, and my
problem is I can’t see why. The object is declared and registered the same as
everything else, the client-side object code is generated and I’ve
double-checked for typo’s. I’ve also tried registering the class mappings on
the server. There is nothing special, or different about this class
(that I can see). I’ve also tried logging the server DEBUG events, which have
not shown any issues. Is there anything else I can check or try? Sorry if this sounds a bit confusing, I’m trying to keep the
post short! Thanks, Philip McKeown No virus
found in this incoming message. _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
| Free embeddable forum powered by Nabble | Forum Help |