Your Service Contract interface is just that - a formal contract between what the server will accept and what the client needs to adhere to. This contract is serialised in to XML in the form of the wsdl - so any data types which appear in your contract must be expressible in their serialised form in XML.
In your case, the number of the arguments to your service call is not well-defined: it could have 0, 1, 2... etc. One of the tenants of service orientation is that the contracts need to be explicit - which this is not.
The most "idiomatic" approach (within a service orientated context) is the following:
[ServiceContract]
public interface IRestService {
[OperationContract]
[WebGet(UriTemplate = "operations/{values}")]
void Operations(string[] values);
}
As suggested in this answer, if you want to add some syntactic sugar on the client side you could create an extension method which does use the params
keyword to make the client-side experience easier to digest.
EDIT:
As pointed out by Tom, the above contract will not work. You would need to either change the operation to a POST (as demonstrated on Tom's answer), or make the argument string of a delimited that you unravel on the server side to produce the array:
[ServiceContract]
public interface IRestService {
[OperationContract]
[WebGet(UriTemplate = "operations/{delimitedValues}")]
void Operations(string delimitedValues);
}