Using Shared Collections as Parameters in ASMX Web Services

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 create a proxy. In the generated proxy, the method definition is changed to -

DoSomething(string[] list) { ..

      

Is it not possible to have a list as an ASMX web service parameter? What to do to fix the proxy?

+2


source to share


1 answer


This is normal. Generics is a specific .NET artifact. There is no such concept in the generated WSDL. Imagine a client that doesn't support generics such as PHP, for example. This is the reason your shared collection appears as an array. Thus, there is nothing wrong with your client proxy that needs fixing.



+6


source







All Articles