BP0140 How we stopped worrying and learned to love Web Services PowerPoint PPT Presentation

presentation player overlay
1 / 36
About This Presentation
Transcript and Presenter's Notes

Title: BP0140 How we stopped worrying and learned to love Web Services


1
BP0140 How we stopped worrying and learned to
love Web Services
  • Brian Preece
  • R D Director
  • BCP Ltd

2
Who are BCP?
  • Major supplier in Europe of Food Wholesale,
    Retail and Cash and Carry systems
  • Clients Spar, Woolworths (UK), NAAFI, Iceland,
    Musgraves, BWG, ADM
  • 1st Extranet - Late 1970s Telspar
  • 1st Scanning in small stores in UK
  • Countries UK, Ireland, Cyprus, Germany
  • Early adopter of Sonic with our AIMS wholesale/
    retail messaging hub

3
Agenda
  • What are Web Services?
  • The target application price lookup
  • Exposing Progress Business Logic as a Web Service
  • Consuming a Web Service from Progress
  • Our Price Lookup Web Service in action
  • The future of Web Services

4
Agenda
  • What are Web Services?
  • The target application price lookup
  • Exposing Progress Business Logic as a Web Service
  • Consuming a Web Service from Progress
  • Our Price Lookup Web Service in action
  • The future of Web Services

5
Definition
  • Integration between applications across a network
    (LAN, WAN or Internet) using the core Web
    Services protocols of XML, SOAP and WSDL

6
Alternative Definitions
  • DCOM/ CORBA for normal mortals
  • In a survey, only 3 of application developers
    understood CORBA
  • Crossplatform integration that even Microsoft,
    Sun and IBM all agree on

7
Standards
  • Built on even more fundamental standards TCP/IP,
    HTTP, ASCII
  • Core standards are XML, SOAP and WSDL
  • Alphabet soup of other standards UDDI,
    WS-Security, BTP, BPEL4WS, etc. etc. etc.

8
Agenda
  • What are Web Services?
  • The target application price lookup
  • Exposing Progress Business Logic as a Web Service
  • Consuming a Web Service from Progress
  • Our Price Lookup Web Service in action
  • The future of Web Services

9
Whats the price for this, Doris?
  • Items that wont scan due to unknown barcodes are
    the bane of retailers lives
  • Can be due to flash packs, direct deliveries or
    just plain getting behind with the paperwork

10
Solution
  • POS calls a Web Service at the wholesaler which
    returns price and description
  • If the wholesaler does not have the price, their
    system calls a Web Service at a central product
    listing service (UDEX in the UK)

11
Agenda
  • What are Web Services?
  • The target application price lookup
  • Exposing Progress Business Logic as a Web Service
  • Consuming a Web Service from Progress
  • Our Price Lookup Web Service in action
  • The future of Web Services

12
Web Services Toolkit phase 1
  • Enhancement to ProxyGen
  • Analyses a .r file and generates WSDL WSM file
  • WSM file is used by the Web Services adapter to
    translate SOAP request into AppServer call and
    return values to SOAP response

13
Deployment Architecture
Source Progress Web Services Toolkit Guide and
Reference
14
AppServer issues
  • New session model session-free
  • This is to avoid the consuming app retaining
    connection information
  • Limitation only one entry point per .r file if
    session-free is used

15
Demo
  • Calling a Progress procedure from a .NET program

16
Agenda
  • What are Web Services?
  • The target application price lookup
  • Exposing Progress Business Logic as a Web Service
  • Consuming a Web Service from Progress
  • Our Price Lookup Web Service in action
  • The future of Web Services

17
Consuming a Web Service
  • This will be part of WSTK part 2, due 2nd half of
    2003 (current schedule)
  • In the meantime, we can do it by hand, using
    Progress sockets to send the SOAP request to the
    URL of the service using an HTTP Post, receiving
    the SOAP response and parsing out the return
    values

18
Steps
  • Input is URL of WSDL, entry point and input
    parameters
  • Get WSDL from URL using HTTP Get and parse it
  • Construct SOAP request from WSDL info
  • Send SOAP request using HTTP Post
  • Receive SOAP response
  • Parse out return values from SOAP response

19
Typical HTTP Post
  • POST /productpricelookup/productpricelookup.asmx
    HTTP/1.1
  • Content-Type text/xml charsetutf-8
  • SOAPAction "http//tempuri.org/GetPrice"
  • Content-Length 608
  • Host localhost
  • lt?xml version"1.0" encoding"utf-8"?gt
  • ltsoapEnvelope
  • xmlnssoap"http//schemas.xmlsoap.org/soap/en
    velope/" xmlnsxsi"http//www.w3.org/2001
    /XMLSchema-instance" xmlnsxsd"http//www
    .w3.org/2001/XMLSchema"gt
  • ltsoapBodygt
  • ltGetPrice xmlns"http//tempuri.org/"gt
  • ltstrProductCodegt550000lt/strProductCodegt
  • ltstrCustomerCodegt19999lt/strCustomerCodegt
  • ltstrIntegerDaygt13lt/strIntegerDaygt
  • ltstrCharacterMonthgtjanlt/strCharacterMont
    hgt
  • ltstrIntegerYeargt2000lt/strIntegerYeargt
  • lt/GetPricegt
  • lt/soapBodygt
  • lt/soapEnvelopegt

20
HTTP Reply
  • HTTP/1.1 200 OK
  • Server Microsoft-IIS/5.1
  • Date Thu, 06 Feb 2003 105029 GMT
  • Cache-Control private, max-age0
  • Content-Type text/xml charsetutf-8
  • Content-Length 520
  • lt?xml version"1.0" encoding"utf-8"?gtltsoapEnvelo
    pe xmlnssoap"http//schemas.xmlsoap.org/soap/env
    elope/" xmlnsxsi"http//www.w3.org/2001/XMLSchem
    a-instance" xmlnsxsd"http//www.w3.org/2001/XMLS
    chema"gtltsoapBodygtltGetPriceResponse
    xmlns"http//tempuri.org/"gtltGetPriceResultgtltPrice
    gt0.28lt/PricegtltProductDescriptiongtCoca Cola - Cans
    one uplt/ProductDescriptiongtltCustomerNamegtKirkham
    Kitchens Ltd.lt/CustomerNamegtltDateErrorgtDate
    supplied was OKlt/DateErrorgtlt/GetPriceResultgtlt/GetP
    riceResponsegtlt/soapBodygtlt/soapEnvelopegt

21
Demo
  • Calling a .NET Web Service from a Progress program

22
Aside Why we use Progress!
  • FIND FIRST customer WHERE customer.cust-code
    pcCustomerCode
  • NO-LOCK NO-ERROR.
  • IF AVAILABLE customer THEN pcCustomerName
    customer.c-name.
  • Versus
  • OleDbConnection1.Open()
  • intWherePosition InStr(ODCGetCustomer.CommandTe
    xt, "WHERE")
  • intWherePosition intWherePosition - 2
  • If intWherePosition lt 0 Then
  • intWherePosition Len(ODCGetCustomer.
    CommandText)
  • End If
  • ODCGetCustomer.CommandText Mid(ODCGetCustomer.C
    ommandText, 1, intWherePosition) _
  • " WHERE (customer.cust-code '"
    strCustomerCode "')"
  • Dim CustomerReader As OleDb.OleDbDataReader
  • CustomerReader ODCGetCustomer.ExecuteReader
  • If booCustOK Then
  • strGroupMatrix CustomerReader.GetStr
    ing(2)
  • strDepot CustomerReader.GetString(3)
  • PriceInfo.CustomerName
    CustomerReader.GetString(1)
  • End If

23
Agenda
  • What are Web Services?
  • The target application price lookup
  • Exposing Progress Business Logic as a Web Service
  • Consuming a Web Service from Progress
  • Our Price Lookup Web Service in action
  • The future of Web Services

24
Architecture of Price Lookup
Store
Scanner scans unknown bar code
Product Lookup Service
Wholesaler/ Head Office
25
Architecture of Price Lookup
Store
Store calls getPrice on wholesalers system
Product Lookup Service
Wholesaler/ Head Office
26
Architecture of Price Lookup
Store
Wholesalers system doesnt have the
product either so calls Product Lookup Service
Product Lookup Service
Wholesaler/ Head Office
27
Architecture of Price Lookup
Store
Product Lookup Service returns price to Wholesaler
Product Lookup Service
Wholesaler/ Head Office
28
Architecture of Price Lookup
Store
Wholesaler returns price to store
Product Lookup Service
Wholesaler/ Head Office
29
Architecture of Price Lookup
Store
Pos adds the transaction to the basket
Product Lookup Service
Wholesaler/ Head Office
30
Demo
  • Price Lookup

31
Agenda
  • What are Web Services?
  • The target application price lookup
  • Exposing Progress Business Logic as a Web Service
  • Consuming a Web Service from Progress
  • Our Price Lookup Web Service in action
  • The future of Web Services

32
What is the reality?
  • Interoperability is not guaranteed
  • Most public Web Services are demos only
  • Most real Web Services work is inside the
    enterprise
  • Most real public Web Services are very simple and
    are between trading partners
  • UDDI has not taken off at all
  • However, there are some successful real Web
    Services in particular industries

33
Web Services Journals view
34
Industry view
  • Most real Web Services will be internal or simple
    info supply until the key issues of security and
    workflow are resolved
  • This is a critical mass thing, like fax, email
    and the Internet
  • This technology fulfils a real need, it will
    succeed!

35
?
Questions?
36
Next steps
  • Email me brian_at_bcpsoftware.com
  • Subscribe to Web Services Journal
  • www.sys-con.com
  • See www.xmethods.com, www.salcentral.com
  • See these other talks BP1070, BP1250, BP0240,
    BP0150, BP1030, BP0970, BP0990, BP1040, BP1630
  • Thank you for your time!
Write a Comment
User Comments (0)
About PowerShow.com