Hi All,
I followed the Microsoft example in my WCF Interface.
Now in my client code where I'm using trying to use the wcf service I have:Code:[ServiceContract] public interface IRS { [OperationContract] Boolean MergeData(CompositeType filenameList);....... [DataContract] public class CompositeType { [DataMember] public List<String> filenameList { get ; set ; }........
however, in the final line. I receive an error : The best overloaded method match for myService.IRS.MergeData(myService.CompositeType) has some invalid arguments.Code:List<String> localLockton = new List<String>(workLockton); myService.IRS objIRS; objIRS.MergeData(localLockton);
Followed by Argument 1: cannot convert from System.Collection.Generic.List<string> to myService.CompositeType.
I thought that in my interface of wcf by declaring it mergedata with compositeType I was enforcing the type to be passed.
If I change my client code to:
I receive an arror on the above line with: cannot implicitly convert type System.Collections.Generic.List<string> to string[]Code:myService.IRS objIRS; myService.CompositeType myList; myList.filenameList = localLockton; objIRS.MergeData(myList);




Reply With Quote