Service code
[ServiceContract]
public interface IBusinessManager
{
[OperationContract]
string GetCompanyURL(string companyName);
}
public class BusinessManager : IBusinessManager
{
public string GetCompanyURL(string companyName) { ... }
}
[System.ServiceModel.ServiceContractAttribute(ConfigurationName = "BusinessManager.IBusinessManager")]
public interface IBusinessManager
{
[System.ServiceModel.OperationContractAttribute(IsOneWay = true, Action = "http://tempuri.org/IBusinessManager/GetCompanyURL")]
string GetCompanyURL(string CompanyName);
}
public partial class BusinessManagerClient : System.ServiceModel.ClientBase<businessmanager.IBusinessManager>, BusinessManager.IBusinessManager
{
public string GetCompanyURL(string CompanyName)
{
return base.Channel.GetCompanyURL(CompanyName);
}
}
You might notice that the proxy method’s parameter name is CompanyName, and the service interface parameter name is companyName.
It is case sensitive and it wont give you any compilation error or runtime error, but you will see you application is not running as expected.
Verify the parameter name and make sure that the cases are also correct when you create your proxies.
No comments:
Post a Comment