You must Sign In to post a response.
  • Category: WCF

    Difference types of webservice

    what is the difference between SOAP and REST in webservice?
  • #767902
    Hi,

    SOAP(Simple Object Access Protocol) is a standard XML based protocol that communicated over HTTP. SOAP for sending messages between applications using XML.
    Applications will be hosted in different tyoe of servers , to comunicate between applications we should have some standard ways, so application can comunicate with other applications irrespective of technologies used.
    It is a method of transfering messages over the internet.
    Soap messages wil be in XML format

    REST(Representational State Transfer) is sending & receiving data between client and server
    Will be in JSON, XML format or plain text.
    It is light weight compared to SOAP


    Hope you will get an idea

    Regards,
    SonyShiva
    Never lose hope..You never know what tomorrow will bring

  • #767904
    You should know when you should use what Types of service.

    SOAP can be used when your requirement like,
    1.Asynchronous processing and invocation
    2.Formal Contracts
    3. Stateful Operations

    REST can be used when your requirement like,
    1.Limited bandwidth and resources
    2.Totally stateless operations
    3.Caching situations

    Thanks,
    Mani

  • #767905
    Hai Prashanta,
    SOAP(Simple Object Access Protocol) and ReST(Representational State Transfer) are not the types of Web Service rather than they are the set of rules(protocol) used while sending and receiving data in heterogeneous environment.
    These are the messaging types which are sent and received via services.
    The major difference between the two's are:
    1. SOAP is XML based where the data must be converted to XML while sending or receiving as it support only XML type of data. So when a .Net Service is sending the data using SOAP to another application, the data must be converted to XML and then send over the network. As the XML type can be understand by any other technology so it is good to use this type when sending the data over the network. Once the data reached to other end, it has to be again converted to the type which the other language understand from XML. Like if the other application is in Java then the XML will be converted to Java object and then the Java Application can use it.
    2. ReST is the style where the data is sent/received using JSON representation which is the text format and all the browsers can understand it without converting to other type.
    That is the reason, ReST is faster than SOAP.
    3. Apart from this, there are few advantages and disadvantages for each of these types. SOAP can be implemented with security while ReST is not.
    4. Using SOAP, the state can be defined for each requests while ReST is total stateless. Each request is new in case of ReST.
    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com


  • Sign In to post your comments