Question

I have wcf service supporting basichttpbinding and wshttpbinding. My client is running fine with basichttpbinding but when they try to post their requests using wshttpbinding, It doesn't work unless they include wsa tags in the header, but they can't change it for some reason.

My question is can I make it working without wsa tags? I see the posts regarding changing to custombinding but I am bit skeptical about it. First of all, I would like to know if there is any way possible without custom binding. If not, is there any disadvantage of using custombinding? what are the benefits of it? can I have 2 wshttp endpoint one of them using wshttpbinding and other one using custombinding?

What is exactly happening when converting to custom binding? does the encoding type change?

Thanks.

Was it helpful?

Solution 2

WCF CustomBindings allow you to construct a binding to meet the requirements of your service, when one of the system provided bindings is not an exact match. For the most part, a CustomBinding will be built from the same “building blocks” (system-provided binding elements) used in the “standard” bindings. The real difference is that you get to decide which components are assembled together, rather than relying on the set provided by Microsoft.

You may find the WCF “BindingBox” useful to help you convert a standard bindng to a custom binding: http://webservices20.blogspot.com/2009/08/bindingbox-convert-wcf-bindings.html

Also, the following link provides additional information regarding CustomBindings: http://msdn.microsoft.com/en-us/library/aa347793(v=vs.110).aspx

OTHER TIPS

The basicHttp and wsHttp bindings are also custom bindings in that regard that they are comprised of various configuration elements that make up a binding. In the case of basicHttp and wsHttp this happen to be the two most commonly used SOAP configurations, configured by the .NET WCF team to conveniently represent those configurations so you don't have to customly specify them each time you use them.

It's fairly straight-forward to convert predefined bindings to custom bindings. What changes depends on the elements you change.

And yes, a service can have one or more endpoints pointing to it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top