Silverlight WCF service consuming inherited types in datacontract -


I'm trying to consume a WCF service in Silverlight ...

Something that has to be done

    1. The assembly in which all my types Data are marked with contracts, P> a silverlight assembly, which is related to files in the first assembly.

    This means that my .Net app assembly can refer to assembly 1 and my menopause app assembly. It works fine and I can communicate in service.

    Problems occur when I try to transfer classified classified into heritage. IFlight - There is an interface for all types of flights.

    BaseFlight: IFlight - Imports a baseflight flight IFlight

    AdhocFlight: BaseFlight, IFlight - An Adihoke Flight flies off the Basflite and also executes IFlight.

    I can successfully transfer base flight based on the service. However, I really need to transfer the objects of IFlight to the interface because I want an operation contract that can transfer many types of flights ...

      Public IFlight GetFlightBooking () {AdhocFlight Af = new adhocFlight (); Come back; }  

    ... I think that should work?

    However, I get an error:

    "The server did not give a meaningful answer; this could be due to a contract mismatch, a session prematurely off or an internal server error. "

    Any thoughts would be appreciated.

  • I think what you want to do in "normal" .NET WCF is a question here The interface between the WCF service speaks about:

    But I seriously doubt whether it will work in Silverlight or not. There is WCF support sketches in SL, at least to say. I have not tried to do this though I can be wrong.


    Comments

    Popular posts from this blog

    oracle - The fastest way to check if some records in a database table? -

    php - multilevel menu with multilevel array -

    jQuery UI: Datepicker month format -