internal static void SetSoapVersion(WsdlEndpointConversionContext endpointContext, WsdlExporter exporter, EnvelopeVersion version) { SetSoapVersionState(endpointContext.WsdlBinding, exporter, version); //Convert all SOAP extensions to the right version. if (endpointContext.WsdlPort != null) { SoapConverter.ConvertExtensions(endpointContext.WsdlPort.Extensions, version, SoapConverter.ConvertSoapAddressBinding); } SoapConverter.ConvertExtensions(endpointContext.WsdlBinding.Extensions, version, SoapConverter.ConvertSoapBinding); foreach (WsdlNS.OperationBinding operationBinding in endpointContext.WsdlBinding.Operations) { SoapConverter.ConvertExtensions(operationBinding.Extensions, version, SoapConverter.ConvertSoapOperationBinding); //Messages { if (operationBinding.Input != null) { SoapConverter.ConvertExtensions(operationBinding.Input.Extensions, version, SoapConverter.ConvertSoapMessageBinding); } if (operationBinding.Output != null) { SoapConverter.ConvertExtensions(operationBinding.Output.Extensions, version, SoapConverter.ConvertSoapMessageBinding); } foreach (WsdlNS.MessageBinding faultBinding in operationBinding.Faults) { SoapConverter.ConvertExtensions(faultBinding.Extensions, version, SoapConverter.ConvertSoapMessageBinding); } } } }
internal static void SetSoapVersion(WsdlEndpointConversionContext endpointContext, WsdlExporter exporter, EnvelopeVersion version) { SetSoapVersionState(endpointContext.WsdlBinding, exporter, version); if (endpointContext.WsdlPort != null) { SoapConverter.ConvertExtensions(endpointContext.WsdlPort.Extensions, version, new SoapConverter.ConvertExtension(SoapConverter.ConvertSoapAddressBinding)); } SoapConverter.ConvertExtensions(endpointContext.WsdlBinding.Extensions, version, new SoapConverter.ConvertExtension(SoapConverter.ConvertSoapBinding)); foreach (OperationBinding binding in endpointContext.WsdlBinding.Operations) { SoapConverter.ConvertExtensions(binding.Extensions, version, new SoapConverter.ConvertExtension(SoapConverter.ConvertSoapOperationBinding)); if (binding.Input != null) { SoapConverter.ConvertExtensions(binding.Input.Extensions, version, new SoapConverter.ConvertExtension(SoapConverter.ConvertSoapMessageBinding)); } if (binding.Output != null) { SoapConverter.ConvertExtensions(binding.Output.Extensions, version, new SoapConverter.ConvertExtension(SoapConverter.ConvertSoapMessageBinding)); } foreach (MessageBinding binding2 in binding.Faults) { SoapConverter.ConvertExtensions(binding2.Extensions, version, new SoapConverter.ConvertExtension(SoapConverter.ConvertSoapMessageBinding)); } } }