Webservices have been used with internet for various kind of purposes and with different technologies. SOAP and REST are two types of webservices that can be used for many web development tasks. The purpose of this thesis is to present what kind of differencies exists between SOAP and REST in areas of their operation. Some main differencies include: the architectural model, protocol messages sent between the client and server process and how error messages are used in the particular framework. Because of the differencies in the operation of SOAP and REST, also the areas where they are most suitable for use differ. SOAP 1.2 recommendation is used in this publication as the framework for discussing the messages and operations used with SOAP. REST on the other hand is not a protocol, but a development model that emphasizes the use of REST resources that are accessed by the client process. REST uses HTTP protocol messages to perform operations on these REST resources.
The publication also includes a weather data related webservice development part. The webservice is developed with both SOAP and REST principles. Java language is chosen as the programming language for the SOAP development part. Security issues related to SOAP and REST are included in the discussion along with some standards that can help to develop more secure webservices.
In web application development there are also other technologies used, which in some cases can replace the development task of a webservice. Node.js is a popular JavaScipt library offering good performance and it can in some areas compete with SOAP and REST. The end chapters cover benefits of the two chosen web service types along with issues that are common to both types of webservices. IoT-technology is an area where REST has gained popularity whereas SOAP has more its place in bigger webservice tasks that require a well defined communications model in the operation of the webservice. Both SOAP and REST can be used for various purposes, but the trend in modern webservices has been towards an increasing number of REST API's - compared to SOAP - to be used for webservice development.
Verkkopalveluita on käytetty internetin yhdeydessä eri muodoissa ja käyttötarkoituksissa. Tässä työssä käsitellään kahta tekniikkaa - SOAP ja REST - verkkopalveluiden tekemiseen. Työssä esitellään näiden toteutustekniikoiden eroja useammalla eri tasolla. Luvuissa käydään läpi eroja, joita tekniikoiden välillä on mm. arkkitehtuurisen mallin osalta, protokollaviestien ja virhetilanteiden käsittelyn kohdalla. SOAP 1.2 on IETF:n julkaisema suositus, joka on valittu viitekehykseksi SOAP protokollan analyysiin. REST ei ole protokolla, vaan ennemminkin toteutusteknologia, joka käyttää verkkoselaimissa toteutettua HTTP-protokollaa eri REST resurssien päivittämiseen ja hallintaan.
Työ sisältää myös sääpalveludataa käyttävän verkkopalvelun toteuttamisen molemmilla valituilla tekniikoilla. Koska internetin yhteydessä eri rajapintojen käyttö on monipuolistunut, on julkaisun luvuissa myös vertailua mahdollisiin kilpaileviin teknologioihin. Node.js JavaScript kirjasto on esimerkkinä teknologiasta, jolla voidaan toteuttaa verkkopalveluiden kaltaisia sovelluksia.
SOAP protokollan ja REST mallin tietoturvaominaisuuksia käsitellään omissa luvuissaan. Osa verkkopalveluiden tietoturvaan vaikuttavista uhkista ovat yleisiä internetin tietoturvauhkia. SOAP protokollan toiminnan mukaisia tietoturvauhkia arvioidaan kuten myös SOAP:n yhteyteen kehitettyjä tietoturvaparannuksia. REST:n tietoturvauhkat liittyvät pääasiallisesti HTTP-protokollan viestien mahdolliseen väärinkäyttöön ja puutteelliseen autentikaatioon.
Työn loppuosassa käsitellään alueita, joilla REST tai SOAP ovat saavuttaneet merkittävän aseman sovelluskehittäjien keskuudessa. REST:n kohdalla IoT (Internet of Things) on yksi merkittävistä alueista, jolla REST ohjelmointirajapintojen käyttö lisääntyy nopeasti. Toinen merkittävä alue on sosiaalisen median REST rajapinnat, joista esimerkkinä mainitaan Facebook:in ja Google:n käyttöön ottamia rajapintoja. SOAP:n ja REST:n eroavaisuuksia ja vahvuusalueita on käsitelty työn lopussa, kuten myös ominaisuuksia, jotka ovat tekniikoille yhteisiä.