For the complete experience, please enable JavaScript in your browser. Thank you!

  • Creative Cloud
  • Photoshop
  • Illustrator
  • InDesign
  • Premiere Pro
  • After Effects
  • Lightroom
  • See all
  • See plans for: businesses photographers students
  • Document Cloud
  • Acrobat DC
  • eSign
  • Stock
  • Elements
  • Marketing Cloud
  • Analytics
  • Audience Manager
  • Campaign
  • Experience Manager
  • Media Optimizer
  • Target
  • See all
  • Acrobat Reader DC
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player
  • All products
  • Creative Cloud
  • Individuals
  • Photographers
  • Students and Teachers
  • Business
  • Schools and Universities
  • Marketing Cloud
  • Document Cloud
  • Stock
  • Elements
  • All products
  • Get Support
    Find answers quickly. Contact us if you need to.
    Start now >
  • Learn the apps
    Get started or learn new ways to work.
    Learn now >
  • Ask the community
    Post questions and get answers from experts.
    Start now >
    • About Us
    • Careers At Adobe
    • Investor Relations
    • Privacy  |  Security
    • Corporate Responsibility
    • Customer Showcase
    • Events
    • Contact Us
News
    • 3/22/2016
      Adobe Summit 2016: Are You An Experience Business?
    • 3/22/2016
      Adobe Announces Cross-Device Co-op to Enable People-Based Marketing
    • 3/22/2016
      Adobe and comScore Advance Digital TV and Ad Measurement
    • 3/22/2016
      Adobe Marketing Cloud Redefines TV Experience
CFML Reference / 

CreateObject: web service object

Adobe Community Help


Applies to

  • ColdFusion

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

Description

This function can create a web service object.

Returns

A web service object.

Function syntax

CreateObject(type, urltowsdl[, portname, wsdl2JavaArgs])

OR

CreateObject(type, urltowsdl, argStruct)

Parameters

Parameter

Description

type

Type of object to create.

  • com
  • corba
  • java
  • component
  • webservice
    The default value of type is component.

urltowsdl

Specifies the URL to web service WSDL file. One of the following:

  • The absolute URL of the web service
  • The Name (string) assigned in the ColdFusion Administrator to the web service

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:

  • W or -noWrapped: Turns off the special treatment of wrapped document/literal style operations.
  • a or -all: Generates code for all elements in the WSDL, even unreferenced ones.
  • w or -wrapArrays: Prefers building beans to straight arrays for wrapped XML array types. This switch is not in included in the Axis documentation.
    For detailed information on valid arguments, see the Apache Axis WSDL2Java Reference.

argStruct

A structure containing web service configuration arguments. For more information see Usage

Usage

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

  • yes: Reload the WSDL file and regenerate the artifacts used to consume the web service
  • no

saveJava

no

  • yes: Save the Java generated by the WSDL2Java converter that generates Java web service stubs. This code can be useful in debugging errors.
  • 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.

Example

<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>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Choose your region United States (Change)   Products   Downloads   Learn & Support   Company
Choose your region Close

Americas

Europe, Middle East and Africa

Asia Pacific

  • Brasil
  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Cyprus - English
  • Česká republika
  • Danmark
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Greece - English
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • Malta - English
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • Southeast Asia (Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam) - English
  • 台灣

Commonwealth of Independent States

  • Includes Armenia, Azerbaijan, Belarus, Georgia, Moldova, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine, Uzbekistan

Copyright © 2016 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

AdChoices