Posts

Showing posts with the label Web Serviecs

Understanding SOAP and REST Basics

The main differences between SOAP and REST SOAP and REST both allow you to create your own API. API stands for Application Programming Interface. It makes it possible to transfer data from an application to other applications. An API receives requests and sends back responses through internet protocols such as HTTP, SMTP, and others. Many popular websites provide public APIs for their users, for example, Google Maps has a  public REST API  that lets you customize Google Maps with your own content. There are also many APIs that have been created by companies for internal use. SOAP and REST are two API styles that approach the question of data transmission from a different point of view. SOAP is a standardized protocol that sends messages using other protocols such as HTTP and SMTP. The  SOAP specifications  are official web standards, maintained and developed by the World Wide Web Consortium (W3C). As opposed to SOAP, REST is not a protocol but an architectural ...

HTTP Methods

GET       1. GET is used to request data from a specified resource.       2. GET requests can be cached       3. GET requests remain in the browser history       4. GET requests can be bookmarked       5. GET requests should never be used when dealing with sensitive data       6. GET requests have length restrictions       7. GET requests is only used to request data (not modify) POST        1. POST is used to send data to a server to create/update a resource.         2. POST requests are never cached         3. POST requests do not remain in the browser history         4. POST requests cannot be bookmarked         5. POST requests have no restrictions on data length PUT         1.  PUT is used to send data to a server to create/update a reso...

XML Soap

SOAP stands for  S imple  O bject  A ccess  P rotocol SOAP is an application communication protocol SOAP is a format for sending and receiving messages SOAP is platform independent SOAP is based on XML SOAP is a W3C recommendation SOAP Building Blocks A SOAP message is an ordinary XML document containing the following elements: An Envelope element that identifies the XML document as a SOAP message A Header element that contains header information A Body element that contains call and response information A Fault element containing errors and status information Syntax Rules Here are some important syntax rules: A SOAP message MUST be encoded using XML A SOAP message MUST use the SOAP Envelope namespace A SOAP message MUST use the SOAP Encoding namespace A SOAP message must NOT contain a DTD reference A SOAP message must NOT contain XML Processing Instructions Skeleton SOAP Message < ?xml  version ="1.0" ? > < soap:Env...

What is the difference between XSD and WSDL

XSD defines a schema which is a definition of how an XML document can be structured. You can use it to check that a given XML document is valid and follows the rules you've laid out in the schema. WSDL is an XML document that describes a web service. It shows which operations are available and how data should be structured to send to those operations. WSDL documents have an associated XSD that show what is valid to put in a WSDL document.

WSDL

WSDL stands for Web Services Description Language WSDL is used to describe web services WSDL is written in XML < definitions > < types >   data type definitions........ < /types > < message >   definition of the data being communicated.... < /message > < portType >   set of operations...... < /portType > < binding >   protocol and data format specification.... < /binding > < /definitions > WSDL Example This is a simplified fraction of a WSDL document: < message  name ="getTermRequest" >    < part  name ="term"  type ="xs:string" / > < /message > < message  name ="getTermResponse" >    < part  name ="value"  type ="xs:string" / > < /message > < portType  name ="glossaryTerms" >    < operation  name ="getTerm" >      < input  message ="getTermReque...