Home / Articles / Adobe ColdFusion / Adobe ColdFusion 10 and SOAP-based Web Services

Adobe ColdFusion 10 and SOAP-based Web Services

Chapter Description

A web service is a web-based application or a network-accessible interface that can communicate and exchange data with other such applications over the Internet without regard for application, platform, syntax, or architecture. ColdFusion supports most of the messaging frameworks and protocols required to effectively communicate with different platforms, and web services are no exception.This chapter focuses primarily on using ColdFusion 10 with SOAP-based web services.

Configuring Web Services in ColdFusion Administrator

The ColdFusion Administrator lets you register a web service with a name. You can do so by adding a web service on the Web Services page in the ColdFusion Administrator in the Data and Services section. When you reference that web service in your code with this name, you won’t have to specify the URL or any other details for the web service call. For example, any time you invoke a web service registered as ZipCodeWS on a particular server, you can refer to it as WebService="ZipCodeWS". The URL can then be changed to point to another URL without the need to modify the invocation code throughout the application. This approach represents a type of code encapsulation, which you could also implement using application or request scope variables.

With ColdFusion 10, you can also specify proxy settings such as the proxy server, proxy port, proxy username, and proxy password, and a server-level setting to cause any web service request to time out at a particular time. When you call this web service by its name at the time of registration, you need not specify these settings again. However, settings provided at the time of the actual web service call, such as a <cfinvoke> call, will override server-level settings.

Note that just accessing any web service from user code will not autoregister or change that web service in ColdFusion Administrator, which used to happen until ColdFusion 9. With ColdFusion 10, to register a web service in ColdFusion Administrator you need to add or modify it from the Administrator only.

8. Best Practices | Next Section Previous Section