Reputation: 1362
I need to publish a webservice that take a variable number of parameters. My problem is that the caller can send only simple parameters (primitive datatype) not xml, array or lists.
So i would like to dynamically generate wsdl so that if the caller try to access my webservice eg http://myendpoint:myport/baseWsName_numberOfParameter?wsdl then a wsdl with a customizable number of parameters is served (and the caller can use that versione of WebService), the parameters can be all of type strings in my scenario
I would like to avoid to manually define a huge number of overload one for any reasonable number of parameters.
Upvotes: 1
Views: 59
Reputation: 125237
If I understand your question correctly and if the client can't pass array, while using a comma separated string is a good option you can use AppDomain.DefineDynamicAssembly
and ServiceDescriptionReflector
as used in Creating and exposing a SOAP service and its WSDL dynamically in C#
Upvotes: 1