none
WCF Restful Services & Net TCP binding

    Question

  • Hi

    I have very high level knowledge of Rest. I was little confused when it came to WCF restful services. I have a service which is actaull a intranet service however it gets called from Desktop application as well as from web application. So currently we have WSHttp (for web app)& netTcp(for desktop) binding provisioned. Now if i think about makeing this service Restful will my NetTCP biding still work with this model.

    Based on my understanding Rest is more toward Http Api based model so it will not help me for TCP based biding. secondly if at all i have to make this service Rstful what approach i need to follow make this service support NetTcp without code duplication.

    Thanks

    Vishal.

     

    Wednesday, November 24, 2010 11:23 PM

Answers

  • Rest services are based on Http principles and cannot work with any other transport.

    You should decide which service style you want (Soap / Rest) first and then consider the quality of service details (e.g. transport).

    If you are required to support a legacy netTcp Soap service you must use Soap.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, November 25, 2010 2:35 PM

All replies

  • Rest services are based on Http principles and cannot work with any other transport.

    You should decide which service style you want (Soap / Rest) first and then consider the quality of service details (e.g. transport).

    If you are required to support a legacy netTcp Soap service you must use Soap.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, November 25, 2010 2:35 PM
  • Hey Thanks Yaron

    Yes i have to move old ASMX services to WCF based....however these services are intranet services & assist web App, internal desktop apps...its not really a internet based application.

    Based on your comments i guess Rest will not help me great here...

    Let me know your views

    Thanks

    V

     

     

    Sunday, November 28, 2010 11:14 PM
  • Hi V,


    As Yaron mentioned, REST programming model is specific to HTTP based transport since it relys on the HTTP GET/POST feature to work.

    for your scenario, the endpoint that uses HTTP tranport(currently use WShttpbinding) can switch to use REST model(change it to webHttpBinding). But for the tcp based one, you cannot change it to REST style, but keep using netTcpBinding for it.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, November 29, 2010 4:16 AM