Author |
Share Topic Topic Search Topic Options
|
Walid
Senior Member
Joined: 14-Nov-2010
Posts: 161
|
Post Options
Quote Reply
Topic: Deserializing array regress ? Posted: 28-Sep-2012 at 2:44am |
Hi,
I have an Rpc method returning an IEnumerable<a knowntype> that was right working in DF2010 and now with DF2012 is causing an error with the following message.
Did I miss something ?
Le module de formatage a généré une exception en tentant de désérialiser le message : Une erreur s'est produite en tentant de désérialiser le paramètre http://ideablade.com/EntityModel:InvokeServerMethodResult. Le message InnerException était « L'élément « http://ideablade.com/EntityModel:ReturnObject » contient des données du contrat de données « http://schemas.datacontract.org/2004/07/Common:ArrayOfServiceManager ». Le désérialiseur n'a connaissance d'aucun type mappant à ce contrat. Ajoutez le type correspondant à « ArrayOfServiceManager » dans la liste des types connus, par exemple en utilisant l'attribut KnownTypeAttribute ou en l'ajoutant à la liste des types connus qui est transmise à DataContractSerializer. ». Pour plus d'informations, voir InnerException.
[DataContract]
public class ServiceManager : IKnownType
{
[DataMember]
public string Name { get; set; }
[DataMember]
public string Description { get; set; }
[DataMember]
public ServiceStatus Status { get; set; }
}
[AllowRpc]
public static IEnumerable<ServiceManager> GetServiceManagers(IPrincipal principal, EntityManager entityManager, params Object[] args)
{
return ServicesControlManager.Instance.GetServiceManagers();
}
|
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 28-Sep-2012 at 11:07am |
|
 |
Walid
Senior Member
Joined: 14-Nov-2010
Posts: 161
|
Post Options
Quote Reply
Posted: 28-Sep-2012 at 11:35am |
Devforce found the class :
2012-09-28 20:30:33 IdeaBlade.EntityModel.KnownTypeHelper:<GetMarkedKnownTypes>b__13 Probed for known types and found Common.ServiceManager
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 28-Sep-2012 at 2:21pm |
The type needs to be known on both client and server. Is this by any chance a type in a dynamic XAP?
|
 |
Walid
Senior Member
Joined: 14-Nov-2010
Posts: 161
|
Post Options
Quote Reply
Posted: 28-Sep-2012 at 2:24pm |
yes, the file hosting the type is link to an SL assembly dynamically loaded in a xap.
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 28-Sep-2012 at 7:39pm |
You're right, this is a regression bug in the recomposition logic. We'll post when we have a fix.
|
 |
Walid
Senior Member
Joined: 14-Nov-2010
Posts: 161
|
Post Options
Quote Reply
Posted: 29-Sep-2012 at 2:32am |
ok thanks
this probem could also be related to the issue i told you about the model in a dynamic xap ? i think marcel said he will investigate on this one
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 29-Sep-2012 at 10:01am |
This is a DevForce bug, so I'll get in touch with Marcel. And yes, it is related to your earlier issue with the dynamic XAP.
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 08-Oct-2012 at 5:39pm |
Just an update for anyone else who ran into this problem - it was fixed in the 7.0.1 release, which is available via NuGet.
|
 |
Walid
Senior Member
Joined: 14-Nov-2010
Posts: 161
|
Post Options
Quote Reply
Posted: 09-Oct-2012 at 12:26am |
I confirm,the fix works well.
|
 |