How to check if a web-service is REST or SOAP? - wcf

Could anyone please let me know how we can check if a particular web-service is REST or SOAP?
I understand that the main difference is the wsdl file, however, even for WCF REST service with webHttpBinding, one has a wsdl file which is generated.
I want to know the best possible ways to identify for a given service, check if it is a REST or SOAP.
Thanks.

Check for WSDL definition. If exists the web service is SOAP. By convention the WSDL file is located on following URL: [webservice_url]?wsdl
P.S. This check will work in most cases, but not all cases. REST web services sometimes are described with WADL (https://www.w3.org/Submission/wadl/)

Related

ASMX Web service migration to wcf

We have developed the wcf service with the existing web service code. the existing customer wants to consume that service only changing the new url. They do not want to replace the proxy class. is it possible in any case.
The customer is able to consume the same with replacing the proxy and config. but he does not want to replace the proxy. please share ur comments whether it is possible or not.
You may be able to do this by configuring an endpoint using basicHttpBinding. I believe you will also need to force the use of the XML Serializer, and I don't know how to do that offhand, so someone else will have to help you with that. I'm concerned that there could still be small differences that would cause errors using the same proxy class.
On the other hand, if performance isn't the top consideration, you could create an ASMX service using the original class and method attributes from the old service. This ASMX service would then call the WCF service.
BTW, the ASMX service could call the WCF service on a fast endpoint. If they were running on the same server, they could use netNamedPipesBinding, for instance, but in any case could use netTcpBinding, which uses binary over TCP/IP. That would mitigate the performance difference from the extra hop.

WCF WSDL Page Missing

I have been following along with the Aaron Skonnard videos on creating a WCF service. I have completed the tutorial found here and when finished the WSDL page that would normally be available to a consumer of this service is not found (page states that "Endpoint is not found").
I have found many references to this issue including adding a 'mex' endpoint, adding httpGetEnabled, etc. but nothing seems to work. I believe this is because the tutorial removes the service files from the website code behind and instead uses a reference to another project.
I like the way the service is created with this tutorial but need to know how to get this WSDL page to display properly so others can consume my service. Is this no longer the correct way to create services in .NET 4?
I don't think REST based services (WebAPI) create a WSDL at all. I beleive the WSDL is only for the SOAP based WCF services.

Generate WSDL web-service objects in SAP

is it possible with SAP to generate client stubs and transfer objects from a WSDL served by a .NET WCF web service? Or do I have to build my SOAP XML requests manually?
To be more on the point. I still have a WCF web service and the wsdl. I have no knowlege in SAP. So the question is. Is it possible and how can I create client service stubs and the transfer objects in SAP from my WSDL?
It's easy to create an ABAP client for an existing web service if you have access to the URL for obtaining the wsdl file or the wsdl file itself. See this link for an step by step tutorial wich is basically:
1- Generate proxy from wsdl using assitant
2- Use proxy generated in your ABAP program
Regards
You can use the WSDL from the wcf for this. You can get the WSDL as service.svc?wsdl. However at times, some SOAP client generator expect all the definitions of the SOAP/WSDL in a single call. For that you might have to look at the following pages:
http://weblogs.asp.net/pglavich/archive/2010/03/16/making-wcf-output-a-single-wsdl-file-for-interop-purposes.aspx
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f03b6e78-ef28-4692-8f19-62d2f2d3bc9c
WCF: how to generate a single WSDL document, without WSDL:import?

Writing a RESTful service using WCF for public usage. Is providing WSDL really necessary?

As the question suggests, is providing the WSDL really necessary, or is it more of a "nice to have" feature? I have written a RESTful service, using .Net 4.0. I see now that WSDL isn't automatically generated by adding ?wsdl... and I can't get it to either after trying various suggestions :-/
I have written several ASMX services in the past - all well and good as the WSDL is accessible automatically. I want to move away from SOAP. I would prefer to provide potential users with a Class (C#, Java versions etc..) and sample code. Is that an equally viable option? Or am I being lazy in suggesting all that?
Thanks for your opinions.
WSDL = SOAP;
REST != WSDL;
For a REST Service, WSDL is not a nice-to-have it is a cannot-have.
If you are exposing a RESTful service then WSDL does not mean anything - WSDL means you have a SOAP web service.
You can expose a SOAP web service in addition to your REST service but the WSDL would be for that service.

Consume a WCF service via HTTP POST and without a service reference

I am going to need a web service that receives a string via HTTP POST and processes it without any response to the client. However, since I'm not the one making the client (which will be cell phones) I am unable to use a generated client class to consume the service. The service would also need to be self hosted in a regular Windows service, if that matters.
As I'm not too experienced with web services nor WCF, I am frankly unsure if I can or should use WCF for this, but as it's the only type of web service I'm at least a little familiar with I figured it would be great to start out with one if at all possible.
I've been googling around quite a bit but haven't been able to find any good references to this, so I'd also be very grateful if someone has a link lying around to someplace that discusses it.
I think you need WCF Restful service with one way operation. Following link might help you:
A Developer's Guide to the WCF REST Starter Kit,