What is Custom Binding? Custom Binding provides the full control over the messaging stack for the user. We use Custom Binding, when none of the system provided binding is matching our requirement. For example let us say, your requirement is to use Http protocol to send SOAP12 message version. Each Binding is made of different binding elements. We can construct a Custom Binding from a set of system-provided binding elements. System-provided binding elements are stacked in a specific order and we need to follow that order while creating a custom binding. Few binding elements are optional in the stack and few are required in binding elements stack. Element Stack Custom Binding is constructed using CustomBinding class. The class is defined as below Constructor of CustomBinding class takes different Binding elements. Binding elements get added in form of element stack described below and shown in the figure above. Binding element stack is as below,
At the bottom is a required transport element. You can use your own transport or one of the following transport binding elements Windows Communication Foundation (WCF) provides:
There are two way to create custom binding
Creating CustomBinding through configuration In above custom binding, I am using all the basicHttpBinding function but have modified the message format to SOAP11. In next article I will show you how to create custom binding. Thanks for reading. Happy Coding.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: