I have an ASMX web service which has a method -
void DoSomething(List<string> list);
I have implemented this service, compiled and hosted in IIS. I used wsewsdl3.exe
to generate the proxy. In the generated proxy the method definition is changed to -
DoSomething(string[] list) { ..
Is it not possible to have List as a parameter to an ASMX web service? What should I do to fix the proxy?
That's normal. Generics are a .NET specific artifact. There's no such notion in the generated WSDL. Imagine a client which doesn't support generics like PHP for example. That's the reason why your generic collection is exposed as an array. So there's nothing wrong with your client proxy that requires fixing.
来源:https://stackoverflow.com/questions/4254223/using-generic-collections-as-parameters-in-asmx-web-services