WCF Service Maintenance Client - Parameter names are case sensitive

Using the following interface to communicate with PHP with .NET, .NET builds an XML request body with barcode characters and a parameter branch. Parameter names must be barcode and branch. Yes, the PHP server is case sensitive.

Am I forced to smooth out parameter names? or can I specify names using attributes?

Many thanks neil

[ServiceContract]
public interface IStockEnquiryService
{   
   [OperationContract]
   [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat =     WebMessageFormat.Xml, UriTemplate = "")]
   Branches GetStockInfo(string barcode, string branch);
}
+3
source share
1 answer

Try applying MessageParameterattribute to the method arguments and specify the correct argument in the Name property.

+1
source

Source: https://habr.com/ru/post/1731039/


All Articles