SlideShare a Scribd company logo
1 of 22
REST, JSON, SOAP and XML Processing ,[object Object]
[object Object],[object Object]
Every request to a  REST web service happens in complete isolation
Resources are manipulated by exchanging representations of the resources
REST web services typically allow for the resource representation to be in a format selected by the client at the time of the request
Using : ,[object Object],[object Object]
[object Object],[object Object]
To retrieve a resource, use  GET .
To change the state of a resource or to update it, use  PUT .
To remove or delete a resource, use  DELETE . ,[object Object]
Client application : Uses the  Cache-Control  response header to determine whether to cache the resource (make a local copy of it) or not. A 304 HTTP response code means the client can safely use a cached ,[object Object],[object Object]
Hide the server-side scripting technology file extensions, Substitute spaces with hyphens or underscores, Avoid query strings as much as you can, Instead of using the 404 code always provide a default page or resource as a response
[object Object]
[object Object],[object Object]
Such web services  can be JAX-WS web services or REST web services
JSON text  can be dynamically executed as JavaScript
JSON  is not as verbose as XML while retaining some of the flexibility and extensibility
[object Object]
[object Object]
[object Object],[object Object],[object Object]
A caching infrastructure can be leveraged for performance
The service producer and service consumer have a mutual understanding of the context and content being passed along

More Related Content

What's hot (20)

Introduction to RESTful Webservices in JAVA
Introduction to RESTful Webservices  in JAVA Introduction to RESTful Webservices  in JAVA
Introduction to RESTful Webservices in JAVA
 
RESTful Web Services with JAX-RS
RESTful Web Services with JAX-RSRESTful Web Services with JAX-RS
RESTful Web Services with JAX-RS
 
RestFull Webservices with JAX-RS
RestFull Webservices with JAX-RSRestFull Webservices with JAX-RS
RestFull Webservices with JAX-RS
 
Thinking restfully
Thinking restfullyThinking restfully
Thinking restfully
 
ملخص تقنية تصميم صفحات الويب - الوحدة السادسة
ملخص تقنية تصميم صفحات الويب - الوحدة السادسةملخص تقنية تصميم صفحات الويب - الوحدة السادسة
ملخص تقنية تصميم صفحات الويب - الوحدة السادسة
 
RIA and Ajax
RIA and AjaxRIA and Ajax
RIA and Ajax
 
Ado
AdoAdo
Ado
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
The Glory of Rest
The Glory of RestThe Glory of Rest
The Glory of Rest
 
AD & LDAP
AD & LDAPAD & LDAP
AD & LDAP
 
JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and OData
 
LDAP
LDAPLDAP
LDAP
 
RESTful Web Services with Jersey
RESTful Web Services with JerseyRESTful Web Services with Jersey
RESTful Web Services with Jersey
 
Web service
Web serviceWeb service
Web service
 
Bdc Screens
Bdc ScreensBdc Screens
Bdc Screens
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap Protocol
 
IR with lucene
IR with luceneIR with lucene
IR with lucene
 
Introduction to SharePoint 2013 REST API
Introduction to SharePoint 2013 REST APIIntroduction to SharePoint 2013 REST API
Introduction to SharePoint 2013 REST API
 
Ldap
LdapLdap
Ldap
 
Easy rest service using PHP reflection api
Easy rest service using PHP reflection apiEasy rest service using PHP reflection api
Easy rest service using PHP reflection api
 

Viewers also liked

Viewers also liked (9)

SCBCD 2. differenze stateless stateful
SCBCD 2. differenze stateless   statefulSCBCD 2. differenze stateless   stateful
SCBCD 2. differenze stateless stateful
 
Design Pattern 5. Singleton Pattern
Design Pattern 5. Singleton PatternDesign Pattern 5. Singleton Pattern
Design Pattern 5. Singleton Pattern
 
SCDJWS 1. xml schema
SCDJWS 1. xml schemaSCDJWS 1. xml schema
SCDJWS 1. xml schema
 
SCDJWS 2. Soap
SCDJWS 2. SoapSCDJWS 2. Soap
SCDJWS 2. Soap
 
2. wiring beans
2. wiring beans2. wiring beans
2. wiring beans
 
SPRING 1. overview
SPRING 1. overviewSPRING 1. overview
SPRING 1. overview
 
SCDJWS 3. WSDL
SCDJWS 3. WSDLSCDJWS 3. WSDL
SCDJWS 3. WSDL
 
SCDJWS 4. UDDI
SCDJWS 4. UDDISCDJWS 4. UDDI
SCDJWS 4. UDDI
 
Design Pattern 4. Factory Pattern
Design Pattern 4. Factory PatternDesign Pattern 4. Factory Pattern
Design Pattern 4. Factory Pattern
 

Similar to REST JSON SOAP XML Processing Francesco Ierna

Web services for developer
Web services for developerWeb services for developer
Web services for developerRafiq Ahmed
 
Xml web services
Xml web servicesXml web services
Xml web servicesRaghu nath
 
53 hui homework2
53 hui homework253 hui homework2
53 hui homework2huis89
 
The introduction of RESTful
The introduction of RESTful The introduction of RESTful
The introduction of RESTful Jon Chen
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni InturiSreeni I
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleEmiliano Pecis
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Mindfire Solutions
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDBBrian Ritchie
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swiftTim Burks
 
Hatkit Project - Datafiddler
Hatkit Project - DatafiddlerHatkit Project - Datafiddler
Hatkit Project - Datafiddlerholiman
 
WS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
WS-Addressing: Enabling Transport-Neutral Message Addressing and CorrelationWS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
WS-Addressing: Enabling Transport-Neutral Message Addressing and CorrelationJeffrey Hasan
 

Similar to REST JSON SOAP XML Processing Francesco Ierna (20)

Rest web service
Rest web serviceRest web service
Rest web service
 
WIT UNIT-5.pdf
WIT UNIT-5.pdfWIT UNIT-5.pdf
WIT UNIT-5.pdf
 
Web services for developer
Web services for developerWeb services for developer
Web services for developer
 
Unit 2
Unit 2Unit 2
Unit 2
 
Xml.ppt
Xml.pptXml.ppt
Xml.ppt
 
PDFArticle
PDFArticlePDFArticle
PDFArticle
 
Xml web services
Xml web servicesXml web services
Xml web services
 
53 hui homework2
53 hui homework253 hui homework2
53 hui homework2
 
The introduction of RESTful
The introduction of RESTful The introduction of RESTful
The introduction of RESTful
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
 
SCDJWS 5. JAX-WS
SCDJWS 5. JAX-WSSCDJWS 5. JAX-WS
SCDJWS 5. JAX-WS
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with Oracle
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
Ajax
AjaxAjax
Ajax
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
RIA Data and Security, 2007
RIA Data and Security, 2007RIA Data and Security, 2007
RIA Data and Security, 2007
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swift
 
Hatkit Project - Datafiddler
Hatkit Project - DatafiddlerHatkit Project - Datafiddler
Hatkit Project - Datafiddler
 
WS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
WS-Addressing: Enabling Transport-Neutral Message Addressing and CorrelationWS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
WS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

REST JSON SOAP XML Processing Francesco Ierna

  • 1.
  • 2.
  • 3. Every request to a REST web service happens in complete isolation
  • 4. Resources are manipulated by exchanging representations of the resources
  • 5. REST web services typically allow for the resource representation to be in a format selected by the client at the time of the request
  • 6.
  • 7.
  • 8. To retrieve a resource, use GET .
  • 9. To change the state of a resource or to update it, use PUT .
  • 10.
  • 11.
  • 12. Hide the server-side scripting technology file extensions, Substitute spaces with hyphens or underscores, Avoid query strings as much as you can, Instead of using the 404 code always provide a default page or resource as a response
  • 13.
  • 14.
  • 15. Such web services can be JAX-WS web services or REST web services
  • 16. JSON text can be dynamically executed as JavaScript
  • 17. JSON is not as verbose as XML while retaining some of the flexibility and extensibility
  • 18.
  • 19.
  • 20.
  • 21. A caching infrastructure can be leveraged for performance
  • 22. The service producer and service consumer have a mutual understanding of the context and content being passed along
  • 23. Bandwidth is particularly important and needs to be limited. PDAs and mobile phones
  • 24.
  • 25. The architecture must address complex nonfunctional requirements
  • 26. The architecture needs to handle asynchronous processing and invocation
  • 27.
  • 28.
  • 29. Clients are AJAX clients.
  • 30. Bandwidth usage needs to be minimized
  • 31.
  • 32. Better tooling is required
  • 33. Reuse of existing data structure definitions is desired
  • 34.
  • 35. supports the Extensible Stylesheet Language Transformations (XSLT) standard
  • 36. JAXP also provides namespace support, allowing you to work with DTDs that might otherwise have naming conflicts
  • 37.
  • 38. SAXParser  : The SAXParser interface defines several kinds of parse() methods
  • 39. SAXReaderIt is the SAXReader that carries on the conversation with the SAX event handlers you define
  • 40.
  • 41. ContentHandler  : are invoked when an XML tag is recognized
  • 42. ErrorHandler  : are invoked in response to various parsing errors
  • 43. DTDHandler  : Defines methods you will generally never be called upon to use
  • 44.
  • 45. With a pull parser, you get the next node, whatever it happens to be, at any point in the code that you ask for it
  • 46. SAX requires much less memory than DOM, because SAX does not construct an internal representation
  • 48. SAX Example public static void main(String argv[]) { // Use an instance of ourselves as the SAX event handler DefaultHandler handler = new Echo(); // Use the default (non-validating) parser SAXParserFactory factory = SAXParserFactory.newInstance(); try { // Set up output stream out = new OutputStreamWriter(System.out, "UTF8"); // Parse the input SAXParser saxParser = factory.newSAXParser(); saxParser.parse(new File(argv[0]), handler); } catch (Throwable t) { t.printStackTrace(); } }
  • 49.
  • 50. DocumentBuilder.newDocument() : method to create an empty Document that implements the org.w3c.dom.Document interface
  • 51.
  • 52. allows extreme flexibility in parsing, navigating, and updating the contents of a document
  • 53. high memory requirements and the need for more powerful processing capabilities
  • 55. DOM Example public static void buildDom() { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.newDocument(); Element root = (Element) document.createElement("rootElement"); document.appendChild(root); root.appendChild(document.createTextNode("Some")); root.appendChild(document.createTextNode(" ")); root.appendChild( document.createTextNode("text") ); } catch (ParserConfigurationException pce) { // Parser with specified options can't be built pce.printStackTrace();}}
  • 56.
  • 57.
  • 58.
  • 59. javax.xml.transform.sax  : Defines the SAXSource and SAXResult classes, which let you use a SAX event generator as input to a transformation, or deliver SAX events as output to a SAX event processor
  • 60.
  • 62. XSLT Example Example : j avax.xml.transform.dom Document document; try { File f = new File(argv[0]); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.parse(f); // Use a Transformer for output TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(); DOMSource source = new DOMSource(document); StreamResult result = new StreamResult(System.out); transformer.transform(source, result); }
  • 63.
  • 64.
  • 65. the cursor API is more efficient.
  • 66. XML processing pipelines, use the iterator API
  • 67. modify the event stream, use the iterator API
  • 68.
  • 69. is that StAX is difficult to use if you return XMLdocuments that follow complex schema
  • 70.