Upload
gaurav-sharma
View
16.080
Download
7
Embed Size (px)
DESCRIPTION
Talk given at Sun tech 2010 in Hyderabad, India about developing web services with weblogic server and how to enable some of the WS* standards for your web services
Citation preview
Developing Web Services with Oracle WebLogic Server
Gaurav Sharma
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions.The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
<Insert Picture Here>
Agenda
• Web Service Landscape • Oracle Web Service Infrastructure• Key Features• Tooling – Development and management• Demo• Q & A
<Insert Picture Here>
Web Service Landscape
Web Services : What is it?
WSDL
Web Service(JEE, SOA,
PL/SQL,.NET,C/C++,Legacy …)
Web ServiceClient
(JEE,SOA,.NET,PL/SQL …)
Points to description
DescribesService
FindsService
Invokes withXML Messages
SOAP/REST
UDDI Registry
Points to service
Where is Web Service today?• Standards : still evolving
– JAX-*– WS-*
• Adoption– Everybody understands what it is– Ubiquitously adopted and deployed– Popular for connecting platforms and applications– Starting to go beyond basics
• What are the pain points?– Security– Performance– Complexity– Interoperability
• Contention points– SOAP vs. REST– …
<Insert Picture Here>
Oracle Web Services
Oracle Fusion Middleware Technologies
Mission Statement
Interoperability
Standards Extensions
• World-class implementations
• JAX-*
• WS-*
• Value-added extensions
• Reliability
• Scalability
• Performance
• Availability
• Interoperability assurance• Oracle FMW products
• 3rd-party stacks
Oracle WS
Oracle Web Service Offering
DevelopmentDevelopment
OEPE
JDeveloper
PolicyPolicy
WLS policies
OWSM policies
ManagementManagement
WLS Console
EM
Oracle WSOracle WS
Infra WS
WLS WS
SOA WS
JEE WS
WC WS
ADF WS
Web Services Infrastructure
WebLogic Server
StatefulServiceJAX-WS
JMSJMSSOAPSOAP
HTTPHTTPSOAPSOAP
HTTPHTTPRESTREST
JAXBData BindingSwA Asynch
Service
WS-Security
WS-Addressing
WS-Reliable
MessagingMTOM Logging
AuditingWS-AT
Web Services Java Programming Model – Java EE
Declarative QoS (WS-Policy)
Web Services Management With EM/WLC/WLST
Web Services DevelopmentWith JDeveloper/OEPE
WSIF
DemoDevelop different type of web services (ADF/WLS) using Oracle Jdeveloper
<Insert Picture Here>
Key Features
• JAX-*
• SOAP1.* & WS-Policy
• WS-SecurityPolicy
• WS-ReliableMessaging
• WS-Addressing
• WS-SecureConversation
• MTOM
• WS-AT
• REST
• JAXB/SDO databinding
• WS-I BP/BSP/RSP
Standards
Features Overview
• Reliability
• Availability
• Scalability
• Performance
• Interoperability
• Database web service
• Spring web service
• Stateful web service
• Asynchronous web service
• Custom policies
Value-added
• Web service management
• Web service security configuration
• Policy attachment
• Policy management
• WLST-based web service management
• Test page
Management
Feature : Dual Programming Model
Protocol (SOAP/REST)
Server Side
Runtime System
JAX-WS/RPC API
Client side
Runtime System
Stub
Service Endpoint
WSDL Description
WSDL<->Java Mapping
Dispatch
Container
Service Client
Transport
Tie
JAX-WS/RPC API
JAX-WS vs JAX-RPC?
•SOAP 1.2 vs SOAP 1.1
•JAXB (data mapping model)
•MTOM (Message Transmission Optimization Mechanism)
•XML/HTTP - WSDL 1.1 specification defined an HTTP binding, which is a means by which you can send XML messages over HTTP without SOAP. JAX-RPC ignored the HTTP binding. JAX-WS adds support for it.
•WS-I's Basic Profiles JAX-RPC supports WS-I's Basic Profile (BP) version 1.0. JAX-WS supports BP 1.1.
•JAX-RPC maps to Java 1.4. JAX-WS maps to Java 5.0.
• EJB 3.0 vs EJB 2.1
•The handler model (SAAJ 1.3 specification)
Feature : Declarative QoS
• Can be configured using• EM• WLS Console• WLST• JDeveloper/OEPE
• QoS parameters set as Policies• Security• Reliable Messaging• Attachment• Addressing• Management
Web ServicesClient Management
JAX-WS JAX-WS Service Service EndpointEndpoint
JAX-WS JAX-WS ClientClient
TransportHTTP
SOAPMessage
SOAPMessage
SOAPMessage
SOAPMessage
Web ServicesServer Management
WS-Security
WS-RM
Auditing/Logging
WS-RM
Auditing/Logging
Auditing/Logging
WS-RM
WS-Security
Auditing/Logging
WS-RM
Response
Request
WS-WS-SecuritySecurity
WS-Security
Feature : End-to-end Policy Support• Policy Administration
– Browse policies available in policy store
– Attach/detach policies to services
– Monitor policy violations
• Policy management– Search for policies– Create new, create-like
policies– Generate client policies– Trace policy usages– Export/import policies– Support complete policy
life cycle management• Authoring• Versioning
Web Services With Policies
WSDLWith
Policies
Web Service(JEE, .NET,
SOA, PLSQL,Legacy …)
Web ServiceClient
(JEE, .NET,SOA, …)
Look upPolicy References
DescribeServicePolicies
Look upPolicy
References
Security/RM/…
SOAP
PolicyManager
&Store
Policy Enforcement
PolicyEnforcement
Feature : Web Service Security
Client WS-Security
JAX-WS JAX-WS Service Service EndpointEndpoint
JAX-WS JAX-WS ClientClient
TransportHTTP
SOAPMessage
SOAPMessage
SOAPMessage
SOAPMessage
Server WS-Security
Add AuthAdd AuthTokenTokenEncryptEncryptSignSign
DecryptDecryptCheckCheckSignatureSignature
Check Check SignatureSignatureDecryptDecryptCheck AuthCheck Auth
TokenToken
SignSignEncryptEncrypt
• Access Control(Aucn/Auzn)• Message Confidentiality• Message Integrity
• OOTB security policies• WLS policies• OWSM policies
Response
Request
Feature : WS-RM
ApplicationLayer
RM Source
ApplicationLayer
RM Destination
Msg
Ack
Sender Receiver
• Implicit support through policy• Interoperable• Scalable & clusterable
• Durable & recoverable via persistence store• Reliable messaging for synch/asynch MEP’s• Reliable conversation over multiple invocations
Feature : Consolidated Management
• Integrated with FMW Admin tools– EM– WLS Admin Console– WLST
• Management – Service configuration
• Lookup• Update
• Management – Policy
• Attachment/detachment• Enablement/disablement• Life cycle management• Parameter configuration
– Runtime activity monitoring• Performance metrics• Policy violation metrics
Feature : REST
JAX-WS HTTPBinding JAX-RS (JSR-311)
@WebServiceProvider( targetNamespace="http://example.org",
serviceName = "HelloRS")
@BindingType(value = HTTPBinding.HTTP_BINDING)
public class HelloRS implements Provider<Source> {
public Source invoke(Source source) {
return createSource(“Hello World”); }
}
@Path("/helloworld")
public class HelloRS {
@GET
@Produces("text/plain")
public String getClichedMessage() {
return "Hello World";
}
}
Feature : Database Web Services
XML Parser
JAX-RPCServlet
Decoding
Encoding
Oracle WebLogic Web Service
SOAP
SOAP
SOAP Libraries
PublisherGenerated
ArtifactsSQL/Query
SQL/DML
XML
PL/SQL
JDBC
JSP
Feature : Asynchronous Web Service
Synchronous MEP•Common use cases
•Request/response MEP over HTTP•Short-running operations•Real-time processing
•Pain points•Blocking•Indefinite waiting•Timeout
Asynchronous MEP•Common use cases
•Two one-way MEP over HTTP•Long-running operations•Delayed or batch processing
•Benefits•Better suit real-world business model •Provide richer messaging patterns beyond request/reply•Thread/JMS-based responder
Feature : Stateful Web Service
• Client to remain in a conversation over consecutive requests/responses
• Useful for building shopping cart type applications using web services
• Container to control message dispatching to service endpoint
• “Pinning” service endpoint instance
• Storing attributes in HTTP Session
client server
GetShoppingCart (new session)
ShoppingCart + SessionID(#1)
addItem + SessionID(#1)
GetShoppingCart(new session)
ShoppingCart + SessionID(#2)
Response + SessionID(#1)
<Insert Picture Here>
Tooling – Development and management
Feature : Development Tools• WLS web service Ant commands
– JAX-RPC/WS
• JDeveloper– JAX-RPC/WS & SOA– WSDL editor– HTTP Analyzer
• HTTPS• WS-*
– DBWS– JAX-RS
• OEPE– JAX-WS– WSDL editor– JAX-WS/JAXB custom binding file editor
DemoWeb service development and management
Consuming web services using web services client
• JSE / J2EE client• .Net client (Platform independence)• SOA• ADF DC
Feature : Web Service Testing
<Insert Picture Here>
Summary
Web Services Infrastructure
WebLogic Server
StatefulServiceJAX-WS
JMSJMSSOAPSOAP
HTTPHTTPSOAPSOAP
HTTPHTTPRESTREST
JAXBData BindingSwA Asynch
Service
WS-Security
WS-Addressing
WS-Reliable
MessagingMTOM Logging
AuditingWS-AT
Web Services Java Programming Model – Java EE
Declarative QoS (WS-Policy)
Web Services Management With EM/WLC/WLST
Web Services DevelopmentWith JDeveloper/OEPE
WSIF
Questions & Answers