Web Services and 'Net - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Web Services and 'Net

Description:

Available over Internet or private intranet networks. Uses a standardized XML messaging system ... Definitions -- XML Schema. XML Schema ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 27
Provided by: cory54
Category:

less

Transcript and Presenter's Notes

Title: Web Services and 'Net


1
(No Transcript)
2
Web Services and .Net
  • Creating and Consuming Web Services with
    PowerBuilder 9.0

3
What is a web service?
  • Use of Internet technologies to allow distributed
    software components to talk to each other
  • Available over Internet or private intranet
    networks
  • Uses a standardized XML messaging system
  • Self-describing via common XML grammar
  • Discoverable via a simple find mechanism
  • Not tied to any OS and languages
  • Separate Web service description from
    implementation

.NET
MQSeries
J2EE
Web Services
Packaged Applications
CORBA
Mainframe
Custom Applications
4
Web Services
  • Web Services are
  • Platform independent
  • Language independent
  • Based on XML

5
Web Services Description Language (WSDL)
  • Defines the rules of describing the underneath
    components in XML format
  • Must include
  • Service name and ports(endpoints)
  • Binding information -- transport protocol (soap,
    http get, http post, or others)
  • PortType -- define all operations in this service
  • Messages -- data exchanged between client and
    server side such as parameters of functions,
    return value
  • Namespaces and Schema -- refer to well known data
    types or define new data types such as structure,
    array

6
Definitions -- XML Schema
  • XML Schema
  • The rule of defining new data types and complex
    types such as array, structure, enumeration, and
    composed data types
  • There are several standard schemas, which have
    already defined the well known data types such as
    string, integer, etc.
  • W3C schema 1999
  • W3C schema 2000/10
  • W3C schema 2001
  • SOAP schema

7
Simple Object Access Protocol (SOAP)
  • A lightweight XML-based protocol
  • All messages exchanged between SOAP client and
    server are in XML format
  • SOAP can use HTTP, FTP, SMTP, and other transport
    protocols
  • SOAP is platform and language independent
  • Uses Envelop/Header/Body to represent the
    messages

8
Web Service Proxy
  • Web Service Proxy In PowerBuilder 9
  • A PB object to represent the remote Web Service,
    it includes
  • All functions exposed by Web Services and their
    signature
  • Complex data types used by the Web Services
  • Namespaces and schemas used by the Web Services
  • Default Endpoint

9
Introduction to Web Service Client
  • How Web Services work

Client Side
Server Side
1. Create Server Side components 2. Wrap to
WS 3. Generate WSDL 4. Publish
5. Create WS proxy from WSDL 6. Use proxy to
invoke Web Services
3
WSDL Files
PowerScript
NVO or Other components
5
2
1
6
Invoke
Web service Proxy
Web service Stub
Data
10
PB Web Service Client Internals
  • Web Service Wizard
  • Collect information such as the location of WSDL,
    service, ports, etc.
  • Proxy Generator
  • Create WS proxy based on the information above
  • Universal SOAP Client
  • Instantiate WS proxy, communicate to WS server
  • Error Handling
  • Capture exception/error

Info
Web Service Wizard
Generator Data Store
WSDL file
Proxy Generator
PB Proxy
PowerScript
Universal Soap Client
Proxy Instance
Exception Processor
PowerBuilder 9
11
Web Services Support
  • PowerBuilder 9.0 supports access to web services
    using SOAP through HTTP
  • Allows developers to integrate web services into
    PowerBuilder applications quickly
  • Hides much of the complexity of
  • WSDL
  • XML grammar
  • SOAP development

12
Standards Used In PB Web Service Client
  • Standards supported in PB 9
  • XML Schema 1.1
  • WSDL 1.1
  • SOAP 1.1 over HTTP

13
Web Services Support
  • High level process
  • Create web service proxy
  • Import SOAP connection class
  • Use SOAP connection and proxy in PowerScript

14
Using Web Service Proxy Wizard
  • Purpose of Web Service Proxy Wizard
  • Collects information such as location of WSDL
    file, service, port(s), proxy name, and target
    library
  • Create a proxy generator object in PowerBuilder
    library

15
Using Web Service Proxy Wizard
  • Information collected includes
  • The location of the WSDL file, it could be a
    local file or URL
  • Service -- Only one service can be selected in
    this wizard
  • Port(s) -- One service may be exposed to several
    ports Only SOAP ports can be used in PB

16
Using Web Service Proxy Wizard
  • Information collected includes (continued)
  • Proxy name You can provide a prefix which will
    be added to the default proxy name to avoid
    naming conflicts
  • Default proxy name is the port name
  • Library name -- Where to deploy the proxy
  • Project name -- A project to store all these
    information

17
Universal SOAP Client
  • Soap Client
  • Packaged into PBSoapClient90.pbd
    PBSoapClient90.DLL
  • PBSoapClient90.DLL MUST be deployed with PB
    application
  • New Classes in PB 9 to support SOAP Messaging
  • SoapConnection class
  • Used to instantiated the proxy object and
    populated SOAP options
  • SoapException class
  • Used to capture runtime errors/exceptions when
    calling Web Services

18
SoapConnection Class
  • Functions in SoapConnection class
  • CreateInstance --Instantiate WS proxy
  • SetOptions -- Set options such as log file,
    userID, password

19
SoapConnection Class
  • CreateInstance
  • CreateInstance(proxyObj, ProxyType)
  • Create a proxy object using default endpoint
  • CreateInstance(proxyObj, ProxyType, endpoint)
  • Create a proxy object using specified endpoint
  • SetOptions
  • SetOptions(optionString)
  • Format of optionString is Name/value pairs
  • For example
  • SoapLogC\kt.log, userIDsa,
    Passwordsybase
  • SoapLogC\kt.log, userIDsa,
    Passwordsybase

20
SoapException Class
  • SoapException Class
  • SoapException inherited from PowerBuilder
    RuntimeError object
  • Errors that occur in the execution of a method of
    Web service are converted to SoapException
    objects and thrown to the calling script
  • In PowerScript
  • Use try-catch block to capture the exceptions
  • Unhandled exception will be propagate to PB and
    cause SystemError event to be executed

21
Troubleshooting
  • Use SetOptions to set log file, which will
    capture the raw SOAP data exchange between client
    and server

22
Web Services and .Net
  • Seeing the Technology in Action

23
Web Services and .Net
  • Creating Web Services with PowerBuilder and
    EAServer

24
Deploying a PowerBuilder NVO as a Web Service
  • High level process
  • Deploy NVO to EAServer
  • Generate Java Stubs using Jaguar Manager
  • Create Web Service Using the Web Services Toolkit

25
Web Services and .Net
  • Seeing the Technology in Action

26
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com