Pergunta

What is the importance of this setting httpGetEnabled="false" or httpGetEnabled="true" what will happen if we set httpGetEnabled="false"

suppose if I want any .Net 2.0 client can consume my wcf service which has been developed by .Net 4.0 then how should i develop the wcf service. once i read that if any client need to consume my wcf service then we need to set httpGetEnabled="true" as a result they can consume ny wcf service through wsdl. things was not ver clear so if possible please in more details how wcf service expose through wsdl.

In wcf mex is also there to expose meta data. So I like to know what is the difference between mex & wsdl?

What mex offer more than wsdl? people said mex is configurable but wsdl is not...What does it mean? need details.

If we search Google to see how wsdl envelope looks like then we get ample of link but I found none for how mex envelope look like searching Google. so please help me to visualize how mex meta data structure look like.

If we remove mex endpoint from service config then how other client can consume my service? other client can consume my service then through wsdl if yes then how ?

what url I need to enter to have the wsdl of any wcf service ? if `httpGetEnabled="false then wsdl will be possible or not.

Here I asked couple of quetion on mex & wsdl. I am new so bit confused about mex & wsdl usage in wcf.

another question is that what is the usage of soap in wcf & relation.

Foi útil?

Solução

Invoking the service is totally different than exposing metadata. Basically, a service doesn't have to expose metadata (mex or wsdl) to be called by clients.

Metadata are just exposed to allow easier proxy class generation. This allow developpers to 'Add a service referencee' in VS. WCF provides another way to generate a proxy class : using wsdl.exe with a physical wsdl file.

You can also redistribute your service contract through assemblies and use ChannelFactory.

Exposing metadata is useful on dev, because it allows developpers to re-generate proxy class easily after each modification on the contract (Update Service Reference). On Stage/Prod, it depends on your context : it is generally disabled to "hide" service contract.

About wsdl versus mex, there is another recent answer for this.

If we remove mex endpoint from service config then how other client can consume my service? other client can consume my service then through wsdl if yes then how ?

Your clients can invoke your service only if the have a generated proxy class or your service definition. As I said, they can generate this class using metadata when they want or use a physical wsdl file that you have previously sent.

what url I need to enter to have the wsdl of any wcf service ? if `httpGetEnabled="false then wsdl will be possible or not.

HttpGetEnable allow you to expose metadata through HTTP GET method, usually the service’s address with the suffix of ‘?wsdl'. Simply browse the service url and wcf will generate an help page for you.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top