none
Different Types of WCF Services?

    Question

  • Hi,

    new to wcf services, so its just a beginner's question.

     

    why there are you so many specialied services. there are:

    1. wcf service

    2. wcf data service

    3. ajax-enabled wcf services

    4. silverlight wcf web service

    then a new one RIA services.

    i mean, can't you call a normal wcf service from ajax and silverlight?? what is the need, and what are technical differences. I am getting confused from this.

     

    regards,

    Azam.


    Azam Ali
    Tuesday, February 22, 2011 10:49 AM

Answers

  • Hello, actually there're only 2 basic types of services, and 5 variations.

    2 basic types of services:

    1. SOAP services: Using WS-*** standards. Typically there's a WSDL file defining the service metadata, so clients can generate client proxy classes based on the metadata. The messages being exchanged are typically SOAP messages. In WCF, however, sometimes to achieve a better performance, binary messages can be exchanged. For example, when using NetTcpBinding, it by default uses binary message encoding. But those services are usually still considered as SOAP services. When using http, SOAP services can only use a single HTTP verb: POST. Without the metadata to generate a client proxy, it will be quite difficult to consume the service.

    2. REST services: Using HTTP to send/receive arbitary data. The data can be xml, JSON, binary, and so on. Usually there's no standard, and client/service must agree on the data format. The data format is usually described by documents. Client developers must read the documents to consume the service. But the data format is usually simpler and more lightweight compared to SOAP.

    5 variations:

    1. Core SOAP services: Build a standard SOAP service.

    2. Core REST services: Build a standard REST service.

    3. Data services: A variation of REST service, where the data being sent/received use a common format (OData), and thus clients know how to consume a new data service even if there's no document. No arbitary data is allowed. Only AtomPub (xml) and JSON is supported.

    4. RIA services: With RIA services, you can create one service and define multiple endpoints. For example, you can define a SOAP endpoint and an OData endpoint. This allows you to create one service which combines the power of SOAP services and data services. Unfortunately the current version of RIA service has a lot of limitations. It doesn't support a lot of advanced features.

    5. Workflow services: A variation of SOAP service. It allows you to expose a workflow instead of code as a SOAP service.

    As for AJAX/Silverlight enabled WCF services, they are just Visual Studio templates that help you to build AJAX/Silverlight friendly services. Those clients do not support all features of WCF. For example, AJAX doesn't support binary message encoding.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by Yi-Lun Luo Monday, February 28, 2011 9:38 AM
    Wednesday, February 23, 2011 2:07 AM

All replies

  • Hello, actually there're only 2 basic types of services, and 5 variations.

    2 basic types of services:

    1. SOAP services: Using WS-*** standards. Typically there's a WSDL file defining the service metadata, so clients can generate client proxy classes based on the metadata. The messages being exchanged are typically SOAP messages. In WCF, however, sometimes to achieve a better performance, binary messages can be exchanged. For example, when using NetTcpBinding, it by default uses binary message encoding. But those services are usually still considered as SOAP services. When using http, SOAP services can only use a single HTTP verb: POST. Without the metadata to generate a client proxy, it will be quite difficult to consume the service.

    2. REST services: Using HTTP to send/receive arbitary data. The data can be xml, JSON, binary, and so on. Usually there's no standard, and client/service must agree on the data format. The data format is usually described by documents. Client developers must read the documents to consume the service. But the data format is usually simpler and more lightweight compared to SOAP.

    5 variations:

    1. Core SOAP services: Build a standard SOAP service.

    2. Core REST services: Build a standard REST service.

    3. Data services: A variation of REST service, where the data being sent/received use a common format (OData), and thus clients know how to consume a new data service even if there's no document. No arbitary data is allowed. Only AtomPub (xml) and JSON is supported.

    4. RIA services: With RIA services, you can create one service and define multiple endpoints. For example, you can define a SOAP endpoint and an OData endpoint. This allows you to create one service which combines the power of SOAP services and data services. Unfortunately the current version of RIA service has a lot of limitations. It doesn't support a lot of advanced features.

    5. Workflow services: A variation of SOAP service. It allows you to expose a workflow instead of code as a SOAP service.

    As for AJAX/Silverlight enabled WCF services, they are just Visual Studio templates that help you to build AJAX/Silverlight friendly services. Those clients do not support all features of WCF. For example, AJAX doesn't support binary message encoding.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by Yi-Lun Luo Monday, February 28, 2011 9:38 AM
    Wednesday, February 23, 2011 2:07 AM
  • thanks alot for your response, it was really helpfull,

     but it seems, these are basically "end points" by which we categorize wcf services. a simple wcf service can support all types of access/end points(soap, rest, odata, json).

    please correct me, if I am getting wrong....

     

    Regards,

    Azam.


    Azam Ali
    Wednesday, March 02, 2011 12:15 PM