WCF, ASMX Basic HTTP and IIS Binding

I did a lot of work with applications hosted in WCF. Recently I was asked to write a web service in which the calling client was a Linux program called "WGET". I would like to use WCF instead of the traditional ASMX web service. The web service returns a standard XML response. I am not sure of the details between the two technologies, but I know that WCF is the right route. I created a WCF service to host in IIS (using basicHttpBinding).

1.) Have traditional ASMX web services (standard HTTP POST / GET) SOAP been used to return responses? I created a class from XSD for web service response. What is really going on behind the scenes? Are there only special HTTP XML headers that know how to handle the response? Is the response not included in SOAP? The traditional ASMX web service worked perfectly with Class I generated using the .Net "XSD" program.

2.) I want to use WCF for this service. Will using basicHttpBinding work? As I already read, this is the correct usage binding for ASMX clients. Does it use SOAP, standard HTTP headers, or something else?

3.) This is a stupid question because I have not done a lot of web services programming. I noticed that the default ASMX landing page had sample responses and code for calling functions. When I create the same service using WCF, I had to create a client application to perform these tasks. Is there a way to expose the WCF endpoint as a classic ASMX or WSDL service - the only route?

As always, I really appreciate the feedback.

Thanks Brennan

+3
source share
1 answer

To answer your questions:

1.) Have the classic ASMX web services (standard HTTP POST / GET) SOAP been used for response responses?

Yes. ASMX uses the SOAP 1.1 standard, which is also implemented in WCF.

2.) WCF . basicHttpBinding ?

basicHttpBinding - ASMX, . SOAP 1.1 , ASMX, ASMX.

3.) , ASMX . WCF ASMX WSDL ?

WCF , , . , ASMX ( ). , . WSDL/XSD - WCF.

+6

Source: https://habr.com/ru/post/1750419/


All Articles