1 / 35

PowerBuilder 11: The Web Service Source DataWindow

PowerBuilder 11: The Web Service Source DataWindow. John Strano Technology Evangelist Sybase, Inc. john.s.strano@sybase.com. PowerBuilder 11 Overview (presented Nov. 20, 2007) Jim O’Neil Systems Consultant. .NET Windows Forms And Interoperability Dec. 4, 2007 Jim O’Neil

danil
Download Presentation

PowerBuilder 11: The Web Service Source DataWindow

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PowerBuilder 11:The Web Service Source DataWindow John Strano Technology Evangelist Sybase, Inc. john.s.strano@sybase.com

  2. PowerBuilder 11 Overview (presented Nov. 20, 2007) Jim O’Neil Systems Consultant .NET Windows Forms And Interoperability Dec. 4, 2007 Jim O’Neil Systems Consultant .NET Assemblies (presented Nov. 13, 2007) Jim O’NeilSystems Consultant Web ServiceDataWindow Feb. 5, 2008 John Strano Technology Evangelist PowerBuilder 11 .NET Deployment Web Casts .NET Web Forms Dec. 11, 2007 David Fish Engineering Evangelist .NET Web Services Jan. 29, 2008 David Fish Engineering Evangelist .NET Smart Client Jan. 15, 2008 John Strano Technology Evangelist

  3. Agenda • PowerBuilder Roadmap • Web Service Source DataWindow Overview and Demo

  4. PowerBuilder Roadmap • Version 11 released in June 2007 • 11.1 Maintenance Release in November 2007 • Delivers on third-phase of PowerBuilder’s .NET initiative

  5. 2008 PowerBuilder 11.2 2008 PowerBuilder 11.5 2009 PowerBuilder 12 • AJAX support for Web Forms Applications • EAServer .NET Client Support • Enhancement requests • Core .NET enhancements • DataWindow enhancements for Win32 and .NET • Updated database support • Enhancement requests • .NET in IDE • WPF support at design- and run-time • Fully managed code at deployment • PowerScript Language Enhancements Language Independence Application Connectivity Multiple Platform Support Power And Performance

  6. The Web Services DataWindow • .NET Targets are not required! • The Web Service DataWindow is for Win32 deployments as well. • You don’t need to know Web Service implementation details • The DataWindow and PowerBuilder • Make it easy to use Web Services in a productive way • The DataWindow now supports consuming Web Services as a data source • Only using the .NET Web Services support. • Does not utilize EasySOAP

  7. The Web Services DataWindow • What the Web Service DataWindow is intended for • Access to database data across a network without the need for DB client software on the client • Reduces the client footprint • Reduces client maintenance • Eliminates the need for a persistent database connection • Allows for the utilization of unstructured data from non-relational sources • Web Services can federate data from disparate sources and disparate types of sources…and can be presented by the DataWindow

  8. PowerBuilder .NET Smart Client Support • Occasionally connected • PowerBuilder with MobiLink • Always up-to-date applications • PowerBuilder’s “Intelligent Updater” • Maximize performance using client resources • PowerBuilder applications deployed as Windows Form (Rich Client) • Communicate utilizing Web Services • PowerBuilder’s Web Service DataWindow • Utilize network resources • PowerBuilder’s Web Service DataWindow • PowerBuilder’s “Intelligent Update” • PowerBuilder with MobiLink

  9. The Web Services DataWindow • Supported Web Service “results” • Simple data types • System.Int32, System.String, System.DateTime, System.Decimal • Single row, single column • An array of simple types • Multiple rows with a single column • A structure made up of simple types • Single row with multiple columns • An array of structures made of simple types • The familiar rows and columns of a DataWindow.

  10. The Web Services DataWindow • The Web Service DataWindow is not intended for access to all Web Services • Some services return proprietary data types • .NET-implemented services can return a serialized ADO DataSet • Some services return data structures too complex for the DataWindow • e.g: Amazon returns multiple levels of nested structures • Cannot be readily represented as rows and columns • These may be supported in the future

  11. The Web Services DataWindow • Let’s create a PowerBuilder Web Service • We need structure definitions to match the database results • For example, the employee table with a few columns selected.

  12. The Web Services DataWindow • (cont’d) Let’s create a PowerBuilder NVO • Define a method to retrieve the data

  13. The Web Services DataWindow • Let’s create a Web Service DataWindow

  14. The Web Services DataWindow • What have we just created? • A DataWindow object, stored in the PBL as is normal • With some additional Web Service properties • WSDL • .NET Assembly designation • Namespace • Classname • Parameter specifications • *** Web Service input parameters are automatically defined as retrieval arguments • …cont’d…

  15. The Web Services DataWindow • What have we just created? • A .NET assembly, custom generated for this Web Service. • The .NET assembly does the heavy lifting, communicating with the .NET Web Service support. • We use reflection to figure out the methods and types contained in the assembly

  16. The Web Services DataWindow Runtime Web Service The DataWindow Engine PowerBuilder Web Service Support The Generated Assembly The .NET Framework

  17. The Web Services DataWindow • Deployed files • In addition to PBDWE110.DLL (PBDWM110.DLL for .NET deployments) • Sybase.PowerBuilder.WebService.Runtime • Sybase.PowerBuilder.WebService.RuntimeRemoteLoader • These do the communicating between the unmanaged code and the managed assembly created when the DataWindow was built • The generated .NET Assembly • .NET 2.0 Framework …Cont’d…

  18. The Web Services DataWindow • Deployed files …Cont’d… • The required PowerBuilder runtime DLLs for Web Service client applications. • See “Deploying Applications and Components” in Application Techniques. • http://infocenter.sybase.com/help/topic/com.sybase.dc37774_1100/html/apptech/CFHBBAEA.htm • Examine the documentation for the “Runtime Packager”

  19. Run time Web Service Retrieval • Retrieve() works just like it does now • You can specify retrieval arguments as parameters as you always have • <DWC>.Retrieve ( param1, param2, …)

  20. Run time Web Service Update • Of course it’s still just a single line of code. • <DWC>.Update ()

  21. Transaction Management • What about updates? • It’s not like a database! • Arguably, there is no single transaction specification (WS-Transaction) for Web Services • Microsoft/BEA/IBM Alliance…and Everyone Else • Specification-contentious Vendors • If there are multiple standards…is there a standard? • How would you perform a Rollback for a Web Service from the client? • Remediation? • NOT the purview of the Web Service DataWindow, but bears thought from the service implementer • Remember, Web services are: STATELESS!

  22. The Web Services DataWindow • Defining Web Service updates

  23. The Web Services DataWindow • Overrides • The WSConnection object allows Web Service overrides (optional) • Endpoint • User ID • Password • Proxy server • Host name • User ID • Password • Port • Authentication mode • Timeout • Windows integrated authentication

  24. Using the WSConnection Object • Some Web services support or require • User ID • Password • Other session-related properties like firewall settings • Example: Using an instance of the WSConnection object utilizing a Web Service using the SetWSObject method… int ii_return wsconnection ws_1 ws_1 = create wsconnection ws_1.username = "johndoe" ws_1.password = "mypassword" ws_1.endpoint = "myendpoint" ws_1.authenticationmode = "basic" ws_1.usewindowsintegratedauthentication = true ii_return = dw_1.setwsobject (ws_1)

  25. WSError Event • Occurs when an error is returned for a DataWindow using a Web Service data source • Can occur during any of the following operations • Connect • Retrieve • Delete • Insert • Update • Disconnect

  26. WSError Event

  27. Further Resources • PowerBuilder Demonstration Recordings… • http://www.sybase.com/products/development/powerbuilder/videos • Recorded Webcasts from this series… • http://www.sybase.com/products/development/powerbuilder/webcasts

  28. Getting Your Hands on PowerBuilder 11 • Do you have an Update Subscription Plan (USP)? • Access the Sybase Product Download Center (SPDC) at https://sybase.subscribenet.com • Download PowerBuilder 11 and companion products • Generate license keys • Need new or additional licenses? • Contact your Sybase sales office (US/Canada: 1-800-8-SYBASE) • Visit e-shop at http://eshop.sybase.com

  29. The ISUG North American PowerBuilder 11 Tour Continues! • Feb 26th: San Jose, CA – Embassy Suites, Santa Clara • Feb 27th: Los Angeles, CA – Embassy Suites North, LAX • Feb 28th: San Diego, CA – Windmill Banquet & Catering, Carlsbad • http://www.isug.com/common/PowerBuilder11Tour.html

  30. Q&A

  31. FAQs • Q: Can I use a Web Service that is not implemented using PowerBuilder/PowerScript? • A: Yes. As long as the public interface of the Web Service uses data types suited to this version of the Web Service DataWindow.

  32. FAQs • Q: Can I use a PowerBuilder NVO deployed to an application server other than EAServer or IIS as the data source of a Web Service DataWindow? • A: Yes. You may use the PowerBuilder Application Server Plug-In to deploy your NVOs to WebLogic, WebSphere or JBoss, then expose them as Web Services.

  33. FAQs • Q: Can I use Web Service data source DataWindows for DDDWs and for Composite DataWindows? • A: Yes, but you must explicitly call a GetChild() and a Retrieve() for them before the Retrieve() call for the parent DataWindow/DataStore…much as you would for a DDDW with retrieval arguments.

  34. FAQs • Q: Can I change the Web Service data source for an existing DataWindow? • A: Normally, no. • You may try editing the DataWindow source …if not… • You need to recreate the DataWindow from scratch • This mirrors the Stored Procedure source DataWindow in this regard

  35. Thank you.

More Related