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.
如果我正确理解了您的问题,并且如果客户端无法传递数组,那么在使用逗号分隔的字符串是一个不错的选择时,可以使用AppDomain.DefineDynamicAssembly
和ServiceDescriptionReflector
, 在C#中动态创建和公开SOAP服务及其WSDL中使用
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.