developing web services with oracle web logic server
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 servicesTRANSCRIPT
![Page 1: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/1.jpg)
Developing Web Services with Oracle WebLogic Server
Gaurav Sharma
![Page 2: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/2.jpg)
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.
![Page 3: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/3.jpg)
<Insert Picture Here>
Agenda
• Web Service Landscape • Oracle Web Service Infrastructure• Key Features• Tooling – Development and management• Demo• Q & A
![Page 4: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/4.jpg)
<Insert Picture Here>
Web Service Landscape
![Page 5: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/5.jpg)
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
![Page 6: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/6.jpg)
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– …
![Page 7: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/7.jpg)
<Insert Picture Here>
Oracle Web Services
![Page 8: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/8.jpg)
Oracle Fusion Middleware Technologies
![Page 9: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/9.jpg)
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
![Page 10: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/10.jpg)
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
![Page 11: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/11.jpg)
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
![Page 12: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/12.jpg)
DemoDevelop different type of web services (ADF/WLS) using Oracle Jdeveloper
![Page 13: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/13.jpg)
<Insert Picture Here>
Key Features
![Page 14: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/14.jpg)
• 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
![Page 15: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/15.jpg)
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
![Page 16: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/16.jpg)
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)
![Page 17: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/17.jpg)
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
![Page 18: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/18.jpg)
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
![Page 19: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/19.jpg)
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
![Page 20: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/20.jpg)
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
![Page 21: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/21.jpg)
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
![Page 22: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/22.jpg)
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
![Page 23: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/23.jpg)
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";
}
}
![Page 24: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/24.jpg)
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
![Page 25: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/25.jpg)
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
![Page 26: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/26.jpg)
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)
![Page 27: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/27.jpg)
<Insert Picture Here>
Tooling – Development and management
![Page 28: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/28.jpg)
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
![Page 29: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/29.jpg)
DemoWeb service development and management
![Page 30: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/30.jpg)
Consuming web services using web services client
• JSE / J2EE client• .Net client (Platform independence)• SOA• ADF DC
![Page 31: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/31.jpg)
Feature : Web Service Testing
![Page 32: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/32.jpg)
<Insert Picture Here>
Summary
![Page 33: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/33.jpg)
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
![Page 34: Developing Web Services With Oracle Web Logic Server](https://reader036.vdocuments.site/reader036/viewer/2022081413/5481262db4795983578b4893/html5/thumbnails/34.jpg)
Questions & Answers