SRIMAN-WEBSERVICES.pdf - DURGA SOFTWARE SOLUTIONS...

This preview shows page 1 - 4 out of 210 pages.

DURGA SOFTWARE SOLUTIONS Understanding Java Web Services JAX-RPC, JAX-WS & JAX-RS Mr. Sriman As part of this we are going to cover Web Services and its related technologies like XML, XSD, DTD, JAX-P, JAX-B, JAX-RPC, JAX-WS, and JAX-RS etc. Provides an in- depth understanding of each including the examples.
Image of page 1

Subscribe to view the full document.

Mr. Sriman Web Services 1 DURGA SOFTWARE SOLUTIONS, 23/3RT, Near Andhra Bank Opp: Reebok Show room, S.R Nagar, Cell. 9246212143. Phone: 040-64512786 Contents 1 INTRODUCTION ..................................................................................................... 5 1.1 D ISTRIBUTED P ROGRAMMING ...................................................................................... 5 1.1.1 Advantages of Distributed programming .............................................................. 7 1.2 J AVA ROLE IN D ISTRIBUTED P ROGRAMMING ..................................................................... 7 1.2.1 CORBA ............................................................................................................ 8 1.2.2 RMI ................................................................................................................. 8 1.2.3 EJB ................................................................................................................. 9 1.2.4 Web services .................................................................................................... 9 2 EVOLUTION .......................................................................................................... 11 2.1 J AVA API’ S FOR WS-I S PECIFICATION ......................................................................... 12 3 ARCHITECTURE .................................................................................................... 14 3.1 M EDIUM ............................................................................................................ 14 3.2 P ROTOCOL .......................................................................................................... 14 3.3 L ANGUAGE .......................................................................................................... 15 3.4 B INDING P ROTOCOL .............................................................................................. 16 3.5 WSDL (W EB S ERVICE D ESCRIPTION L ANGUAGE ) ........................................................... 17 3.6 UDDI (U NIVERSAL D ESCRIPTION AND D ISCOVERY I NTEGRATION R EGISTRY ) ............................ 18 4 XML ...................................................................................................................... 21 4.1 XML E LEMENT ..................................................................................................... 21 4.2 XML A TTRIBUTE ................................................................................................... 21 4.3 W ELL - FORMNESS .................................................................................................. 22 4.4 XML U SAGE ........................................................................................................ 22 4.5 V ALIDATITY ........................................................................................................ 23 5 DTD ...................................................................................................................... 24 5.1 D RAWBACK WITH DTD’ S . ........................................................................................ 26 6 XML SCHEMA DOCUMENT (XSD) ........................................................................... 27 6.1 S EQUENCE VS A LL ................................................................................................ 29 6.2 E XTENDING C OMPLEX T YPES ..................................................................................... 30 6.3 I MPOSING RESTRICTIONS ON S IMPLE T YPES ................................................................... 30 7 XSD NAMESPACE .................................................................................................. 31 7.1 XSD T ARGETNAMESPACE ........................................................................................ 31 7.2 U SING ELEMENTS FROM AN XML NAMESPACE ( XMLNS ) ....................................................... 32 7.3 D IFFERENCE BETWEEN DTD AND XSD ......................................................................... 34 8 JAX-P ................................................................................................................... 36 8.1 XML P ROCESSING M ETHODOLOGIES ........................................................................... 37 8.1.1 SAX (Simple Access for XML) ............................................................................ 37 8.1.2 DOM (Document Object Model) ......................................................................... 41 8.1.3 Difference between SAX and DOM ..................................................................... 47
Image of page 2
Mr. Sriman Web Services 2 DURGA SOFTWARE SOLUTIONS, 23/3RT, Near Andhra Bank Opp: Reebok Show room, S.R Nagar, Cell. 9246212143. Phone: 040-64512786 9 JAX-B ................................................................................................................... 49 9.1 A RCHITECTURE .................................................................................................... 50 9.2 O NE -T IME O PERATION ........................................................................................... 54 9.2.1 How to use XJC or Schemagen? ........................................................................ 55 9.2.2 What does XJC generates? ............................................................................... 56 9.3 R UNTIME O PERATION ............................................................................................. 57 9.3.1 Un-Marshalling ............................................................................................... 57 9.3.2 Marshalling .................................................................................................... 62 9.3.3 In-Memory Validation ...................................................................................... 63 10 GETTING STARTED WITH WEB SERVICES .......................................................... 67 10.1 T YPES OF W EB S ERVICES ..................................................................................... 67 10.2 W EB S ERVICE D EVELOPMENT PARTS ......................................................................... 67 10.3 W AYS OF DEVELOPING A W EB S ERVICE ..................................................................... 67 10.3.1 Contract First approach .................................................................................. 67 10.3.2 Contract Last approach .................................................................................. 67 10.4 C HOOSING AN E NDPOINT ..................................................................................... 67 10.4.1 Servlet Endpoint ........................................................................................... 68 10.4.2 EJB Endpoint ................................................................................................ 68 10.5 M ESSAGE E XCHANGE P ATTERNS ............................................................................. 68 10.5.1 Synchronous request/reply ............................................................................. 68 10.5.2 Asynchronous request/reply or Delayed Response ............................................. 69 10.5.3 One way Invoke or Fire and forget .................................................................. 70 10.6 M ESSAGE E XCHANGE FORMATS ............................................................................... 70 11 JAXRPC API (SI IMPLEMENTATION) ................................................................. 71 11.1 B UILDING P ROVIDER ........................................................................................... 71 11.1.1 Contract Last (Servlet Endpoint, Sync req/reply with rpc-encoded) ..................... 71 11.1.2 Request Processing Flow ................................................................................ 82 11.1.3 Contract Last – Activity Guide ......................................................................... 84 11.1.4 Contract First (Servlet Endpoint, Sync req/reply with rpc-encoded) ..................... 91 11.1.5 Contract First– Activity Guide ......................................................................... 95 11.2 B UILDING C ONSUMER ....................................................................................... 100 11.2.1 Stub based client ........................................................................................ 100 11.2.2 Stub based client – Activity Guide ................................................................. 104 11.2.1 Dynamic Proxy ........................................................................................... 107 11.2.2 Dynamic Invocation Interface ....................................................................... 108 12 WEB SERVICE DESCRIPTION LANGUAGE (WSDL) ........................................... 112 13 JAX-RPC API (APACHE AXIS) .......................................................................... 118 13.1 C ONFIGURING A PACHE A XIS ................................................................................ 118 13.2 C ONTRACT F IRST (JAX-RPC API, A PACHE A XIS , S ERVLET E NDPOINT , S YNC REQ / REPLY ) ....... 122 13.3 R EQUEST P ROCESSING F LOW ............................................................................... 126 13.4 C ONTRACT F IRST A CTIVITY G UIDE ...................................................................... 127 14 JAX-WS API (SUN REFERENCE IMPLEMENTATION) ......................................... 132 14.1 D IFFERENCE BETWEEN JAX-RPC AND JAX-WS API ................................................... 132 14.2 C ONTRACT L AST
Image of page 3

Subscribe to view the full document.

Image of page 4
You've reached the end of this preview.
  • Winter '19
  • Santhosh Danalakota
  • Reebok, Nagar, Near Andhra Bank Opp, Mr. Sriman

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern