As of ColdFusion (2021 release), CORBA has been removed. You can no longer use CORBA-related features, functions, and tags.
This function can create a web service object.
A web service object.
History
ColdFusion 10: Added argument wsversion.
CreateObject(type, urltowsdl[, portname, wsdl2JavaArgs,wsVersion]) OR CreateObject(type, urltowsdl, argStruct)
Parameter |
Description |
|---|---|
type |
Type of object to create.
|
urltowsdl |
Specifies the URL to web service WSDL file. One of the following:
|
portname |
The port name for the web service. This value is case-sensitive and corresponds to the port element's name attribute under the service element. 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. |
wsdl2JavaArgs |
A string containing a space-delimited list of arguments to pass to the WSDL2Java tool that generates Java stubs for the web services. Useful arguments include the following:
|
argStruct wsVersion |
A structure containing web service configuration arguments. For more information see Usage Specifies version of the axis to be used. If the wsversion is specified as "1", then axis 1 will be used. If it is "2", then axis 2 will be used. |
authType |
The authentication type to use. You can use NTLM or BASIC. |
ntlmdomain |
Host name of the domain controller. Note: When a user is part of a domain, the ntlmDomain attribute is mandatory. When a user is not part of a domain, the ntlmDomainattribute is not mandatory. |
workstation |
Host name of the client machine. |
You can use the CreateObject function to create a web service. The argStruct structure can contain any combination of the following values:
Name |
Default |
Description |
|---|---|---|
password |
Password set in the Administrator, if any |
The password to use to access the web service. If the webservice attribute specifies a web service name configured in the Administrator, overrides any user name specified in the Administrator entry. |
port |
|
See portname in the Syntax Parameter table. |
proxyPassword |
http.proxyPassword system property, if any |
The user's password on the proxy server. |
proxyPort |
http.proxyPort system property, if any |
The port to use on the proxy server. |
proxyServer |
http.proxyHost system property, if any |
The proxy server required to access the webservice URL. |
proxyUser |
http.proxyUser system property, if any |
The user ID to send to the proxy server. |
refreshWSDL |
no |
|
saveJava |
no |
|
timeout |
0 (no time-out) |
The time-out for retrieving the web service WSDL, in seconds. |
username |
User name set in the Administrator, if any |
The user name to use to access the web service. If the webservice attribute specifies a web service name configured in the Administrator, overrides any user name specified in the Administrator entry. |
wsdl2javaArgs |
|
See the Syntax parameter table. |
<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>
<cfscript>
wsobj = createObject("webservice", "http://localhost/AxisWs/services/Converter?wsdl",{refreshwsdl=true,username="user name",password="password",
authtype="NTLM",workstation="workstation",ntlmdomain="ntlmdomain",wsversion=2});
</cfscript>
Sign in to your account