protected override BindingElement CreateBindingElement() { var bindingElement = new LoggingBindingElement(LogPath, SaveOriginalBinaryBody, UseCustomHandler); ApplyConfiguration(bindingElement); return(bindingElement); }
/* * SOAP 1.1 * mediaType = "text/xml"; * contentType = "text/xml; charset=utf-8"; * <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> * * SOAP 1.2 * mediaType = "application/soap+xml" * contentType = "application/soap+xml; charset=utf-8" * <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"> * * * Addressing10 * xmlns:a="http://www.w3.org/2005/08/addressing" * * AddressingAugust2004 * xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" */ /* * [ConfigurationProperty("writeEncoding", DefaultValue = "utf-8")] * [TypeConverter(typeof(EncodingConverter))] * public Encoding WriteEncoding * { * get * { * return (Encoding)this["writeEncoding"]; * } * set * { * this["writeEncoding"] = (object)value; * } * } */ protected override BindingElement CreateBindingElement() { string logPath = LogPath; bool saveOriginalBinaryBody = ParseBoolean(SaveOriginalBinaryBody); bool useCustomHandler = ParseBoolean(UseCustomHandler); EnvelopeVersion envelopeVersion = ParseEnvelopeVersion(MessageVersion); AddressingVersion addressingVersion = ParseAddressingVersion(MessageVersion); var messageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(envelopeVersion, addressingVersion); var bindingElement = new LoggingBindingElement( logPath, saveOriginalBinaryBody, useCustomHandler, messageVersion ); ApplyConfiguration(bindingElement); return(bindingElement); }