Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top