I am trying to consume a Web service for which WSDL has been provided. I have added the reference service and am using the generated proxy classes / client.
The client has a method called getUpdate
which requires a getRequest
parameter.
The getRequest
class has string UserName
, string WSName
and @params[] @params
properties.
I've learned that the @ allows C# to use a reserved word as a property name, but I am not familiar with how to assign to the @params
property.
See code:
using (var svc = new ServiceClient())
{
getRequest request = new getRequest();
request.UserName = "someuser";
request.WSName = "somename";
request.@params = //what do I do here?
var result = svc.getUpdate(request);
}
The @params
property is of type @params[]
and anything I try to assign gets flagged as
cannot implicity convert to params[]
How do I assign my parameters?