This function can create a web service object.
A web service object.
CreateObject
(type, urltowsdl [, portname ])
Parameter | Description |
type |
Type of object to create.
|
urltowsdl |
WSDL file URL; location of web service |
portname |
The port name for the web service. This value is case-sensitive and corresponds to the Specify this parameter if the web service contains multiple ports. If no port name is specified, ColdFusion uses the first port found in the WSDL. |
You can use the CreateObject
function to create a web service.
<cfscript> ws = CreateObject("webservice", "http://www.xmethods.net/sd/2001/TemperatureService.wsdl"); xlatstring = ws.getTemp(zipcode = "55987"); writeoutput("The temperature at 55987 is " & xlatstring); </cfscript>