MessageVersion for the binding

I don't want to do this

if (binding is WSHttpBindingBase)
{
_messageVersion = MessageVersion.Soap12WSAddressing10;
}
else if (binding is BasicHttpBinding)
{
_messageVersion = MessageVersion.Soap11WSAddressing10;
}

Is there a way to query the binding to know which MessageVersion uses


Answer this question

MessageVersion for the binding

  • Fonzy

    I found it

    factory.MessageVersion

    where factory is ChannelFactory<TChannel>( Binding, EndpointAddress )

    Thanks,
    Matias
    http://staff.southworks.net/blogs/matiaswoloski

  • MessageVersion for the binding