Adobe COLDFUSION 9 Manual page 1120

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
<cfcomponent>
<cffunction
name = "showSOAPHeaders"
returnType = "string"
output = "no"
access = "remote"
hint="After calling this function, use GetSOAPRequest and GetSOAPResponse to view
headers">
<cfset var xml_obj = "">
<cfset var ret = "">
<cfif IsSOAPRequest()>
<!--- Define a response header --->
<cfsavecontent variable="response_xml">
<ThisResponseHeader xmlns="http://www.cfdevguide.com">
<CreatedDateTime><cfoutput>#now()#</cfoutput></CreatedDateTime>
<ExpiresInterval>6000</ExpiresInterval>
</ThisResponseHeader>
</cfsavecontent>
<cfset xml_obj = xmlparse(response_xml)>
<!--- Add the response header --->
<cfscript>
addSOAPResponseHeader("http://www.cfdevguide.com/", "testresponseheader", "#xml_obj#");
ret = "Invoked as a web service. Use GetSOAPRequest and GetSOAPResponse to view headers.";
</cfscript>
<cfelse>
<cfset ret = "Not invoked as a web service">
</cfif>
<cfreturn ret>
</cffunction>
</cfcomponent>
Handling complex data types
When dealing with web services, handling complex types falls into the following categories:
• Mapping the data types of a web service to consume to ColdFusion data types
• Understanding how clients reference your ColdFusion data types when you publish a web service
Consuming web services that use complex data types
The following table shows how WSDL data types are converted to ColdFusion data types:
ColdFusion data type
numeric
Boolean
string
array
numeric
binary
WSDL data type
SOAP-ENC:double
SOAP-ENC:boolean
SOAP-ENC:string
SOAP-ENC:Array
SOAP-ENC:float
xsd:base64Binary
Last updated 8/5/2010
1115

Advertisement

Table of Contents
loading

Table of Contents