SlideShare a Scribd company logo
1 of 19
Developing Web Services Using JAX-RPC


Pre-assessment Questions
         1.   ___________ is a collection of document-oriented APIs that enable you
              to process and transform XML documents using Java-based
              applications.
              a.   JAXP
              b.   JAXM
              c.   JAXR
              d.   JAX-RPC




 ©NIIT                   XML and Web Services              Lesson 2A / Slide 1 of 19
Developing Web Services Using JAX-RPC


Pre-assessment Questions (Contd.)
         1.   Which of the following API is used to transform the XML document into
              other formats?
              a.   SAX API
              b.   DOM API
              c.   XSLT API
              d.   JAXP API




 ©NIIT                   XML and Web Services              Lesson 2A / Slide 2 of 19
Developing Web Services Using JAX-RPC


Pre-assessment Questions (Contd.)
         1.   Consider the following two statements:
                   Statement A: SAX parses XML document faster then DOM
                   Statement B: SAX builds an object tree of the XML document
                   during parsing
              Identify the correct option:
              a.   Both Statement A and B are false
              b.   Both Statement A and B are true
              c.   Statement A is true while B is false
              d.   Statement A is false while B is true




 ©NIIT                   XML and Web Services             Lesson 2A / Slide 3 of 19
Developing Web Services Using JAX-RPC


Pre-assessment Questions (Contd.)
         1.   DOM parsers consume more memory compared to SAX because:
              a. DOM serially parses the XML document from beginning to end of
                 the document .
              b. DOM stores the entire document as an object tree representation
                 in the memory.
              c. DOM transforms the XML document after parsing it.
              d. DOM creates a single object in memory to represent the XML
                 document.




 ©NIIT                  XML and Web Services              Lesson 2A / Slide 4 of 19
Developing Web Services Using JAX-RPC


Pre-assessment Questions (Contd.)
         1.   Select the package that contains the interface whose parse() method is
              used to parse XML documents using DOM.
              a. org.xml.sax.helpers
              b. javax.xml.parsers
              c. org.w3c.dom
              d. javax.xml.transform




 ©NIIT                   XML and Web Services              Lesson 2A / Slide 5 of 19
Developing Web Services Using JAX-RPC


Solutions to Pre-assessment
Questions
         •   a. JAXP
         •   c. XSLT API
         •   c. Statement A is true while B is false
         •   b. DOM stores the entire document as an object tree representation in
             the memory.
         •   b. javax.xml.parsers




 ©NIIT                  XML and Web Services              Lesson 2A / Slide 6 of 19
Developing Web Services Using JAX-RPC


Objectives
    In this lesson, you will learn about:


    •    Java API for XML-based RPC (JAX-RPC)
    •    Steps to create Web services using JAX-RPC
    •    Steps to create Web clients using JAX-RPC




 ©NIIT                    XML and Web Services        Lesson 2A / Slide 7 of 19
Developing Web Services Using JAX-RPC


Java API for XML-Based RPC (JAX-
RPC)
    •    The JAX-RPC API is used to develop portable and interoperable Web services
         and Web service clients.
    •    The JAX-RPC hides the structure, encoding rules and conventions of the SOAP
         protocol to transfer remote procedure calls between a Web service client and a
         Web service using SOAP messages .




 ©NIIT                     XML and Web Services               Lesson 2A / Slide 8 of 19
Developing Web Services Using JAX-RPC


Java API for XML-Based RPC (JAX-
RPC) (Contd.)
    •    JAX-RPC Working Mechanism


          •   The JAX-RPC Web service provides methods that can be accessed by the
              remote clients.
          •   The Web service client invokes the method on the Web service.
          •   The method call is passed to the stub, which is a client side
              implementation of Web service object.
          •   The stub passes the method call to the JAX-RPC runtime system on the
              client side.
          •   The JAX-RPC runtime system converts the method call into SOAP message
              and transmits the SOAP message over the network.
          •   The JAX-RPC runtime system on the server side receives the data and
              invokes the method provided on the tie object.

 ©NIIT                     XML and Web Services            Lesson 2A / Slide 9 of 19
Developing Web Services Using JAX-RPC


Java API for XML-Based RPC (JAX-
RPC) (Contd.)
    •    JAX-RPC Working Mechanism(Contd.)


          •   The tie object converts the SOAP message into method call and invokes
              the method on the Web service.
          •   The Web service processes the client request and returns the result to the
              tie object.
          •   The tie object creates the response message and passes the response
              message to the JAX-RPC runtime system.
          •   The JAX-RPC runtime system converts the response message into SOAP
              message and transmits the message to the Web service client.
          •   The JAX-RPC runtime system on the client side receives the server
              response and passes it to the client.



 ©NIIT                      XML and Web Services              Lesson 2A / Slide 10 of 19
Developing Web Services Using JAX-RPC


Java API for XML-Based RPC (JAX-
RPC) (Contd.)
         •   The following figure shows the communication between the JAX-RPC client
             and a Web Service:




 ©NIIT                    XML and Web Services             Lesson 2A / Slide 11 of 19
Developing Web Services Using JAX-RPC


Java API for XML-Based RPC (JAX-
  RPC) (Contd.)
    •    The packages in the JAX-RPC API are:

         •   javax.xml.rpc
         •   javax.xml.rpc.encoding
         •   javax.xml.rpc.handler
         •   javax.xml.rpc.handler.soap
         •   javax.xml.rpc.holders
         •   javax.xml.rpc.server
         •   javax.xml.rpc.soap




 ©NIIT                  XML and Web Services    Lesson 2A / Slide 12 of 19
Developing Web Services Using JAX-RPC


Java API for XML-Based RPC (JAX-
RPC) (Contd.)

    •    The JAX-RPC does not support all the data types and classes provided by
         J2SE.
    •    Only those Java data types and classes that map with XML/WSDL definition
         can be used while creating Web services and Web service clients using JAX-
         RPC API.




 ©NIIT                  XML and Web Services              Lesson 2A / Slide 13 of 19
Developing Web Services Using JAX-RPC


Java API for XML-Based RPC (JAX-
RPC) (Contd.)

         •   The Java data types supported by JAX-RPC are:

              •   byte
              •   short
              •   int
              •   long
              •   float
              •   double
              •   boolean


 ©NIIT                XML and Web Services            Lesson 2A / Slide 14 of 19
Developing Web Services Using JAX-RPC


Java API for XML-Based RPC (JAX-
RPC) (Contd.)
         •   The Java classes supported by JAX-RPC are:

              •    java.lang.Byte
              •    java.lang.Short
              •    java.lang.Integer
              •    java.lang.Long
              •    java.lang.Float
              •    java.lang.Double
              •    java.lang.Boolean
              •    java.lang.String
              •    java.util.Date
              •    java.util.Calendar

 ©NIIT                XML and Web Services            Lesson 2A / Slide 15 of 19
Developing Web Services Using JAX-RPC


Creating a JAX-RPC Web Service
    •    Creating a JAX-RPC Web service involves:


          •    Creating the Web service endpoint interface
          •    Creating the Web service implementation class
          •    Creating the configuration file
          •    Generating the WSDL and mapping file of the Web service
          •    Packaging and Deploying the Web service




 ©NIIT                  XML and Web Services            Lesson 2A / Slide 16 of 19
Developing Web Services Using JAX-RPC


Creating a JAX-RPC Web Service
Client
    •    Creating a stand alone static stub Web service client involves:


          •    Coding the Web service client
          •    Creating a configuration file
          •    Generating the necessary runtime class files
          •    Compiling the client
          •    Executing the client




 ©NIIT                   XML and Web Services               Lesson 2A / Slide 17 of 19
Developing Web Services Using JAX-RPC


Creating a JAX-RPC Web Service
Client (Contd.)
    •    Creating a J2EE Web client involves:


          •    Coding the Web client
          •    Creating a configuration file
          •    Generating the necessary runtime class files
          •    Compiling the client
          •    Packaging, Configuring, and Deploying the Web client
          •    Executing the client




 ©NIIT                  XML and Web Services             Lesson 2A / Slide 18 of 19
Developing Web Services Using JAX-RPC


Summary
    In this lesson, you learned that:
         • Architecture of JAX-RPC, which explains how a Web service client invoke
               the methods of a Web service .
         • The classes and data types supported by JAX-RPC. You cannot use all
               the classes and data types defined in J2SDK specification.
         • Creating portable and interoperable Web services and Web service
               client using JAX-RPC. Using wscompile tool to compile a Web service
               and generate a WSDL file.
         • Steps to create static stub client and Web client that invokes the
               methods of Web service.




 ©NIIT                  XML and Web Services            Lesson 2A / Slide 19 of 19

More Related Content

What's hot

Why Memcached?
Why Memcached?Why Memcached?
Why Memcached?Gear6
 
HTML5: A complete overview
HTML5: A complete overviewHTML5: A complete overview
HTML5: A complete overviewKristof Degrave
 
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Joonas Lehtinen
 
What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)Paul Withers
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Chris Richardson
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010Mark Atwood
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to JavaAathikaJava
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to JavaDeeptiJava
 
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...Paul Withers
 
What is WebDAV - uploaded by Murali Krishna Nookella
What is WebDAV - uploaded by Murali Krishna NookellaWhat is WebDAV - uploaded by Murali Krishna Nookella
What is WebDAV - uploaded by Murali Krishna Nookellamuralikrishnanookella
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)Saltlux zinyus
 
Lib X Bailey Back Access2008
Lib X Bailey Back Access2008Lib X Bailey Back Access2008
Lib X Bailey Back Access2008guestd9aa5
 

What's hot (17)

Why Memcached?
Why Memcached?Why Memcached?
Why Memcached?
 
HTML5: A complete overview
HTML5: A complete overviewHTML5: A complete overview
HTML5: A complete overview
 
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
 
What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010
 
OUGF OSGi/Flex
OUGF OSGi/FlexOUGF OSGi/Flex
OUGF OSGi/Flex
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
 
Java™ in Web 2.0
Java™ in Web 2.0Java™ in Web 2.0
Java™ in Web 2.0
 
What is WebDAV - uploaded by Murali Krishna Nookella
What is WebDAV - uploaded by Murali Krishna NookellaWhat is WebDAV - uploaded by Murali Krishna Nookella
What is WebDAV - uploaded by Murali Krishna Nookella
 
On being RESTful
On being RESTfulOn being RESTful
On being RESTful
 
Samba management Console
Samba management ConsoleSamba management Console
Samba management Console
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
 
Lib X Bailey Back Access2008
Lib X Bailey Back Access2008Lib X Bailey Back Access2008
Lib X Bailey Back Access2008
 
Net framework
Net frameworkNet framework
Net framework
 

Similar to Deawsj 7 ppt-2_a

Java Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesJava Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesIMC Institute
 
Deawsj 7 ppt-2_c
Deawsj 7 ppt-2_cDeawsj 7 ppt-2_c
Deawsj 7 ppt-2_cNiit Care
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RSFahad Golra
 
Deawsj 7 ppt-1_a
Deawsj 7 ppt-1_aDeawsj 7 ppt-1_a
Deawsj 7 ppt-1_aNiit Care
 
Android chapter18 c-internet-web-services
Android chapter18 c-internet-web-servicesAndroid chapter18 c-internet-web-services
Android chapter18 c-internet-web-servicesAravindharamanan S
 
Utilizing JSF Front Ends with Microservices
Utilizing JSF Front Ends with MicroservicesUtilizing JSF Front Ends with Microservices
Utilizing JSF Front Ends with MicroservicesJosh Juneau
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to strutsAnup72
 
Welcome to Web Services
Welcome to Web ServicesWelcome to Web Services
Welcome to Web ServicesShivinder Kaur
 
Java in web 2 0 presentation
Java in web 2 0 presentationJava in web 2 0 presentation
Java in web 2 0 presentationPRAVEEN KUMAR
 
Java in web 2 0 presentation
Java in web 2 0 presentationJava in web 2 0 presentation
Java in web 2 0 presentationVarun Jain
 
6 weeks 6 months live project summer industrial training in cmc limited 2012
6 weeks  6 months live project summer industrial training in cmc limited  20126 weeks  6 months live project summer industrial training in cmc limited  2012
6 weeks 6 months live project summer industrial training in cmc limited 2012CMC Limited
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...MskDotNet Community
 

Similar to Deawsj 7 ppt-2_a (20)

Java Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesJava Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web Services
 
Deawsj 7 ppt-2_c
Deawsj 7 ppt-2_cDeawsj 7 ppt-2_c
Deawsj 7 ppt-2_c
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RS
 
Deawsj 7 ppt-1_a
Deawsj 7 ppt-1_aDeawsj 7 ppt-1_a
Deawsj 7 ppt-1_a
 
Web-Socket
Web-SocketWeb-Socket
Web-Socket
 
Flex Rails Pres
Flex Rails PresFlex Rails Pres
Flex Rails Pres
 
Building Web Services
Building Web ServicesBuilding Web Services
Building Web Services
 
Android chapter18 c-internet-web-services
Android chapter18 c-internet-web-servicesAndroid chapter18 c-internet-web-services
Android chapter18 c-internet-web-services
 
Utilizing JSF Front Ends with Microservices
Utilizing JSF Front Ends with MicroservicesUtilizing JSF Front Ends with Microservices
Utilizing JSF Front Ends with Microservices
 
Ajax
AjaxAjax
Ajax
 
Ajax Zf
Ajax ZfAjax Zf
Ajax Zf
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to struts
 
Welcome to Web Services
Welcome to Web ServicesWelcome to Web Services
Welcome to Web Services
 
Asp.net
Asp.netAsp.net
Asp.net
 
Java in web 2 0 presentation
Java in web 2 0 presentationJava in web 2 0 presentation
Java in web 2 0 presentation
 
Java in web 2 0 presentation
Java in web 2 0 presentationJava in web 2 0 presentation
Java in web 2 0 presentation
 
6 weeks 6 months live project summer industrial training in cmc limited 2012
6 weeks  6 months live project summer industrial training in cmc limited  20126 weeks  6 months live project summer industrial training in cmc limited  2012
6 weeks 6 months live project summer industrial training in cmc limited 2012
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
 
Scala and Lift
Scala and LiftScala and Lift
Scala and Lift
 
Web services soap rest training
Web services soap rest trainingWeb services soap rest training
Web services soap rest training
 

More from Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Deawsj 7 ppt-2_a

  • 1. Developing Web Services Using JAX-RPC Pre-assessment Questions 1. ___________ is a collection of document-oriented APIs that enable you to process and transform XML documents using Java-based applications. a. JAXP b. JAXM c. JAXR d. JAX-RPC ©NIIT XML and Web Services Lesson 2A / Slide 1 of 19
  • 2. Developing Web Services Using JAX-RPC Pre-assessment Questions (Contd.) 1. Which of the following API is used to transform the XML document into other formats? a. SAX API b. DOM API c. XSLT API d. JAXP API ©NIIT XML and Web Services Lesson 2A / Slide 2 of 19
  • 3. Developing Web Services Using JAX-RPC Pre-assessment Questions (Contd.) 1. Consider the following two statements: Statement A: SAX parses XML document faster then DOM Statement B: SAX builds an object tree of the XML document during parsing Identify the correct option: a. Both Statement A and B are false b. Both Statement A and B are true c. Statement A is true while B is false d. Statement A is false while B is true ©NIIT XML and Web Services Lesson 2A / Slide 3 of 19
  • 4. Developing Web Services Using JAX-RPC Pre-assessment Questions (Contd.) 1. DOM parsers consume more memory compared to SAX because: a. DOM serially parses the XML document from beginning to end of the document . b. DOM stores the entire document as an object tree representation in the memory. c. DOM transforms the XML document after parsing it. d. DOM creates a single object in memory to represent the XML document. ©NIIT XML and Web Services Lesson 2A / Slide 4 of 19
  • 5. Developing Web Services Using JAX-RPC Pre-assessment Questions (Contd.) 1. Select the package that contains the interface whose parse() method is used to parse XML documents using DOM. a. org.xml.sax.helpers b. javax.xml.parsers c. org.w3c.dom d. javax.xml.transform ©NIIT XML and Web Services Lesson 2A / Slide 5 of 19
  • 6. Developing Web Services Using JAX-RPC Solutions to Pre-assessment Questions • a. JAXP • c. XSLT API • c. Statement A is true while B is false • b. DOM stores the entire document as an object tree representation in the memory. • b. javax.xml.parsers ©NIIT XML and Web Services Lesson 2A / Slide 6 of 19
  • 7. Developing Web Services Using JAX-RPC Objectives In this lesson, you will learn about: • Java API for XML-based RPC (JAX-RPC) • Steps to create Web services using JAX-RPC • Steps to create Web clients using JAX-RPC ©NIIT XML and Web Services Lesson 2A / Slide 7 of 19
  • 8. Developing Web Services Using JAX-RPC Java API for XML-Based RPC (JAX- RPC) • The JAX-RPC API is used to develop portable and interoperable Web services and Web service clients. • The JAX-RPC hides the structure, encoding rules and conventions of the SOAP protocol to transfer remote procedure calls between a Web service client and a Web service using SOAP messages . ©NIIT XML and Web Services Lesson 2A / Slide 8 of 19
  • 9. Developing Web Services Using JAX-RPC Java API for XML-Based RPC (JAX- RPC) (Contd.) • JAX-RPC Working Mechanism • The JAX-RPC Web service provides methods that can be accessed by the remote clients. • The Web service client invokes the method on the Web service. • The method call is passed to the stub, which is a client side implementation of Web service object. • The stub passes the method call to the JAX-RPC runtime system on the client side. • The JAX-RPC runtime system converts the method call into SOAP message and transmits the SOAP message over the network. • The JAX-RPC runtime system on the server side receives the data and invokes the method provided on the tie object. ©NIIT XML and Web Services Lesson 2A / Slide 9 of 19
  • 10. Developing Web Services Using JAX-RPC Java API for XML-Based RPC (JAX- RPC) (Contd.) • JAX-RPC Working Mechanism(Contd.) • The tie object converts the SOAP message into method call and invokes the method on the Web service. • The Web service processes the client request and returns the result to the tie object. • The tie object creates the response message and passes the response message to the JAX-RPC runtime system. • The JAX-RPC runtime system converts the response message into SOAP message and transmits the message to the Web service client. • The JAX-RPC runtime system on the client side receives the server response and passes it to the client. ©NIIT XML and Web Services Lesson 2A / Slide 10 of 19
  • 11. Developing Web Services Using JAX-RPC Java API for XML-Based RPC (JAX- RPC) (Contd.) • The following figure shows the communication between the JAX-RPC client and a Web Service: ©NIIT XML and Web Services Lesson 2A / Slide 11 of 19
  • 12. Developing Web Services Using JAX-RPC Java API for XML-Based RPC (JAX- RPC) (Contd.) • The packages in the JAX-RPC API are: • javax.xml.rpc • javax.xml.rpc.encoding • javax.xml.rpc.handler • javax.xml.rpc.handler.soap • javax.xml.rpc.holders • javax.xml.rpc.server • javax.xml.rpc.soap ©NIIT XML and Web Services Lesson 2A / Slide 12 of 19
  • 13. Developing Web Services Using JAX-RPC Java API for XML-Based RPC (JAX- RPC) (Contd.) • The JAX-RPC does not support all the data types and classes provided by J2SE. • Only those Java data types and classes that map with XML/WSDL definition can be used while creating Web services and Web service clients using JAX- RPC API. ©NIIT XML and Web Services Lesson 2A / Slide 13 of 19
  • 14. Developing Web Services Using JAX-RPC Java API for XML-Based RPC (JAX- RPC) (Contd.) • The Java data types supported by JAX-RPC are: • byte • short • int • long • float • double • boolean ©NIIT XML and Web Services Lesson 2A / Slide 14 of 19
  • 15. Developing Web Services Using JAX-RPC Java API for XML-Based RPC (JAX- RPC) (Contd.) • The Java classes supported by JAX-RPC are: • java.lang.Byte • java.lang.Short • java.lang.Integer • java.lang.Long • java.lang.Float • java.lang.Double • java.lang.Boolean • java.lang.String • java.util.Date • java.util.Calendar ©NIIT XML and Web Services Lesson 2A / Slide 15 of 19
  • 16. Developing Web Services Using JAX-RPC Creating a JAX-RPC Web Service • Creating a JAX-RPC Web service involves: • Creating the Web service endpoint interface • Creating the Web service implementation class • Creating the configuration file • Generating the WSDL and mapping file of the Web service • Packaging and Deploying the Web service ©NIIT XML and Web Services Lesson 2A / Slide 16 of 19
  • 17. Developing Web Services Using JAX-RPC Creating a JAX-RPC Web Service Client • Creating a stand alone static stub Web service client involves: • Coding the Web service client • Creating a configuration file • Generating the necessary runtime class files • Compiling the client • Executing the client ©NIIT XML and Web Services Lesson 2A / Slide 17 of 19
  • 18. Developing Web Services Using JAX-RPC Creating a JAX-RPC Web Service Client (Contd.) • Creating a J2EE Web client involves: • Coding the Web client • Creating a configuration file • Generating the necessary runtime class files • Compiling the client • Packaging, Configuring, and Deploying the Web client • Executing the client ©NIIT XML and Web Services Lesson 2A / Slide 18 of 19
  • 19. Developing Web Services Using JAX-RPC Summary In this lesson, you learned that: • Architecture of JAX-RPC, which explains how a Web service client invoke the methods of a Web service . • The classes and data types supported by JAX-RPC. You cannot use all the classes and data types defined in J2SDK specification. • Creating portable and interoperable Web services and Web service client using JAX-RPC. Using wscompile tool to compile a Web service and generate a WSDL file. • Steps to create static stub client and Web client that invokes the methods of Web service. ©NIIT XML and Web Services Lesson 2A / Slide 19 of 19