WCF Rest Service Client - Parameter Names are case sensitive
When using the following interface to talk to PHP from .NET, .NET builds the request body XML with parameter names barcode and branch. The parameter names should be Barcode and Branch. Yes, the PHP server is case sensitive.
Am I forced to capitalise my parameter names? or can I specify names using attributes?
Many Thanks Neil
[ServiceContract]
public interface IStockEnquiryService
{
[OperationContract]
[WebInvoke(Method = "POST", BodyStyle = WebMessa开发者_运维问答geBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Xml, UriTemplate = "")]
Branches GetStockInfo(string barcode, string branch);
}
Try applying the MessageParameterattribute to the method arguments and specify the right case in its Name property.
精彩评论