开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜