I have this class
public class Subject
{
int ID;
string Name;
int Semester;
int Grade;
}
I am using it in a .asmx and in .svc(wcf) web service. When invoking the service with the ?wsdl in browser i expect to see the complex type Subject with all its members but instead i see only a declaration for the complex type.
<xs:complexType name="Subject">
<xs:sequence/>
</xs:complexType> -> this is from the wcf service wsdl
<s:complexType name="Subject"/>
-> this is from the asmx web service wsdl
In the wcf service the class has the [DataContract] attribute
how do i generate the wsdl to show me the complex type details with all members? what am i doing wrong? Im using .NET 4 and VS2010