soap vs rest web services in java

SOAP vs REST: Direct comparison of SOAP and REST are not possible because the SOAP is a protocol and REST an architectural style. It is not correct to call REST any HTTP API that isn’t SOAP. Most important difference between SOAP and REST is the way of coupling between client and server. A SOAP client … Read more

Java restful web services tutorial

RESTful web services: REST stands for REpresentational State Transfer. Unlike SOAP it is a web standards based architecture and not protocol. It uses HTTP protocol for data communication. REST provides the facility to represent a resource in various formats like text, JSON and XML. Note: JSON is the most popular format. Web services represents the … Read more

Java soap web services

SOAP web services: SOAP stands for Simple Object Access Protocol. It is used to transfer the data. It is a XML-based messaging-layer protocol. SOAP can be used in combination with a variety of transport protocols like HTTP, SMTP, and JMS etc. Note: SOAP is part of the set of standards specified by the W3C. SOAP … Read more

Javascript confirmation dialog box

The Javascript confirmation dialog box is used to display a message to the user to confirm something. Note: Confirmation dialog box gives two buttons “OK” and “Cancel”. The confirm() method returns true if the OK button is clicked else returns false. Example: <!DOCTYPE html> <html> <body> <script> function getConfirmation(){ var retVal = confirm(“Do you want … Read more

Javascript Alert Dialog Box

The Javascript alert dialog box is used to display a warning message to the users. Note: Alert dialog box gives one button “OK”. Example: <!DOCTYPE html> <html> <body> <script> function giveWarning() { alert(“Warning message.”); document.write (“Warning message.”); } </script> <p>Click Submit button and see result.</p> <form> <input type=”button” onclick=”giveWarning()” value=”Submit” /> </form> </body> </html>

Javascript Math Object

A JavaScript Math object provides no. of properties and methods for performing mathematical operations. Math is not a constructor and all the properties and methods of Math are static. Example: <script> var num = Math.random(); var squarRoot = Math.sqrt(num ) ; document.write(“Random Number: ” + num + “</br>”); document.write(“Square root: ” + squarRoot ); </script> … Read more

Javascript String Object

A JavaScript String object represents a sequence of characters. How to create a Javascript string object: 1. By using string literals. 2. By using String() constructor. By using string literals: When we create a string literal browser automatically converts it to a String object. Syntax: var string1 = “value”; Example: <!DOCTYPE html> <html> <body> <script> … Read more

Javascript Boolean Object

A JavaScript Boolean object can represent two values “true” or “false”. How to create a Javascript boolean object: 1. By using boolean literals. 2. By using Boolean() constructor. Syntax: Var b1 = true; var b2 = new Boolean(value); Example: <!DOCTYPE html> <html> <body> <script> var boolean1=new Boolean(true); var boolean2=new Boolean(false); var boolean3=true; document.write(“Boolean1: “+boolean1+ “</br>”); … Read more

Javascript Number Object

The JavaScript Number object represents numerical data which can be integers or floating-point numbers. How to create a Javascript number object: 1. By using number literals. 2. By using Number() constructor. By using number literals: When we create a number literal browser automatically converts it to a Number object. Syntax: var num1 = value; Example: … Read more