I am new to WCF. I have a scenario where i have .
When i am trying to pass the arr
This line is the problem, from the service:
object[] GetCommisionResponse(object[] loc_);
What you've told WCF here is that you're going to be returning an array of Object. Because of that, the client expects to get back an array of Object. That of course is not what you're actually giving it.
Subclasses don't work the same way in WCF that they work elsewhere. You have to explicitly define in the service what you're returning, because the client has to know what to expect and create classes for.
So if you're actually returning an array of Flight, change it to this:
Flight[] GetCommisionResponse(object[] loc_);
But if you're returning something and some subclasses of itself, you'll have to use the KnownType attribute.
[KnownType(typeof(FlightSubClass))]
Flight[] GetCommisionResponse(object[] loc_);
You can do the same thing on the Interface using ServiceKnownType, and only have to do it once.
When you generate the Service reference, you should set the CollectionType to System.Collections.Arraylist - if you use the UI it's in the Advanced section, if you use svcutil.exe it's the /ct switch
There's a lot more information in Collections in Data Contracts on MSDN