tags:

views:

172

answers:

1

Hello,

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 = WebMessageBodyStyle.Wrapped, ResponseFormat =     WebMessageFormat.Xml, UriTemplate = "")]
   Branches GetStockInfo(string barcode, string branch);
}
A: 

Try applying the MessageParameterattribute to the method arguments and specify the right case in its Name property.

tomasr