Add a web service to a page – Adobe Dreamweaver CS3 User Manual
Page 595
DREAMWEAVER CS3
User Guide
588
3
Complete the UDDI Sites dialog box, and click Done.
•
To add a new site, or modify an existing one, click the New or Edit button. Enter the name and URL of a UDDI
website, and click OK.
•
To remove an existing site, select it from the list, and click the Remove button.
Add a web service to a page
After selecting a web service, generating its proxy, and adding it to the Components panel, you insert it in a page.
The following example shows the Components panel with the web service proxy
Helloworld
added. The
Helloworld
proxy provides one method,
sayHello
, which prints “Hello World.”
The following example instantiates the
HelloWorld
web service using ColdFusion.
1
In the Document window, in Code view, drag the
sayHello
method into the page’s HTML.
Dreamweaver adds the method and dummy parameters to the page.
2
Edit the inserted code with appropriate service instance names, data types, and parameter values, as required by
the web service. The web service provides descriptions of the data types and parameter values.
In the following ColdFusion example, the web service is enclosed by the
tags. When developing a web
service in ColdFusion, use
to instantiate the web service and invoke its methods.
webservice="http://www.mysite.com:8500:8500/helloworld/HelloWorld.cfc?wsdl" method="sayHello" returnvariable="aString">