My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Showing posts with label soap. Show all posts
Showing posts with label soap. Show all posts

Thursday, May 10, 2018

Nine Planetary Differences between SOAP and REST APIs

Here is what I technically feel the major difference between  SOAP and REST. To begin with, SOAP stands for Simple Object Access Protocol. REST stands for REpresentational State Transfer.

Like 9 planets of our Solar system, I list down following 9 major differences that will completely settle down the discussion. So here is what I call, The Nine Planetary Differences Between SOAP and REST:

1) The first of all is that SOAP is a protocol while REST is an architectural style. So, this is a monumental difference in itself.

2) Next is to remember that SOAP can not use REST as it is a protocol. On the other hand, the REST architecture can use SOAP web services because it is a concept and hence it can use any protocol like HTTP, SOAP. Generally, it's HTTP.

3) Other important difference is  that SOAP permits XML data format only while REST permits different data format such as Text, HTML, JSON, XML etc.

4) Its important to note that SOAP uses services interfaces to expose the business logic. REST, on opposite, uses the URI to expose business logic.

5) In Java, JAX-WS is the java API for SOAP web services. JAX-RS is the java API for RESTful web services.

6) Next difference is related to the standards followed by each. SOAP defines standards to be strictly followed but the REST architecture does not define too much standards.

7) SOAP requires more bandwidth and resources. REST requires less bandwidth and resource than SOAP. Hence, RESTful APIs shall be bit faster. But your choice of what should be chosen in your application depends more on your architectural needs.

8) Any discussion shall be incomplete without talking about the security. So, let's remember that SOAP defines its own security. RESTful web services inherits security measures from the underlying transport mechanism.

9) Last, but not the least, SOAP is less preferred than REST. RESTful APIs are becoming more popular. However, there is no near future where one can totally surpass the other. Both are useful depending upon the needs of the software web application or services you are building.

Cheers!

*PS: don't crib that solar system now has only eight planets. For such cribbing souls, consider the ninth difference above as striked off. After all, it's just a consequence of the eight differences above. Ahem!

Wednesday, November 23, 2016

Where/How to create web.xml : Eclipse project - (Example using Jersey in Java)


Tip: Dynamic Web Project - - > RightClick - - > Java EE Tools - - > Generate Deployment Descriptor Stub. This would create Web.xml

Starting all over again from the question:
If you are doing Java programming to create some Service using Jersey or any other framework, you will many times land into situation where you need Web.xml to be created. I had once wondered where this file would be present. Or, better say, how should i create the Web.xml file.

Note that the web.xml file should be listed right below the last line in your screenshot and resides in WebContent/WEB-INF. 


If it is missing you might have missed to check the "Generate web.xml deployment descriptor" option on the third page of the Dynamic web project wizard.


Tip: Dynamic Web Project - - > RightClick - - > Java EE Tools - - > Generate Deployment Descriptor Stub. This would create Web.xml


A sample content of Web.xml can be as follows:



<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns="http://java.sun.com/xml/ns/javaee"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
   id="WebApp_ID" version="3.0">
   <display-name>User Management</display-name>
   <servlet>
      <servlet-name>Jersey RESTful Application</servlet-name>
      <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
         <init-param>
            <param-name>jersey.config.server.provider.packages</param-name>
            <param-value>com.tutorialspoint</param-value>
         </init-param>
      </servlet>
   <servlet-mapping>
   <servlet-name>Jersey RESTful Application</servlet-name>
      <url-pattern>/rest/*</url-pattern>
   </servlet-mapping>
</web-app>


Take Care.
- Mohd Anwar Jamal Faiz

Friday, November 11, 2016

Install and Launch Postman API Testing App in Chrome

The Postman is a post-apocalyptic science fiction novel by David Brin. Oh! come on! I am talking about Postman - The tool for Web API Testing. Postman is a Google Chrome app for interacting with HTTP APIs. It presents you with a friendly GUI for constructing requests and reading responses.

This post is related to the installation steps and way to launch the app in your browser.



1. How to Install Postman API Testing Tool. Where to get it:

Steps:
Search Google "Postman Tool". You will get the link. Or dircetly go to Chrome store at https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en

On the RHS there is Install button. You can click that. And, it will add 'Postman' App in your browser. Once done, the button will become Green saying 'Launch App'

See below:





2. Verify if the Postman App is installed on Chrome

Steps:
Launch the extension Manager in chrome
Shortcut URL: chrome://extensions/
You can check that Postman is there.

See below:





3. How to launch Postman App in Chrome

Steps:
Launch the App launcher. You can separately install another app which acts as launcher to App
But here is a short way too. Which i personally prefer:
Go to Chrome App:
URL: chrome://apps/

See below:



Click Postman to launch it.
The App will open up.

See below:



Now enjoy ;)