{"id":2021,"date":"2017-03-18T20:31:59","date_gmt":"2017-03-18T20:31:59","guid":{"rendered":"http:\/\/blog.paranoidprofessor.com\/?p=2021"},"modified":"2017-04-28T18:47:54","modified_gmt":"2017-04-28T18:47:54","slug":"restful-services-in-java","status":"publish","type":"post","link":"https:\/\/blog.paranoidprofessor.com\/index.php\/2017\/03\/18\/restful-services-in-java\/","title":{"rendered":"Restful services in Java"},"content":{"rendered":"<p>Over the years there have been different methods of for communicating between heterogeneous systems. \u00a0Each of these methods have to deal binary messaging. \u00a0Some of the different protocols that have been used are as follows.<\/p>\n<ul>\n<li>Remote procedure calls (RPC)<\/li>\n<li>Distributed Component Object Model (DCOM)<\/li>\n<li>Common Object Request Broker Architecture (CORBA)<\/li>\n<li>Simple object access protocol (SOAP)<\/li>\n<li>Windows Communication Foundation (WCF)<\/li>\n<\/ul>\n<p>These protocols are of varying complexity and some of the descriptions that have been used to describe them are complexity, rigid, complex, heavyweight\u00a0and complicated.<\/p>\n<p>Each time the technology wheel turns a new protocol is created with the goal to create something that is powerful and lightweight.<\/p>\n<p>Restful web services is an attempt at providing a lightweight but scaleable communications protocol that can be called from any platform. \u00a0It uses a simple URL instead of creating and passing complicated XML structures<\/p>\n<p>This should\u00a0be a very simple way of submitting information or retrieving data. \u00a0A colleague once recommended that I create my own web services for processing my weekly expenses while I was on the road.<\/p>\n<p>At that time, it seemed like overkill to create such a solution in order to process anywhere from 5 to 10 expense items per week.<\/p>\n<ul>\n<li>Setup a computer with web server<\/li>\n<li>Program a web service to accept the price data<\/li>\n<li>Create some GUI process for entering the data<\/li>\n<\/ul>\n<p>I did have the interest\u00a0in the project but ended up focusing my efforts on dabbling in the hardware arena by <a href=\"http:\/\/blog.paranoidprofessor.com\/index.php\/2016\/09\/24\/just-making-it-a-4x4x4-led-cube\/\">creating a LED cube<\/a>. \u00a0Eventually, my interest has come back to web services.<\/p>\n<p>Of course as what often happens is that you cannot start something without doing something else first &#8211; in this case all the prerequisite software.<\/p>\n<p>My laptop is a bit of a mess so I choose to create a small virtual machine and do all of my work there. \u00a0This is actually a extremely interesting use of those extra cpu cycles and could become common for even basic computer users in the future. \u00a0I hope to go into that at a later point.<\/p>\n<p>For working with restful web services I needed to install the following.<\/p>\n<ul>\n<li><a href=\"http:\/\/blog.paranoidprofessor.com\/index.php\/2017\/02\/04\/installing-java-8-on-linux\/\">Java 8<\/a><\/li>\n<li><a href=\"http:\/\/blog.paranoidprofessor.com\/index.php\/2017\/02\/12\/installing-eclipse-on-linux\/\">Eclipse<\/a><\/li>\n<li><a href=\"http:\/\/blog.paranoidprofessor.com\/index.php\/2017\/02\/07\/installing-tomcat-on-linux\/\">Tomcat<\/a><\/li>\n<\/ul>\n<p>Once everything was setup, I did get a chance to create both a a server and a client. \u00a0I will not actually setup my own restful server setup \u00a0for remotely doing my expenses but I may end up using the technology for something else in the future.<\/p>\n<p>The <a href=\"http:\/\/blog.paranoidprofessor.com\/index.php\/2017\/03\/23\/restful-services-in-java-simple-server-example\/\" target=\"_blank\">next few blog<\/a> entries create a few simple examples to put the technology through its paces.<\/p>\n<h2>Difference between Soap and Rest protocols.<\/h2>\n<p><a href=\"http:\/\/blog.smartbear.com\/apis\/understanding-soap-and-rest-basics\/\" target=\"_blank\">http:\/\/blog.smartbear.com\/apis\/understanding-soap-and-rest-basics\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the years there have been different methods of for communicating between heterogeneous systems. \u00a0Each of these methods have to deal binary messaging. \u00a0Some of the different protocols that have been used are as follows. Remote procedure calls (RPC) Distributed &hellip; <a href=\"https:\/\/blog.paranoidprofessor.com\/index.php\/2017\/03\/18\/restful-services-in-java\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20,3],"tags":[12,36,88],"_links":{"self":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/2021"}],"collection":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/comments?post=2021"}],"version-history":[{"count":7,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/2021\/revisions"}],"predecessor-version":[{"id":2284,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/2021\/revisions\/2284"}],"wp:attachment":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/media?parent=2021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/categories?post=2021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/tags?post=2021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}