Various WCF bindings and their endpoints - wcf

I have few questions about various WCF bindings and their endpoints support.
1) I just like to know what is service meta data? How a wcf service meta data look like? Can u post a sample of meta data? How it look like?
2) Service meta data can be expose by both MEX and httpGetEnable then when MEX play a key role and when people set httpGetEnable = true ?
3) I am not understanding what is difference between MEX and httpGetEnable endpoint ?
4) Various wcf binding. wcf support various type of bindings as below
basicHttpBinding
wsHttpBinding
WsDualHttpBinding
NetTcpBinding
NetNamedPipeBinding
NetMsmqBinding
WSFederationHttpBinding
NetPeerTcpBinding
MsmqIntegrationBinding
so tell me which bindings are supported by httpGetEnable and what is supported by MEX?
looking for great discussion. thanks

Check the following links You will get informations regarding this,
What was the difference between WSDL & Mex Endpoint in WCF
Understanding httpGetEnabled and Mex binding
Why do i need both mex endpoint and httpGetEnable?
For binding and its full property visit the following link
https://msdn.microsoft.com/en-us/library/ms731172(v=vs.110).aspx

Related

Want to understand httpGetEnabled and Mex Endpoint

i often saw people design their web service with both httpGetEnabled and Mex Endpoint but i do not know like
1) why mex endpoint is require ? what it does ? if we omit mex endpoint then what will occur ? if i omit mex endpoint then any .net application or java application could call my web service? help me the real usage of mex endpoint like when it is required and when not ?
2) what is httpGetEnabled
if i omit httpGetEnabled then any .net application or java application could call my web service?
any .net client can add web reference of my web service if httpGetEnabled is set false of does not exist? what is the default value of httpGetEnabled ?
what httpGetEnabled does ? please explain the usage httpGetEnabled with example or scenario.
thanks
MEX and WSDL are two different schemes to tell potential clients about the structure of your service. So you can choose to either make your service contracts public as "metadata exchance format" (MEX) or in the "web service description language" (WSDL) -- the latter being accessible via HTTP(s).
Thus in order to generate proxies, you need meta data information. When you remove the serviceMetadata-line you say you are not providing meta data in WSDL format.
But the line before, publishing your metadata in MEX, is still active, thus you can generate a proxy from those metadata.
From those follows naturally that when you provide neither WSDL nor MEX formatted information, you cannot generate a proxy.

Using basicHttpbinding and get the response in raw data

I've looked all day and I couldn't able to find a correct answer on how get the response of my Web Service using basicHttpBinding without the SOAP formatting.
Can anyone know how to do that ? or another way for getting the raw data ? (like a string)
You have to use webhttpBinding. Look at the following articles, it might help you:
Creating WCF Service with SOAP/REST Endpoints
How to enable REST and SOAP both on the same WCF Service
An Introduction To RESTful Services With WCF

WCF wsdl generation missing WsTrust (RequestSecurityToken)

We have a problem in integrating a wcf service in a web service firewall.
Because the wsdl of the service does not contain the operations for ws-trust (requestsecuritytoken, ..).
How can I force WCF to include all details in its wsdl?
Or do I have to construct the wsdl myself?
Details:
Binding: WSFederationHttpBinding
MessageVersion: Soap12
Maybe it's because WCF produces multiple files by default and that is not always supported by things other than WCF clients.
Try this blog post about making WCF producing single wsdl. Maybe it will help.

What is the underlying type of Binding used by WCF Data Services

While creating a WCF data service, we do not have to define Endpoints in the config. What is the type of Binding that it uses, by default? Is there a way we can change the type of Binding being used?
WCF Data Services is an extension of the WCF REST services, and thus uses the webHttpBinding.
This binding cannot be changed for WCF Data Services - the whole architecture is so intimately tied to the HTTP and REST paradigm, it won't work over SOAP:
From what I remember, those created with ServiceHostFactory use basicHttp.
From playing with WebServiceHostFactory I could only seem to connect to it with WebHttpBinding leading me to believe that is the binding it uses underneath.
It states on: http://msdn.microsoft.com/en-us/library/system.servicemodel.activation.webscriptservicehostfactory.aspx that WebScriptServiceHostFactory uses the WebHttpBinding
Hope that helped,
Anthony
EDIT: This page: http://msdn.microsoft.com/en-us/library/bb412204.aspx makes me believe that WCF Web Services default to using WebHttpBinding

WCF using REST, having some binding questions

I am really confused right now and I can't get any right answers anywhere.
My confusions are:
1) Isn't wsHttpBinging (which is beefed up basicHttpBinding) used in SOAP instead of REST and REST only uses webHttpBinding?
2) Also, DOES silverlight 4 with WCF (REST) support wsHttpBinding (VS2010)? I read that it does not everywhere on the net but I some how got silverlight 4 working with REST using wsHttpBinding.
NOTE: I am using Factory="System.ServiceModel.Activation.WebServiceHostFactory". Is this factory setting somehow bypassing my web.config setting for wsHttpBinding to make it work with webHttpBinding and i am thinking by my wsHttpBinding is working?
Thank you.
WCF uses SOAP by default - all binding except the webHttpBinding use SOAP.
If you want to do REST, you need to use the webHttpBinding.
1) Isn't wsHttpBinging (which is
beefed up basicHttpBinding) used in
SOAP instead of REST and REST only
uses webHttpBinding?
Yes - wsHttpBinding is a SOAP-based protocol - webHttpBinding is REST
2) Also, DOES silverlight 4 with WCF
(REST) support wsHttpBinding (VS2010)?
Silverlight 4 supports basicHttpBinding (SOAP), netTcpBinding (new in SL4 - SOAP) and webHttpBinding (REST).
NOTE: I am using
Factory="System.ServiceModel.Activation.WebServiceHostFactory".
Is this factory setting somehow
bypassing my web.config setting for
wsHttpBinding to make it work with
webHttpBinding and i am thinking by my
wsHttpBinding is working?
Yes, if you use the WebServiceHostFactory in your SVC file, then you're really getting the webHttpBinding (REST) implicitly. The WCF runtime will not look at your web.config for infos - it has all the information and settings it needs when you use WebServiceHostFactory - and you get webHttpBinding.