MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Using Manual - page 586
586
Chapter 37: Using Web Services
Adding a web service to a page
After selecting a web service, generating its proxy, and adding it to the Components panel, you
can insert it into a page.
The illustration below 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. To learn more
about creating a web services, and to see additional examples using .NET and JSP, visit the
Macromedia Support Center at:
www.macromedia.com/go/creating_web_services
.
To add a web service to a page:
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 should provide descriptions of the data
types and parameter values.
In the ColdFusion example shown below, 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">