Handling inout and out parameters

Some web services define inout and out parameters. You use out parameters to pass a placeholder for a return value to a web service. The web service then returns its result by writing it to the out parameter. Inout parameters let you pass a value to a web service and lets the web service return its result by overwriting the parameter value.

The following example shows a web service that takes as input an inout parameter containing a string and writes its results back to the string:

<cfset S="foo">
<cfscript>
   ws=createobject("webservice", "URLtoWSDL")
   ws.modifyString("S");
<cfscript>
<cfoutput>#S#</cfoutput>

Even though this web service takes as input the value of S, because you pass it as an inout parameter, you do not enclose it in number signs.

Note: ColdFusion MX supports the use of inout and out parameters to consume web services. However, ColdFusion MX does not support inout and out parameters when creating web services for publication.


View comments in LiveDocs