J2EE APIs and Emerging Web Services Standards Session #4 Speaker Title Corporation 1
Agenda J2EE APIs for Web Services J2EE JAX-RPC APIs for Web Services JAX-RPC Emerging Web Services Standards Introduction Architecture Server Programming Model Client Programming Model J2EE Web Services deployment model 2
Why J2EE APIs for Web Services Standard APIs for creating and invoking Web services in Java/J2EE Portability across J2EE platform vendors Interoperability with standards compliant Web services, and WS-I BP compliances Simplicity for developing and deploying Web services Extensibility of basic Web services runtime Reusability of Existing J2EE artifacts as Web Services runtime 3
J2EE APIs for Web Services Java APIs for XML JAXP JAXB JAX-RPC SAAJ JAXR EJB 2.1 JSR 109 Description Java API for XML Parsing Java API for XML Data Binding Java API for XML Remote Procedure Call Java API for XML Data Binding Java API for XML Registries Stateless Session EJB Endpoint Model Web Services Deployment Model 4
JAX-RPC Design Goals J2EE service J2EE App Server J2EE client J2EE client J2EE App Server J2EE service Non-J2EE Service Non-J2EE Client 5
JAX-RPC Architecture WSDL description Service Client Service Endpoint Stub WSDL<->Java Mapping Container Tie Dispatch JAX-RPC API Client Side JAX-RPC Runtime System Protocol (SOAP) Transport JAX-RPC API Server Side JAX-RPC Runtime System 6
WSDL/XML Java Mapping WSDL service port/porttype operation schema built-in types complex type fault Java javax.xml.rpc.service remote interface method Java types or std. classes value type exception 7
JAX-RPC Message Handlers Handler chain SOAP Request Handler A Handler B JAX-RPC Service Endpoint SOAP Request Handler 1 Handler 2 8
JAX-RPC Programming Model Service definition interfaces must follow RMI conventions No remote references are allowed. All objects are passed by copy. 9
Developing JAX-RPC Web Services Standard javax.rmi.remote Standard WSDL to Java Service endpoint Interface ServiceLifeCycle Interface Generated Your Code Service Implementation Class 10
D E M O N S T R A T I O N JAX-RPC in Action
JAX-RPC Client Invocation Models Client JAX-RPC APIs Generated Stubs Dynamic Proxy Dynamic Invocation Interface JAX-RPC Runtime Handler Chain SOAP/HTTP Webservices client.xml 12
Business Use Case Let s assume you want to build a new PO processing system You already have a Web service exposing relevant Inventory functionality of your ERP system You also want to leverage a Credit Web service You want to expose a new PO processing Web service Internally uses the Inventory Web service and the Credit Web service to verify eligibility 13
Business Example Confirm Make Order Consolidate Results Check Credit Credit Status Inventory Status Check Inventory Credit Service Client PO Service Inventory Service 14
Web Services Standards Stack Complex WS Orchestration Quality of Service UDDI WSDL SOAP XML HTTP,, BEEP, IIOP, JMS, SMTP Discovery Description Messaging Transport 15
Web Services Standards/Tech Stack Reliable Messaging Security Quality of Service UDDI WSDL SOAP XML HTTP, BEEP, IIOP, JMS, SMTP Discovery Description Messaging Transport 16
Web Services Reliability Requirements Motivation: transport independence, intermediaries At-Least-Once semantics At-Most-Once semantics (no duplicates) Exactly-Once semantics Guaranteed Message Ordering, within a context delimited using a group id. 17
WS-Reliability Sender Receiver Application Layer SOAP Node With Reliable Messaging SOAP Reliable Message Msg Ack Acknowledgement Message Application Layer SOAP Node With Reliable Messaging 18
Security Requirements Identification - Who are you? Authentication - How do I know it is you? Authorization - Are you allowed? Integrity - Is the data untampered? Confidentiality - Did anyone read it? Auditing - Can you show what happened? Non-Repudiation - Can you prove it happened 19
How to Achieve Security Transport-level security HTTP authentication Digest authentication Secure Socket Layer End-to-End, or Message-Level, or Application-Level security WS-Security with XML DSig/Encryption 20
WS-Security SOAP extensions to implement integrity and confidentiality. Describes how to exchange signed and encrypted messages Addresses same-domain and cross-domain secure messaging Build on SOAP, WSDL, XML DSig, XML Enc and SSL/TLS Designed to support PKI, Kerberos, SAML, XrML, Basic/Digest, SSL 21
Roadmap Transport Layer Security (SSL) SAML XKMS WS-SEC XML-DSIG XML-ENC Session Policy Authorization Provisioning Today 22
Web Services Standards/Tech Stack [New Layer] Choreography: BPEL4WS,WSCI,BPSS.. Reliable Messaging Transactions &Coordination Security Orchestration Quality of Service UDDI WSDL SOAP XML HTTP, BEEP, IIOP, JMS, SMTP Discovery Description Messaging Transport 23
Orchestration Example createpo() 1 PO XPATH(PO) Item checkinv() InvConfirm 3 replytopo() XPATH(PO) Customer checkcredit() CreditConfirm 4 2 Service Partner Links & References Credit WS Inv WS WS Client Service Partners 24
Orchestration Challenges Coordinate asynchronous communication with services and the customer Correlate message exchanges between participating parties Implement parallel processing of activities and their synchronization 25
Different Terminology Other terms often used in the same context Web Service Composition Web Service Choreography Web Service Coordination Web Service Conversations Web Service Collaborations Different people prefer different terminologies, but basically they re all talking about 26
Specifications Overview Business Process Execution Language for Web Services (BPEL4WS) Combination of IBM s WSFL and MSFT s XLANG WS-Coordination/Transaction Used by BPEL4WS to provide support for long running business transactions (activities) Web Service Choreography Interface (WSCI) Business protocols, such as ebxml, RosettaNet, etc. 27
Overview of Business Protocols Web Services (Orchestration) ebxml RosettaNet Business Collaboration Definitions BPSS PIP Collaboration Profile & Agreement CPP/CPA <= (see ebxml) Business Document Definitions Core Library / Core Components RNBD, RNTD Internal Business Process Definitions BPEL4WS, BPML, XPDL, Registry and Repository UDDI Reg/Rep Payload Security WS-Security, XMLDigSig, SAML, XMLDigSig S/MIME Protocol, Messaging SOAP, WS- Coordination/ Transaction, ebms (based on SOAP w/ attachments) RNIF Transport, Packaging SOAP w/ MIME, DIME SOAP w/ MIME RNO / MIME 28
Web Services Standards Stack Integration A2Ai, B2Bi i : ebxml, RosettaNet Choreography: BPEL4WS,WSCI,BPSS.. Reliable Messaging Grid Services Transactions &Coordination Security Complex WS Orchestration Quality of Service UDDI WSDL SOAP XML HTTP,, BEEP, IIOP, JMS, SMTP Discovery Description Messaging Transport 29