0

Why I am getting OPERATION NOT SUPPORTED BY WCFTestClient because it is of type ...? (See screenshot)

The simillar method is working for normal plain contracts but not working for contract refering Entity Framework class

There are two Response DataContracts.

  • Plain data contract

    [DataContract] public class GetSomeResponseDataContract { private Collection myFund;

    [DataMember]
    public Collection<MyFund> MyFund
    {
        Get { }
    }
    

    }

Where MyFund is

[DataContract]
    public class MyFund
    {
        [DataMember]
        public string FundCode { get; set; }

        [DataMember]
        public string FundName { get; set; }
.
.
}
  • Data Contract with EntityDataContract

    [DataContract] public class GetYoursResponseDataContract { private Collection yourFund;

        [DataMember]
        public Collection<YoursFund> YourFund
        {
            Get { }
        }
    }
    

Where YourFund is

 [EdmEntityTypeAttribute(NamespaceName="RModel1", Name="YoursFund")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class YoursFund : EntityObject
    {
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
       [DataMemberAttribute()]
        public global::System.String FundCode
        {
            get
            {
                return _FundCode;
            }
            set
            {
                OnFundCodeChanging(value);
                ReportPropertyChanging("FundCode");
                _FundCode = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("FundCode");
                OnFundCodeChanged();
            }
        }
}

enter image description here

PawanS
  • 7,033
  • 14
  • 43
  • 71

1 Answers1

0

The following is a list of features not supported by WCF Test Client:

Types: Stream, Message, XmlElement, XmlAttribute, XmlNode, types that implement the IXmlSerializable interface, including the related XmlSchemaProviderAttribute attribute, and the XDocument and XElement types and the ADO.NET DataTable type.

Try Using Other Clients such as WCFStorm or Create a Proxy client and check

In your case, try to return the result as List Not as Collection

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396