KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Using the WCF web programming model one can specify an operation contract like so: [OperationContract] [WebGet(ResponseFormat = WebMessageFormat.Xml, UriTemplate = "SomeRequest?qs1={qs1}&qs2={qs2}")] XElement SomeRequest1(string qs1, string qs2); Now if we had to make a contract that accepts an array of parameters with the same name (in this case qs1 ) contract like so... [OperationContract] [WebGet(ResponseFormat = WebMessageFormat.Xml, UriTemplate = "SomeRequest?qs1={qs1}&qs1={qs2}")] XElement SomeRequest2(string qs1, string qs2); We get the error message at run time when we make the invocation to the method: the query string must have 'name=value' pairs with unique names. Note that the names are case-insensitive. See the documentation for UriTemplate for more details. How does one define an HTTP service that exposes a resource with an array of parameters without resorting to a loosey-goosey interface?
Tags (comma-separated)
Save Edits
Cancel