When adding a link to the service in this way, each generated message contract is executed similarly to the following:
[DebuggerStepThrough]
[GeneratedCode( "System.ServiceModel", "4.0.0.0" )]
[MessageContract( WrapperName = "GetCourseList", WrapperNamespace = "urn:CoursesIntf-ICourses",
IsWrapped = true )]
public partial class GetCourseListRequest
{
[MessageBodyMember( Namespace = "", Order = 0 )]
public string licence;
public GetCourseListRequest()
{
}
public GetCourseListRequest( string licence )
{
this.licence = licence;
}
}
Each generated operating contract is executed similarly to the following:
[GeneratedCode( "System.ServiceModel", "4.0.0.0" )]
[ServiceContract( ConfigurationName = "ServiceReferences.ICourses" )]
public interface ICourses
{
[OperationContract( Action = "urn:CoursesIntf-ICourses#GetCourseList", ReplyAction = "*" )]
[XmlSerializerFormat( Style = OperationFormatStyle.Rpc, SupportFaults = true,
Use = OperationFormatUse.Encoded )]
[ServiceKnownType( typeof( TCourse ) )]
GetCourseListResponse GetCourseList( GetCourseListRequest request );
}
Check Reference.csto see if your messages and work contracts are the same. If they are, the problem lies elsewhere. An exception message would be useful for tracking the problem (for example, it could be the order of the elements in the returned SOAP message).
source
share