int-9: implementing esb processes with openedge ® and sonic ™ david cleary principal software...
TRANSCRIPT
INT-9: Implementing ESB Processes with OpenEdge® and Sonic™
David ClearyPrincipal Software Engineer
© 2007 Progress Software Corporation2 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Agenda
Technology Overview Developing a Business Process from Start to
Finish
Developing Business Processes
© 2007 Progress Software Corporation3 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Audience Expectations
Understanding of tools and technologies used Familiarity of thought process in creating a
business process Complete script of the demo shown
© 2007 Progress Software Corporation4 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Products Used
OpenEdge 10.1B01• OpenEdge Architect
• ProxyGen
• OpenEdge Adapter for Sonic ESB®
• OpenEdge Adapter for SonicMQ®
Sonic Workbench 7.5• SonicMQ
• Sonic ESB
© 2007 Progress Software Corporation5 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Sonic and the OpenEdge Adapter for Sonic ESB
OpenEdge AppServer™
ESBAdapter
PartnerSystem
Packaged Application
ESBProcess
Enterprise Service Bus
© 2007 Progress Software Corporation6 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Why Sonic ESB and the OpenEdge Application Server
AppServer Web Service interface is not what you want• Transformation
Need to route message to different services based on context• CBR
Combination of the above• Multi-step business process
Advanced Web Services standards• WS-Addressing• WS-Security
© 2007 Progress Software Corporation7 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Communication Models
AppServer
ESBAdapter
PartnerSystem
Packaged Application
WebServices Rest
Enterprise Service Bus
© 2007 Progress Software Corporation8 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Web Services
An application that can be accessed using SOAP over HTTP where the interface is described using WSDL
Standards defined by the W3C
Web Services Consumer
Web Services Provider
JavaWSDL
HTTP Request(SOAP)
HTTP Reply(SOAP)
OpenEdge
Perl.NET
Java™OpenEdge
Perl.NET™
Sonic Sonic
SOAP- based Web Services
© 2007 Progress Software Corporation9 INT-9: Implementing ESB Processes with OpenEdge and Sonic
REST – Representational State Transfer
An application that can be accessed via the HTTP GET/POST/PUT/DELETE verbs
Message content if any typically in the form of XML as defined by some XML Schema
REST Consumer
REST Provider
HTTP Request(XML)
HTTP Reply(XML)
Rest- based Web Services
© 2007 Progress Software Corporation10 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Designing Interfaces
AppServer
ESBAdapter
PartnerSystem
WebServices Rest
Packaged Application
Private Interface
Public Interface
Public Interface
Enterprise Service Bus
© 2007 Progress Software Corporation11 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Designing Interfaces
Web Services vs. REST• Use SOAP when you can leverage tools
• Use REST for simplicity
Conform to the Industry Recommendations• Web Services Interoperability Organization (ws-i.org)
• SOAP Encoding deprecated – use Literal
• Use Document instead of RPC for widest client support
Learn WSDL• Create WSDL to conform to interface you want – make
it as simple as possible – it’s the contract
Public Interfaces
© 2007 Progress Software Corporation12 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Designing Interfaces
Interface between Sonic and OpenEdge Service is one or more related operations Operations should perform a complete unit of work –
make coarse-grained for efficiency All OpenEdge services are Request-Reply and can
return a fault RPC/Literal allows mapping of individual parameters
– can use Web Service Invocation Editor easier Document/Literal allows using transformation of
entire message
Private Interfaces
© 2007 Progress Software Corporation13 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Agenda
Technology Overview Developing a Business Process from Start to Finish
Developing Business Processes
© 2007 Progress Software Corporation14 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Company Lookup Business Process
Process Entry Endpoint
OpenEdge CompanyInfo Service
Content Based Router – Stock Symbol
Stock Quote Web Service
Process Exit Endpoint
No Yes
© 2007 Progress Software Corporation15 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Configuring Sonic Workbench with OpenEdge
Workbench manages two containers for development• Dev.ESB_Core runs Sonic Services
• Dev.ESB_Test will run OpenEdge Services
OpenEdge installed container not used for development
Classpath and properties on Test container configured for OpenEdge
© 2007 Progress Software Corporation16 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Define the Public Interface
Defined by an XML Schema Use an XML Namespace
• URL if schema can be retrieved at location• URN if just a name
Create named types for your interface Define Elements for your types Many benefits by creating a schema
• Automatic example files• Eases WSDL creation
© 2007 Progress Software Corporation17 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Defining and Deploying OpenEdge Services with ProxyGen
New ESB tab in ProxyGen for 10.1B• Generates WSM and WSDL files for Sonic
• Deploys them automatically to Sonic Domain
Defines ESB Service• Creates Endpoints – not underlying Queues
• Optionally deploys service to defined ESB container
• Sets AppServer URL
© 2007 Progress Software Corporation18 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Calling OpenEdge Services with a Web Service Invocation
Easiest way to call an OpenEdge Service• SOAP message transient – data is what is
important
• Scenario editor allows live testing of service
Add invocation to process• Use mapping tools to extract input parameters
• Many options on handling results
Scenarios and tracking info help development
© 2007 Progress Software Corporation19 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Using Sonic Transformation Services
Transformations change results into what you need• Save results as example document
• Schema says what you want
• Sonic tools ease style-sheet creation
© 2007 Progress Software Corporation20 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Using Sonic Routing Services (CBR)
Route messages based on content• Supports message parts or headers
Routing based on rules files or XPATH• Rules files written in JavaScript
• No coding required for XPATH
Routing like a CASE statement• Can route to first true evaluation or all
• Includes default destination
© 2007 Progress Software Corporation21 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Calling External Web Services
Same process as calling OpenEdge Services Design for unreliability Use sub-processes to abstract
implementation• Easier to create new sub-process if Web
Service goes away
Create Fault process to be flexible
© 2007 Progress Software Corporation22 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Exposing Business Process to Clients
Process currently has REST interface• JMS and ABL clients send messages to Entry
Endpoint
• HTTP Direct Acceptor for browser-based AJAX clients
• Replies specified via JMSReplyTo
Wrap process to expose as SOAP• Automatic WSDL generation
• Wrap and unwrap steps
© 2007 Progress Software Corporation23 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Business Process Demo
© 2007 Progress Software Corporation24 INT-9: Implementing ESB Processes with OpenEdge and Sonic
In Summary
Design, do not generate, your public interface• Use REST for JMS and AJAX
• Use SOAP for advanced clients (tools, WS-Security, etc)
Follow WS-I recommendations• Use Document-Literal for widest client support
Use sub-processes liberally Design for unreliability
© 2007 Progress Software Corporation25 INT-9: Implementing ESB Processes with OpenEdge and Sonic
For More Information, go to…
PSDN• Designing and Deploying SOA Applications
on Sonic ESB for the OpenEdge Developer
• PSDN Forum
Education Courses:• OpenEdge Development with Sonic ESB
• Service Oriented Integration with Sonic ESB
• Using JMS in OpenEdge
© 2007 Progress Software Corporation26 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Relevant Exchange Sessions
INT-12: Mastering ProDatasets and Native XML Datatypes with Sonic ESB
SONIC-1: What’s New in Sonic 7.5 INT-3: Realistic Service Oriented
Architecture Approaches INT-7: Middleware Roadmap and Info
Exchange
© 2007 Progress Software Corporation27 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Questions?
© 2007 Progress Software Corporation28 INT-9: Implementing ESB Processes with OpenEdge and Sonic
Thank you foryour time
© 2007 Progress Software Corporation29 INT-9: Implementing ESB Processes with OpenEdge and Sonic