You are on page 1of 13

LBIA – Internal Training Introduction to Web Services

Srinivasan Ramjee Aug 21, 2009

Agenda Introduction Architecture WSDL SOAP Some Other Aspects of WLS Web Services Implementation using WebLogic Consumption SoA Q&A -2- Document Name CONFIDENTIAL .

.Introduction What is Web Service? A Web Service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). -3- Document Name CONFIDENTIAL .W3C Definition of Web Service Why use Web Service? As Web-application lets people access it without platform hindrance. Where to implement Web Service? In places where an application interface would benefit if made platform independent. Web Services lets interoperable programmatic access over web. typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards. Other systems interact with the WebService in a manner prescribed by its description using SOAP messages.

Architecture -4- Document Name CONFIDENTIAL .

an abstract set of operations supported by one or more endpoints • Binding .a single endpoint defined as a combination of a binding and a network address • Service . The endpoint sends a message. with standard semantics. The endpoint receives a message.an abstract.an abstract description of an action supported by the service • Port Type . and receives a correlated message Notification.a collection of related endpoints -5- Document Name CONFIDENTIAL . The endpoint receives a message Request-response. and sends a correlated message Solicit-response. that can be pulled via Http and understood by people/program It defines the operation and message in an abstract way and binds to a concrete network protocol and message format to define an endpoint Without WSDL it would have been more off-line communication approach between the provider and consume WSDL has four transmission primitives that an endpoint can support: – – – – One-way.a container for data type definitions using some type system • Message . typed definition of the data being communicated • Operation .a concrete protocol and data format specification for a particular port type • Port . The endpoint sends a message WSDL Schema Elements• Types .Web Services Description Language WSDL is a document describing the Web Service to consumers It is an XML document.

from a SOAP sender to SOAP receiver SOAP has the structure – SOAP Envelop • Header • Body Server side exceptions is put in as Fault element under Body Transport. can be – HTTP – JMS – SMTP -6- Document Name CONFIDENTIAL . but applications can create more complex interaction patterns A SOAP message is fundamentally a one-way transmission between SOAP nodes. distributed environment It is fundamentally a stateless. as defined in WSDL.Simple Object Access Protocol SOAP provides the definition of the XML-based information which can be used for exchanging structured and typed information between peers in a decentralized. one-way message exchange paradigm.

which specifies which users. easily.Some Other Aspects of WLS Web Services Security . in which SSL is used to secure the connection between a client application and the Web Service . you configure one or more of three conceptually different types of security: .0 Server is part of WebLogic Server -7- Document Name CONFIDENTIAL . Discovery and Integration) .To secure your WebLogic Web Service. groups.WebLogic runtime saves the message in its persistent JMS store.The UDDI Project is an industry initiative that is working to enable businesses to quickly. in which data in a SOAP message is digitally signed or encrypted .A populated UDDI registry contains cataloged information about businesses.Access control security.Message-level security.Reliable is defined as the ability to guarantee message delivery between the two Web Services .The UDDI 2. and dynamically find and carry out transactions with one another .Transport-level security.Reliable SOAP messaging is a framework whereby an application running in one WebLogic Server instance can asynchronously and reliably invoke a Web Service running on another WebLogic Server instance . the services that they offer and communication standards and interfaces they use to conduct transactions . and roles are allowed to access Web Services Reliable SOAP Messaging . The store can be either a JMS File or JDBC store UDDI Registry (Universal Description.

Certain Java data types. are automatically transported as SOAP Attachments (rather than elements in the SOAP body) when going over the wire. It also creates XML Schema representations of the Java objects and updates the web-services.xml file accordingly. based on the attributes of the servicegen Ant task and introspected EJB or Java class information. Creates a web-services. Packages all the Web Service components into a Web application WAR file. Optionally creates the serialization class that convert the non-built-in data between its XML and Java representations.xml deployment descriptor file. an empty Java implementation class the web-services. if used as parameters or return values of a method that implements a Web Service operation. -8- Document Name CONFIDENTIAL .Implementation with WebLogic 8.1 Two approaches are – Starting from Java From Java Class From stateless Session EJB Starting with WSDL wsdl2Service is an Ant task which takes as input an existing WSDL file and generates the Java interface that represents the implementation of your Web Service optionally.xml file that describes the Web Service servicegen is a WebLogic provided ant task for generating the service. looking for public methods to convert into Web Service operations and non-built-in data types used as parameters or return values of the methods. then packages the WAR and EJB JAR files into a deployable EAR file. It does Introspects the Java code.

deployment model. such as webservices. the JAX-RPC data type mapping file. with additional artifacts.. the WSDL..2 WebLogic Web Services are implemented according to the Enterprise Web Services 1.1 specification.xml and weblogic-webservices. you can program and configure additional advanced features such as WS-ReliableMessaging. WS-Security. and so on Multiple JWS files can either be packaged as a single WAR file or as multiple WAR files through parameter to jswc task Over basic Web Services.1 describes packaging format. which defines the standard J2EE runtime architecture for implementing Web Services in Java – EWS 1. -9- Document Name CONFIDENTIAL . . and runtime services WebLogic Web Services are based on JWS files (Java files that use JWS annotations to specify the shape and behaviour of the Web Service) and Ant tasks that execute on the JWS file Web Services development methodologies – Starting with Java – Starting with WSDL jswc is a WebLogic provided ant task which will build the Web Services in a standard web application WAR file.Implementation with WebLogic 9.xml deployment descriptor file. WS-Policy.

rpc.10 - Document Name CONFIDENTIAL .RemoteException and javax.1.ServiceException .rmi.Web Services Client WSDL analysis is the step zero for Web Service consumer WebLogic implements JAX-RPC 1. which defines the APIs used to invoke a WS A web browser can generate a client request In Java world a client can be – Stand-alone client application – J2EE component running in an Application Server WebLogic clientgen ant task generates JAX-RPC client stub archive from WSDL Handle java.xml.

11 - Document Name CONFIDENTIAL .SoA SoA represents a fundamental shift in the way new applications are designed. developed. Three basic steps behind SoA • Building a Portfolio of re-usable Services • Wiring through Enterprise Service Bus • Orchestrating into an End-to-End process . and integrated. It also greatly facilitates the development of enterprise applications as modular business services that can be easily integrated and reused.

Document Name CONFIDENTIAL .

Thank You! .