ColdFusion%20MX%20and%20Web%20Services - PowerPoint PPT Presentation

About This Presentation
Title:

ColdFusion%20MX%20and%20Web%20Services

Description:

Senior Application Architect with Automation Creations in Blacksburg, Virginia, USA. ... Examine how to create your own web services with ColdFusion MX ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 22
Provided by: ross69
Category:

less

Transcript and Presenter's Notes

Title: ColdFusion%20MX%20and%20Web%20Services


1
ColdFusion MX and Web Services
  • From Creation and Consumption

2
Introduction Neil Ross
  • Senior Application Architect with Automation
    Creations in Blacksburg, Virginia, USA.
    neil_at_aciwebs.com / http//www.aciwebs.comFreela
    nce application development as Codesweeper.
    neil_at_codesweeper.com / http//www.codesweeper.com
  • Certifications ColdFusion Developer and
    ColdFusion Instructor
  • Author Inside ColdFusion MXhttp//www.insidecold
    fusionmx.com as well as online and CFDJ articles
  • Speaker ColdFusion DevCon 2000 in DC, CFUGs,
    MMUGs, CFEurope 2003
  • Founder and former manager of Central Penn
    CFUGCurrently manager and founder of Southwest
    Virginia MMUG

3
Overview
  • Explain Web Services
  • Examine how to create your own web services with
    ColdFusion MX
  • Examine how to consume an existing web service in
    ColdFusion MX
  • Examine how to publish your web services for
    consumption by the world

4
What are Web Services?
  • Web services encapsulate existing business
    processes for publishing to the web
  • A Web Service is a URL-addressable software
    resource that perform one or more functions
  • Web Services communicate using standard protocol
    known as SOAP (Simple Object Access Protocol)

5
Characteristics
  • A web service is accessible over the web
  • Web services communicate using platform-independen
    t and language-neural web protocols
  • A web service provide an interface to be called
    by other programs
  • A web service can be registered and located
    through a web service registry

6
What would you use them for?
  • Expose existing resources to the web
  • Develop new applications from web services
  • Separate business logic from UI components
  • Bundle common functionality across web services
  • Provide Security (Authentication, Authorization)
  • Provide consistency among services

7
Common Web Services
  • Examples of web services include the following
  • User authentication and authorization
  • Credit card validation
  • Stock quotes
  • E-commerce
  • News and information syndication

8
What do they look like?
9
Parts of a Web Service
  • Web services consist of the following basic
    components
  • Publishers create and provide application
  • Brokers maintain a registry of service
    providers
  • Consumers web pages that access and use the
    remote web service

10
Creating ColdFusion Components
  • ColdFusion components are the gateway to web
    services in ColdFusion MX
  • Write a bunch of code thats really complicated
    to write the XML that comprises your WSDL
    document??? NO!!!
  • First step is to create a ColdFusion Component
    and its very very easy to do

11
CFC Code view
Using code view in Dreamweaver MX, select Filegt
Newgt, then select Dynamic Page from the Category
menu and ColdFusion Component from the Dynamic
Page menu
  • lt!--- creating a ColdFusion component in code
    view ---gt
  • ltcfcomponentgt
  • ltcffunction name"myFunction" access"public"
    returntype"string"gt
  • ltcfargument name"myArgument" type"string"
    required"true"gt
  • ltcfset myResult"foo"gt
  • ltcfreturn myResultgt
  • lt/cffunctiongt
  • lt/cfcomponentgt

12
CFC wizard view
Select the button on the component tab within
the Application panel in DWMX
Fill out information requested within the Create
Component window.
13
View and Test your CFC
  • Of course, you dont want to assume that your CFC
    works properly without proper testing
  • From the components tab in the Application panel,
    expand the component, then select the function to
    call
  • Drag and drop the selected component function
    into your CFML template

lt!--- invoke the ColdFusion component
---gt ltcfinvoke component"cdsettlement.act.users"
method"authenticate_user"
returnvariable"authenticate_userRet"gt
ltcfinvokeargument name"username"
value"enter_value_here"/gt
ltcfinvokeargument name"password"
value"enter_value_here"/gt lt/cfinvokegt
14
Creating the Web Service
  • Select the Components in the Application Panel
  • Select Web Services from the select menu
  • Type in the URL of the WSDL file or the CFC with
    ?WSDL appended
  • Thats it click OK and it will be added to your
    list of available web services

15
Consuming Web Services
  • Connecting programmatically to a Web service is
    known as consuming it.
  • First find the web service that you want to
    connect to
  • Write a bunch of code thats really complicated
    so that you can connect to the web service but
    only if you know everything about the web service
    and its in/out parameters ???
  • NO!!!

16
Consuming Web Services
  • Select the Components in the Application Panel
  • Select Web Services from the select menu
  • Drag and drop the web services function into the
    code editor

17
Web Services in the Real World
  • Currency exchange rates and conversion

18
Web Services in the Real World
  • Currency exchange rates and conversion code

19
Finding Web Services
  • Web services exist in UDDI registries
  • UDDI Universal Description, Discovery and
    Integration

20
Finding Web Services
  • Microsoft UDDI Business Registry
  • IBM Web Services and UDDI
  • Xmethods

21
Conclusion
  • Web Services dont have to be a mystery
  • CFMX allows for the easiest implementation of Web
    Services
  • Dreamweaver MX and ColdFusion MX for web services
    are the shizzle, fo sheezy!
  • For more information, contact me
    atneil_at_aciwebs.com
Write a Comment
User Comments (0)
About PowerShow.com