Developing Web Services Using JAX-RPCPre-assessment Questions         1.   ___________ is a collection of document-oriente...
Developing Web Services Using JAX-RPCPre-assessment Questions (Contd.)         1.   Which of the following API is used to ...
Developing Web Services Using JAX-RPCPre-assessment Questions (Contd.)         1.   Consider the following two statements:...
Developing Web Services Using JAX-RPCPre-assessment Questions (Contd.)         1.   DOM parsers consume more memory compar...
Developing Web Services Using JAX-RPCPre-assessment Questions (Contd.)         1.   Select the package that contains the i...
Developing Web Services Using JAX-RPCSolutions to Pre-assessmentQuestions         •   a. JAXP         •   c. XSLT API     ...
Developing Web Services Using JAX-RPCObjectives    In this lesson, you will learn about:    •    Java API for XML-based RP...
Developing Web Services Using JAX-RPCJava API for XML-Based RPC (JAX-RPC)    •    The JAX-RPC API is used to develop porta...
Developing Web Services Using JAX-RPCJava API for XML-Based RPC (JAX-RPC) (Contd.)    •    JAX-RPC Working Mechanism      ...
Developing Web Services Using JAX-RPCJava API for XML-Based RPC (JAX-RPC) (Contd.)    •    JAX-RPC Working Mechanism(Contd...
Developing Web Services Using JAX-RPCJava API for XML-Based RPC (JAX-RPC) (Contd.)         •   The following figure shows ...
Developing Web Services Using JAX-RPCJava API for XML-Based RPC (JAX-  RPC) (Contd.)    •    The packages in the JAX-RPC A...
Developing Web Services Using JAX-RPCJava API for XML-Based RPC (JAX-RPC) (Contd.)    •    The JAX-RPC does not support al...
Developing Web Services Using JAX-RPCJava API for XML-Based RPC (JAX-RPC) (Contd.)         •   The Java data types support...
Developing Web Services Using JAX-RPCJava API for XML-Based RPC (JAX-RPC) (Contd.)         •   The Java classes supported ...
Developing Web Services Using JAX-RPCCreating a JAX-RPC Web Service    •    Creating a JAX-RPC Web service involves:      ...
Developing Web Services Using JAX-RPCCreating a JAX-RPC Web ServiceClient    •    Creating a stand alone static stub Web s...
Developing Web Services Using JAX-RPCCreating a JAX-RPC Web ServiceClient (Contd.)    •    Creating a J2EE Web client invo...
Developing Web Services Using JAX-RPCSummary    In this lesson, you learned that:         • Architecture of JAX-RPC, which...
Upcoming SlideShare
Loading in …5
×

Deawsj 7 ppt-2_a

365 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
365
On SlideShare
0
From Embeds
0
Number of Embeds
30
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Deawsj 7 ppt-2_a

  1. 1. Developing Web Services Using JAX-RPCPre-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. 2. Developing Web Services Using JAX-RPCPre-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. 3. Developing Web Services Using JAX-RPCPre-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. 4. Developing Web Services Using JAX-RPCPre-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. 5. Developing Web Services Using JAX-RPCPre-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. 6. Developing Web Services Using JAX-RPCSolutions to Pre-assessmentQuestions • 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. 7. Developing Web Services Using JAX-RPCObjectives 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. 8. Developing Web Services Using JAX-RPCJava 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. 9. Developing Web Services Using JAX-RPCJava 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. 10. Developing Web Services Using JAX-RPCJava 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. 11. Developing Web Services Using JAX-RPCJava 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. 12. Developing Web Services Using JAX-RPCJava 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. 13. Developing Web Services Using JAX-RPCJava 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. 14. Developing Web Services Using JAX-RPCJava 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. 15. Developing Web Services Using JAX-RPCJava 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. 16. Developing Web Services Using JAX-RPCCreating 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. 17. Developing Web Services Using JAX-RPCCreating a JAX-RPC Web ServiceClient • 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. 18. Developing Web Services Using JAX-RPCCreating a JAX-RPC Web ServiceClient (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. 19. Developing Web Services Using JAX-RPCSummary 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

×