Presentation on theme: "PowerBuilder 11: The Web Service Source DataWindow"— Presentation transcript:
1 PowerBuilder 11: The Web Service Source DataWindow John StranoTechnology EvangelistSybase, Inc.
2 PowerBuilder 11 Overview Web Service DataWindow (presented Nov. 20, 2007)Jim O’NeilSystems Consultant.NET Assemblies(presented Nov. 13, 2007)Jim O’Neil Systems Consultant.NET Windows FormsAnd InteroperabilityDec. 4, 2007Jim O’NeilSystems ConsultantWeb Service DataWindowFeb. 5, 2008John StranoTechnology EvangelistPowerBuilder 11.NET DeploymentWeb Casts.NET Web FormsDec. 11, 2007David FishEngineering Evangelist.NET Web ServicesJan. 29, 2008David FishEngineering Evangelist.NET Smart ClientJan. 15, 2008John StranoTechnology 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 2007Delivers 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 ApplicationsEAServer .NET Client SupportEnhancement requests2008PowerBuilder 11.5Core .NET enhancementsDataWindow enhancements for Win32 and .NETUpdated database supportEnhancement requests2009PowerBuilder 12.NET in IDEWPF support at design- and run-timeFully managed code at deploymentPowerScript Language EnhancementsLanguageIndependenceApplicationConnectivityMultiplePlatformSupportPowerAndPerformance
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 detailsThe DataWindow and PowerBuilderMake it easy to use Web Services in a productive wayThe DataWindow now supports consuming Web Services as a data sourceOnly using the .NET Web Services support.Does not utilize EasySOAP
7 The Web Services DataWindow What the Web Service DataWindow is intended forAccess to database data across a network without the need for DB client software on the clientReduces the client footprintReduces client maintenanceEliminates the need for a persistent database connectionAllows for the utilization of unstructured data from non-relational sourcesWeb 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 connectedPowerBuilder with MobiLinkAlways up-to-date applicationsPowerBuilder’s “Intelligent Updater”Maximize performance using client resourcesPowerBuilder applications deployed as Windows Form (Rich Client)Communicate utilizing Web ServicesPowerBuilder’s Web Service DataWindowUtilize network resourcesPowerBuilder’s “Intelligent Update”
9 The Web Services DataWindow Supported Web Service “results”Simple data typesSystem.Int32, System.String, System.DateTime, System.DecimalSingle row, single columnAn array of simple typesMultiple rows with a single columnA structure made up of simple typesSingle row with multiple columnsAn array of structures made of simple typesThe familiar rows and columns of a DataWindow.
10 The Web Services DataWindow The Web Service DataWindow is not intended for access to all Web ServicesSome services return proprietary data types.NET-implemented services can return a serialized ADO DataSetSome services return data structures too complex for the DataWindowe.g: Amazon returns multiple levels of nested structuresCannot be readily represented as rows and columnsThese may be supported in the future
11 The Web Services DataWindow Let’s create a PowerBuilder Web ServiceWe need structure definitions to match the database resultsFor example, the employee table with a few columns selected.
12 The Web Services DataWindow (cont’d) Let’s create a PowerBuilder NVODefine 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 normalWith some additional Web Service propertiesWSDL.NET Assembly designationNamespaceClassnameParameter 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 The DataWindowEnginePowerBuilderWeb ServiceSupportThe GeneratedAssemblyThe .NET Framework
17 The Web Services DataWindow Deployed filesIn addition to PBDWE110.DLL (PBDWM110.DLL for .NET deployments)Sybase.PowerBuilder.WebService.RuntimeSybase.PowerBuilder.WebService.RuntimeRemoteLoaderThese do the communicating between the unmanaged code and the managed assembly created when the DataWindow was builtThe 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.Examine the documentation for the “Runtime Packager”
19 Run time Web Service Retrieval Retrieve() works just like it does nowYou 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 ServicesMicrosoft/BEA/IBM Alliance…and Everyone ElseSpecification-contentious VendorsIf 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 implementerRemember, Web services are:STATELESS!
22 The Web Services DataWindow Defining Web Service updates
23 The Web Services DataWindow OverridesThe WSConnection object allows Web Service overrides (optional)EndpointUser IDPasswordProxy serverHost namePortAuthentication modeTimeoutWindows integrated authentication
24 Using the WSConnection Object Some Web services support or requireUser IDPasswordOther session-related properties like firewall settingsExample: Using an instance of the WSConnection object utilizing a Web Service using the SetWSObject method…int ii_returnwsconnection ws_1ws_1 = create wsconnectionws_1.username = "johndoe"ws_1.password = "mypassword"ws_1.endpoint = "myendpoint"ws_1.authenticationmode = "basic"ws_1.usewindowsintegratedauthentication = trueii_return = dw_1.setwsobject (ws_1)
25 WSError EventOccurs when an error is returned for a DataWindow using a Web Service data sourceCan occur during any of the following operationsConnectRetrieveDeleteInsertUpdateDisconnect
26 WSError Event Argument Description Operation (string) Type of operation (Retrieve, Update, Insert, Delete, Connect, or Disconnect)Rownum(long)Row number or 0 if not applicable, such as when an error occurs during connection to the Web serviceBuffernameName of the buffer being accessed while the error occurred (Primary, Filter, or Delete)WsinfoThe WSDL file, the URL that defines the Web service, or the assembly that is used access the Web serviceMethodName of the Web service method invokedErrormessageException message returned from the method
27 Further Resources PowerBuilder Demonstration Recordings… Recorded Webcasts from this series…
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.comDownload PowerBuilder 11 and companion productsGenerate license keysNeed new or additional licenses?Contact your Sybase sales office (US/Canada: SYBASE)Visit e-shop at
29 The ISUG North American PowerBuilder 11 Tour Continues! Feb 26th: San Jose, CA – Embassy Suites, Santa ClaraFeb 27th: Los Angeles, CA – Embassy Suites North, LAXFeb 28th: San Diego, CA – Windmill Banquet & Catering, Carlsbad
31 FAQsQ: 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 FAQsQ: 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 FAQsQ: 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 FAQsQ: 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 scratchThis mirrors the Stored Procedure source DataWindow in this regard
Your consent to our cookies if you continue to use this website.