SOA-26: Extending Your Application with OpenEdge ® Web Services John Sadd OpenEdge Evangelist.

Slides:



Advertisements
Similar presentations
Web Services & EAI.
Advertisements

C2: Introduction to OpenEdge® Integration Technologies
Server Access The REST of the Story David Cleary
Siebel Web Services Siebel Web Services March, From
Importing and Calling Web Services from your CA Plex Applications Session Code: Lab13 Rob Layzell.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Progress OpenEdge BPM: An Application Revolution Demonstration OpenEdge 11.0 and Savvion 8.0 Shelley Chase, Software Architect, OpenEdge.
Scale Up Access to your 4GL Application using Web Services
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
SOA with Progress Philipp Walther Consultant. © 2007 Progress Software Corporation2 Agenda  SOA  Enterprise Service Bus (ESB)  The Progress SOA Portfolio.
Browsers and Servers CGI Processing Model ( Common Gateway Interface ) © Norman White, 2013.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
SiS Technical Training Development Track Day 10. Agenda  Introduction to Integration Broker  How to Expose and Consume WebServices.
John Sadd Progress Fellow and OpenEdge Evangelist
© 2002, Progress Software Corporation 1 D I S C L A I M E R Products Under Development n This talk includes information about potential future products.
DEV-14: Understanding and Programming for the AppServer™
The Easiest Way to Write Web Applications Jordi Sastre IT Architect, PSC May 2012.
OPS-17: Utilizing Firewalls - In the Reign of Fire
Writing All Your Code In OpenEdge Architect Peter van Dam.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering 2.
C8: Enterprise Integration Patterns in Sonic ™ ESB Stefano Picozzi Solutions Architect.
SOA-06: Get On the Bus with the OpenEdge ® Adapter for Sonic ESB ® David Cleary Principal Software Engineer, Progress.
SOA-4: Introduction to OpenEdge ® Integration Technologies Jamie Townsend Applied Architect.
SOA-12: Integrate over the Web with OpenEdge® Web Services
What are Webservices?. Web Services  What are Web Services?  Examine important Web Services acronyms (UDDI, SOAP, XML and WSDL)  What are the benefits.
INT-11: It’s Monday Morning, Do You Know Where Your Service Has Been? Service Management with Sonic ™ and Actional Marv Stone Progress Software.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
ARCH-03: Implementing the OpenEdge™ Reference Architecture – Part 1 John Sadd Progress Fellow and OpenEdge Evangelist.
DEV-5: Introduction to WebSpeed ® Stephen Ferguson Sr. Training Program Manager.
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
ARCH-4: The Presentation Layer in the OpenEdge® Reference Architecture Frank Beusenberg Senior Technical Consultant.
SOA-14: Deploying your SOA Application David Cleary Principal Software Engineer.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
AUTHORS: MIKE P. PAPAZOGLOU WILLEM-JAN VAN DEN HEUVEL PRESENTED BY: MARGARETA VAMOS Service oriented architectures: approaches, technologies and research.
INT-5: Integrate over the Web with OpenEdge® Web Services
Catch Me If You Can P ractical Structured Error Handling Peter van Dam.
SOA-3: You Need to Integrate, But What do You Need to Know and Do? Bob Trabucchi Sr Presales Consultant Sandy Caiado Sr Presales Consultant.
Stop! Don’t throw away that ADM2 code just yet… Jeff Ledbetter Product Architect, Roundtable Software.
Getting Started with OPC.NET OPC.NET Software Client Interface Client Base Server Base OPC Wrapper OPC COM Server Server Interface WCF Alternate.
1 Web Services Web and Database Management System.
ARCH-07: Implementing the OpenEdge™ Reference Architecture – Part 2
ARCH-7: A Class-Based Implementation of the OpenEdge® Reference Architecture John Sadd Fellow and OpenEdge Evangelist Applied Technology.
ARCH-11: Building your Presentation with Classes John Sadd Fellow and OpenEdge Evangelist Sasha Kraljevic Principal TSE.
INT-9: Implementing ESB Processes with OpenEdge ® and Sonic ™ David Cleary Principal Software Engineer.
C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant.
Slide 1 Service-centric Software Engineering. Slide 2 Objectives To explain the notion of a reusable service, based on web service standards, that provides.
A7: Architecting Your Application in OpenEdge ® 10 Mike Ormerod Applied Architect.
ARCH-7: Integrate this! SonicMQ® and the OpenEdge® Reference Architecture Christian Stiller Technical Architect.
ARCH-5: Service Interfaces in Practice Christian Stiller Technical Architect.
Mike Ormerod C1: Applied SOA: Building Out Your SOA Environment with OpenEdge ® Applied Architect.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
.NET Mobile Application Development XML Web Services.
Christian Stiller Technical Account Manager SOA-23: Enterprise Integration Patterns in Sonic ™ ESB.
1 G52IWS: Web Services Description Language (WSDL) Chris Greenhalgh
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Labs: Create, deploy and test a simple web service
Rob Straight, Principal Product Manager
Web Programming Developing Web Applications including Servlets, and Web Services using NetBeans 6.5 with GlassFish.V3.
z/Ware 2.0 Technical Overview
SOA-40: Getting Rejected on the Bus
Service-centric Software Engineering
ARCH-1: Application Architecture made Simple
C6: Introducing Native Invocation with the OpenEdge® Adapter for Sonic™ ESB Chris James Senior Consultant.
SOA-1: Fundamentals of Service-Oriented Architecture
DEV-11: Architecting Your Application in OpenEdge® 10
Rob Straight, Principal Product Manager
ARCH-2: OpenEdge Reference Architecture (OERA) Latest Thinking
ARCH-14: Power Your Organisation with OpenEdge
Call Any Web Service from the Progress 4GL
SOA-09: Conducting Business with OpenEdge® and SonicMQ®
Presentation transcript:

SOA-26: Extending Your Application with OpenEdge ® Web Services John Sadd OpenEdge Evangelist

© 2008 Progress Software Corporation 2 SOA-26: Extending Your Application with OpenEdge Web Services Goals for this session  Stimulate thinking about services in your application  Show the ease of using OpenEdge support for Web services  Help you understand some basic principles of identifying and packaging services

© 2008 Progress Software Corporation 3 SOA-26: Extending Your Application with OpenEdge Web Services Agenda  Services? What Services? And Why?  Running Web services from OpenEdge  Exposing ABL Procedures as Web services  Making Asynchronous Web service Calls

© 2008 Progress Software Corporation 4 SOA-26: Extending Your Application with OpenEdge Web Services Motivations for creating OpenEdge services  Mergers and Acquisitions  Opening up Business Logic to New Requesters  Automating Manual and Batch Processes  Automating Communication with Customers and Suppliers

© 2008 Progress Software Corporation 5 SOA-26: Extending Your Application with OpenEdge Web Services Services and the OpenEdge Reference Architecture Presentation Business Components Data Access Data Sources Common Infrastructure Enterprise Services Service Interface Service Service Interface Service Service Interface Service  The OpenEdge Reference Architecture is a Service Oriented Architecture (SOA)

© 2008 Progress Software Corporation 6 SOA-26: Extending Your Application with OpenEdge Web Services Calls from Business Components out to other services Presentation Business Components Data Access Data Sources Common Infrastructure Enterprise Services Somebody’s Web service Somebody’s Web service Service

© 2008 Progress Software Corporation 7 SOA-26: Extending Your Application with OpenEdge Web Services Service Interface in OpenEdge Reference Architecture Presentation Business Components Data Access Data Sources Common Infrastructure Enterprise Services Service Interface Service  Create a procedure for each operation to expose as a wrapper for a Web service  Package any code needed for the service to be called from that Service Interface INPUTs and OUTPUTs Service Manager Security Manager

© 2008 Progress Software Corporation 8 SOA-26: Extending Your Application with OpenEdge Web Services Stages of creating services in your application  Think about the goal of loosely-coupled services  Right-size your services for reuse potential  Learn by picking key areas for initial services  Move on to more robust architected services  Use services to transform and optimize the nature of your business

© 2008 Progress Software Corporation 9 SOA-26: Extending Your Application with OpenEdge Web Services Agenda  Services? What Services? And Why?  Running Web services from OpenEdge  Exposing ABL Procedures as Web services  Making Asynchronous Web service Calls

© 2008 Progress Software Corporation 10 SOA-26: Extending Your Application with OpenEdge Web Services OpenEdge and Web technologies  There are many standards and technologies that make Web services work  OpenEdge provides support for you Generating SOAP wrappers Generating WSDL description documents Turning WSDL into readable documentation Providing sample code to write and call

© 2008 Progress Software Corporation 11 SOA-26: Extending Your Application with OpenEdge Web Services SOAP  Originally stood for “Simple Object Access Protocol” Simple, indeed…  Envelope, Header, and Body <q1:OrderInfoID id="h_id1" xmlns:q1="urn:OrderSvc:OrderInfo"> 2e62cab6b81150d5:167f64e:f295e997b0: -8000; ;M/IryPm3piDcF/W5DsH4GA== <soap:Body soap:encodingStyle=" 3

© 2008 Progress Software Corporation 12 SOA-26: Extending Your Application with OpenEdge Web Services WSDL – Web Services Description Language: Not something you want to read and write

© 2008 Progress Software Corporation 13 SOA-26: Extending Your Application with OpenEdge Web Services Getting a WSDL document for code design  Run bprowsdldoc from proenv b-pro-wsdl-doc “batch” “ Progress” “WSDL” “document”  Provide the URL of the WSDL descriptor document  Output to a set of HTML documentation files

© 2008 Progress Software Corporation 14 SOA-26: Extending Your Application with OpenEdge Web Services Output from bprowsdldoc  Any internal documentation  The URL of the WSDL  The target namespace  “Port types” – callable operations  Datatypes of parameters

© 2008 Progress Software Corporation 15 SOA-26: Extending Your Application with OpenEdge Web Services Interface operations

© 2008 Progress Software Corporation 16 SOA-26: Extending Your Application with OpenEdge Web Services Sample code to connect to and run the Web service

© 2008 Progress Software Corporation 17 SOA-26: Extending Your Application with OpenEdge Web Services Procedure and parameters for an operation

© 2008 Progress Software Corporation 18 SOA-26: Extending Your Application with OpenEdge Web Services Creating a procedure with the sample syntax DEFINE TEMP-TABLE Customer NO-UNDO NAMESPACE-URI " FIELD custnum AS INTEGER FIELD name AS CHARACTER FIELD balance AS DECIMAL FIELD active AS LOGICAL. DEFINE DATASET getCustomersResult NAMESPACE-URI " FOR Customer. DEFINE VARIABLE hWebService AS HANDLE NO-UNDO. DEFINE VARIABLE hService1Soap AS HANDLE NO-UNDO. CREATE SERVER hWebService. hWebService:CONNECT ("-WSDL ' WSDL'"). RUN Service1Soap SET hService1Soap ON hWebService. RUN getCustomers IN hService1Soap(OUTPUT DATASET getCustomersResult). FOR EACH Customer: DISPLAY Customer. END.

© 2008 Progress Software Corporation 19 SOA-26: Extending Your Application with OpenEdge Web Services Agenda  Services? What Services? And Why?  Running Web services from OpenEdge  Exposing ABL Procedures as Web services  Making Asynchronous Web service Calls

© 2008 Progress Software Corporation 20 SOA-26: Extending Your Application with OpenEdge Web Services The OpenEdge Web services provider  One or more AppServers to run ABL code  3 rd party Web Server  OpenEdge Web Services Adapter  SOAP requests from consumers Request Response

© 2008 Progress Software Corporation 21 SOA-26: Extending Your Application with OpenEdge Web Services Setting up the pieces to the puzzle  Install your 3 rd party Web server  Configure one or more AppServers Best practices recommendation: Session-free to avoid binding AppServer ™ sessions  Configure the Web services adapter

© 2008 Progress Software Corporation 22 SOA-26: Extending Your Application with OpenEdge Web Services Simple test to expose as a Web service /* TestCust.p: Test procedure for AppServer and WebServices call. */ DEFINE INPUT PARAMETER pCustNum AS INTEGER NO-UNDO. DEFINE OUTPUT PARAMETER pCustName AS CHARACTER NO-UNDO. IF pCustNum = 1 THEN DO: pCustName = "Test Name". RETURN "Success!". END. ELSE DO: pCustName = "No Name". RETURN "Failure!". END.

© 2008 Progress Software Corporation 23 SOA-26: Extending Your Application with OpenEdge Web Services Configure and Enable Web Services Adapter  Expand Web Services Adapter entry in Explorer  Ensure “Enable Web Services” is checked When you’re ready to expose your Web services to the world  Check status to confirm everything is enabled

© 2008 Progress Software Corporation 24 SOA-26: Extending Your Application with OpenEdge Web Services Generating support files with ProxyGen  The Proxy Generator creates the supporting WSM and WSDL files your consumers need  Define a new application service  An external.p call is represented as an AppObject

© 2008 Progress Software Corporation 25 SOA-26: Extending Your Application with OpenEdge Web Services Adding a procedure to the application  Add the compiled test procedure to the application  Select File->Generate  Check Web Services as the service to generate

© 2008 Progress Software Corporation 26 SOA-26: Extending Your Application with OpenEdge Web Services Deploying the Web service in Explorer  Locate the WSM file that ProxyGen created  Confirm the deployment information  Enable the new Web service

© 2008 Progress Software Corporation 27 SOA-26: Extending Your Application with OpenEdge Web Services Testing the Web service  You can test by running the service from an OpenEdge client Even though you wouldn’t normally do this!  Request the WSDL that ProxyGen created using bprowsdldoc Just as you did with a foreign Web service!

© 2008 Progress Software Corporation 28 SOA-26: Extending Your Application with OpenEdge Web Services Writing a procedure to test the Web service  Sample syntax lets you invoke testcust as a function or as a procedure  RETURN statement in the test procedure becomes the RETURNS type of the function  Or it becomes an additional result parameter for the procedure call

© 2008 Progress Software Corporation 29 SOA-26: Extending Your Application with OpenEdge Web Services Complete procedure to call the Web service /* RunTestCust_WS.p: To run TestCust.p as a Web service */ DEFINE VARIABLE pCustNum AS INTEGER NO-UNDO. DEFINE VARIABLE result AS CHARACTER NO-UNDO. DEFINE VARIABLE pCustName AS CHARACTER NO-UNDO. DEFINE VARIABLE hWebService AS HANDLE NO-UNDO. DEFINE VARIABLE hTestCustObj AS HANDLE NO-UNDO. DEFINE VARIABLE lStatus AS LOGICAL NO-UNDO. CREATE SERVER hWebService. lStatus = hWebService:CONNECT("-WSDL ' IF lStatus THEN DO: RUN TestCustObj SET hTestCustObj ON hWebService. RUN TestCust IN hTestCustObj (INPUT pCustNum, OUTPUT result, OUTPUT pCustName). MESSAGE "Status: " RESULT SKIP "Cust Name is " pCustName SKIP VIEW-AS ALERT-BOX. hWebService:DISCONNECT(). END. DELETE OBJECT hTestCustObj NO-ERROR. DELETE OBJECT hWebService NO-ERROR.

© 2008 Progress Software Corporation 30 SOA-26: Extending Your Application with OpenEdge Web Services Agenda  Services? What Services? And Why?  Running Web services from OpenEdge  Exposing ABL Procedures as Web services  Making Asynchronous Web service Calls

© 2008 Progress Software Corporation 31 SOA-26: Extending Your Application with OpenEdge Web Services So why consider using ASYNC?  Modern user interfaces don’t make people wait and do things in sequence  Calls to Web services have inherently unpredictable reliability and performance Let your code deal with calls that don’t complete Take advantage of running Web services concurrently

© 2008 Progress Software Corporation 32 SOA-26: Extending Your Application with OpenEdge Web Services Review of asynchronous calls in OpenEdge  You can run a procedure on an AppServer ASYNCHRONOUS  The OUTPUT parameters come back to a separate EVENT-PROCEDURE  The client caller can continue working until the EVENT-PROCEDURE runs

© 2008 Progress Software Corporation 33 SOA-26: Extending Your Application with OpenEdge Web Services Async call example /* RunTestCust_AS_async.p: */ DEFINE VARIABLE cCustName AS CHARACTER NO-UNDO. DEFINE VARIABLE hServer AS HANDLE NO-UNDO. DEFINE VARIABLE lReturn AS LOGICAL NO-UNDO. DEFINE VARIABLE hRequest AS HANDLE NO-UNDO. CREATE SERVER hServer. lReturn = hServer:CONNECT ("-AppService asbroker1 -H localhost -S sessionModel session-free"). IF lReturn THEN DO: RUN testcust.p ON hServer ASYNCHRONOUS EVENT-PROCEDURE "testcust_response" (INPUT 1, OUTPUT cCustName). WAIT-FOR U1 OF THIS-PROCEDURE. END. hServer:DISCONNECT(). DELETE OBJECT hServer. Or use PROCESS EVENTS.

© 2008 Progress Software Corporation 34 SOA-26: Extending Your Application with OpenEdge Web Services Async event procedure  Here are the key lines again from the calling procedure:  And here is the EVENT-PROCEDURE that is called when the request completes: PROCEDURE testcust_response: DEFINE INPUT PARAMETER cCustName AS CHARACTER NO-UNDO. MESSAGE "Status: " RETURN-VALUE SKIP "Customer is " cCustName SKIP APPLY "U1" TO THIS-PROCEDURE. END PROCEDURE. RUN testcust.p ON hServer ASYNCHRONOUS EVENT-PROCEDURE "testcust_response" (INPUT 1, OUTPUT cCustName). WAIT-FOR U1 OF THIS-PROCEDURE.  Note that the procedure called on the AppServer does not need to change at all!

© 2008 Progress Software Corporation 35 SOA-26: Extending Your Application with OpenEdge Web Services Example procedure to run multiple Web services concurrently /* GoogleEx_async.p -- invoking external Web Service */ DEFINE VARIABLE iRepeat AS INTEGER NO-UNDO. DEFINE VARIABLE phrase AS CHARACTER EXTENT 5 NO-UNDO INITIAL ["Phonix, Arizona","Bastan, Massachusets","Las Angloos, CA", "New Yok, New Yerk", "Chacago, Illanoy"]. DEFINE VARIABLE KEY AS CHARACTER NO-UNDO. DEFINE VARIABLE return1 AS CHARACTER NO-UNDO. DEFINE VARIABLE hWebService AS HANDLE NO-UNDO. DEFINE VARIABLE hGoogleSearchPort AS HANDLE NO-UNDO. DEFINE VARIABLE hAsyncRequest AS HANDLE EXTENT 5 NO-UNDO. CREATE SERVER hWebService. hWebService:CONNECT("-WSDL ' RUN GoogleSearchPort SET hGoogleSearchPort ON hWebService.

© 2008 Progress Software Corporation 36 SOA-26: Extending Your Application with OpenEdge Web Services Making five concurrent requests DO iRepeat = 1 TO 5: RUN doSpellingSuggestion IN hGoogleSearchPort ASYNCHRONOUS SET hAsyncRequest[iRepeat] EVENT-PROCEDURE "Spelling_Response" (INPUT key, INPUT phrase[iRepeat], OUTPUT return1). END. WAIT-FOR U1 OF THIS-PROCEDURE. DELETE OBJECT hGoogleSearchPort NO-ERROR. hWebService:DISCONNECT() NO-ERROR. DELETE OBJECT hWebService NO-ERROR.

© 2008 Progress Software Corporation 37 SOA-26: Extending Your Application with OpenEdge Web Services The event procedure PROCEDURE Spelling_Response: DEFINE INPUT PARAMETER pReturn1 AS CHARACTER NO-UNDO. DEFINE VARIABLE cResponsePhrase AS CHARACTER NO-UNDO. DO iRepeat = 1 TO 5: IF hAsyncRequest[iRepeat] = SELF THEN cResponsePhrase = phrase[iRepeat]. END. MESSAGE "The phrase was: " + cResponsePhrase skip "The suggestion is: " + pReturn1 SKIP "request count is: " hWebService:ASYNC-REQUEST-COUNT VIEW-AS ALERT-BOX. IF hWebService:ASYNC-REQUEST-COUNT = 0 THEN APPLY "U1" TO THIS-PROCEDURE. END.

© 2008 Progress Software Corporation 38 SOA-26: Extending Your Application with OpenEdge Web Services The results

© 2008 Progress Software Corporation 39 SOA-26: Extending Your Application with OpenEdge Web Services In Summary  Extend the value of your application with services  Take advantage of OpenEdge support for Web services  Package key parts of your application as reusable services

© 2008 Progress Software Corporation 40 SOA-26: Extending Your Application with OpenEdge Web Services For More Information, go to…  PSDN to item or category related to session topic  Education Courses: Title  Documentation: Title

© 2008 Progress Software Corporation 41 SOA-26: Extending Your Application with OpenEdge Web Services Relevant Exchange Sessions  Session-ID: Session Title

© 2008 Progress Software Corporation 42 SOA-26: Extending Your Application with OpenEdge Web Services Questions ?

© 2008 Progress Software Corporation 43 SOA-26: Extending Your Application with OpenEdge Web Services Thank You

© 2008 Progress Software Corporation 44 SOA-26: Extending Your Application with OpenEdge Web Services