Web Services - Adobe 38000827 - Macromedia ColdFusion MX Standard Edition Evaluator Manual

Evaluator guide
Hide thumbs Also See for 38000827 - Macromedia ColdFusion MX Standard Edition:
Table of Contents

Advertisement

Macromedia® ColdFusion® MX Evaluator's Guide

Web Services

Web services are playing an increasingly important role in the world of web applications
because they help solve a difficult problem for IT organizations – integrating disparate
systems within their own environment or enabling those systems to be used by partners
and customers in a cost-effective and straightforward manner.
Web services are based on the simple object access protocol (SOAP), a platform-
independent, standards-based means for accessing methods or services on remote
applications. Web services enable various types of systems and applications to expose
their functionality as services that can be invoked across the Internet.
As with other Internet programming tasks, ColdFusion MX enables developers to access
the power of web services without being forced to deal with the many low-level details of
the technology. In ColdFusion MX, developers can create and consume web services
using CFML and ColdFusion components. As a result, ColdFusion developers can easily
create web services for reuse by other ColdFusion developers or by developers using
other technologies that support web services, such Microsoft ASP.NET and the
Java/J2EE platform. Conversely, ColdFusion applications can also consume web
services created using these other technologies.
Consuming Web Services in ColdFusion MX
Invoking, or consuming, a web service in ColdFusion MX is done with the same easy to
use syntax involved in invoking a ColdFusion component. The developer simply specifies
the location of the service and passes it the appropriate input parameters. ColdFusion MX
automatically handles interaction with the SOAP protocol – parsing the interface
description associated with the service, generating the necessary client proxies, and
marshalling the input and output parameters to and from the service. For example, the
following code invokes a currency exchange web service published at Xmethods.net.
<cfinvoke
webservice="http://www.xmethods.net/sd/2001/CurrencyExchangeService.wsdl"
method="getRate" returnVariable="convertPrice">
<cfinvokeargument name="country1" value="USA">
<cfinvokeargument name="country2" value="Euro">
</cfinvoke>
Performing the equivalent task in other programming environments usually involves a
lengthier and more complex set of object calls and proxy creation. As a result, working
with web services is more time-consuming and the code is harder to maintain.
Integrated support for web services in the Dreamweaver MX development environment
makes working with web services even easier for the ColdFusion developer. As shown in
the figure below, developers can introspect web services and their methods from within
the Dreamweaver MX IDE. Once they have located the correct method, they can then
drag it into the editor and automatically generate the code for invoking it.
18

Advertisement

Table of Contents
loading

This manual is also suitable for:

Macromedia coldfusion mx

Table of Contents