PowerBuilder 11: The Web Service Source DataWindow - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

PowerBuilder 11: The Web Service Source DataWindow

Description:

Web Service Source DataWindow Overview and Demo. PowerBuilder Roadmap ... Web Services can federate data from disparate sources and disparate types of ... – PowerPoint PPT presentation

Number of Views:165
Avg rating:3.0/5.0
Slides: 36
Provided by: lori220
Category:

less

Transcript and Presenter's Notes

Title: PowerBuilder 11: The Web Service Source DataWindow


1
PowerBuilder 11The Web Service Source DataWindow
  • John Strano
  • Technology Evangelist
  • Sybase, Inc.
  • john.s.strano_at_sybase.com

2
PowerBuilder 11 Overview (presented Nov. 20,
2007) Jim ONeil Systems Consultant
.NET Windows Forms And Interoperability Dec. 4,
2007 Jim ONeil Systems Consultant
.NET Assemblies (presented Nov. 13, 2007) Jim
ONeilSystems 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 PowerBuilders .NET
    initiative

5
(No Transcript)
6
The Web Services DataWindow
  • .NET Targets are not required!
  • The Web Service DataWindow is for Win32
    deployments as well.
  • You dont 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 sourcesand can be
    presented by the DataWindow

8
PowerBuilder .NET Smart Client Support
  • Occasionally connected
  • PowerBuilder with MobiLink
  • Always up-to-date applications
  • PowerBuilders Intelligent Updater
  • Maximize performance using client resources
  • PowerBuilder applications deployed as Windows
    Form (Rich Client)
  • Communicate utilizing Web Services
  • PowerBuilders Web Service DataWindow
  • Utilize network resources
  • PowerBuilders Web Service DataWindow
  • PowerBuilders 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
  • Lets 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
  • (contd) Lets create a PowerBuilder NVO
  • Define a method to retrieve the data

13
The Web Services DataWindow
  • Lets 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
  • contd

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
  • Contd

18
The Web Services DataWindow
  • Deployed files
  • Contd
  • 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
  • ltDWCgt.Retrieve ( param1, param2, )

20
Run time Web Service Update
  • Of course its still just a single line of code.
  • ltDWCgt.Update ()

21
Transaction Management
  • What about updates?
  • Its not like a database!
  • Arguably, there is no single transaction
    specification (WS-Transaction) for Web Services
  • Microsoft/BEA/IBM Allianceand Everyone Else
  • Specification-contentious Vendors
  • If there are multiple standardsis 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
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 service
Buffername (string) Name of the buffer being accessed while the error occurred (Primary, Filter, or Delete)
Wsinfo (string) The WSDL file, the URL that defines the Web service, or the assembly that is used access the Web service
Method (string) Name of the Web service method invoked
Errormessage (string) Exception message returned from the method
27
Further Resources
  • PowerBuilder Demonstration Recordings
  • http//www.sybase.com/products/development/powerbu
    ilder/videos
  • Recorded Webcasts from this series
  • http//www.sybase.com/products/development/powerbu
    ilder/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
QA
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/DataStoremuch 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.
Write a Comment
User Comments (0)
About PowerShow.com