WCF: parameters handled in custom channel not present in generated WSDL
I have some special parameters to all my wcf service methods that are handled inside a custom channel and are not exposed in the service method parameter list. This works fine for json/xml endpoints, but the I do开发者_运维问答n't know how to use a SOAP endpoint with this setup because the generated WSDL doesn't include fields that are not in the service call parameter list.
Is there a way I can centralize the handling of the special parameters that apply to all service methods (authentication, locale and other contextual information) and provide a SOAP endpoint that Just Works (tm)?
Hand editing wsdl files is not an option.
Provide something that implements IWsdlExportExtension to modify the WSDL as it is generated to contain the extra information you want. (Your custom channel BindingElement might be a good place to do this).
精彩评论