here input is in xml format and output is also in xml format

Index.cfm

<cfinvoke
method=”methodName” //define the structure
returnvariable=”variableName” // return variable name

webservice=”webserviceName”>//define the webservice name(mapping for webservic ein coldfusion administrator) or the url like this(http://localhost/foldername/Filename.cfc?wsdl)  Filename is the file where to execute function “methodName”.

<cfinvokeargument name=”ArgumentName” value=”#ArgumentValue#”>
</cfinvoke>

Below two lines are used to show the returned data in xml format in the webbrowser.

<cfsetting enableCFoutputOnly = “yes” showDebugOutput = “no” />
<cfcontent type=”text/xml;charset=utf-8″><cfoutput>#variableName#</cfoutput>

 

to call webservice :-

http://localhost/index.cfm

 

way to create webservice in coldfusion

Leave a Reply

Your email address will not be published.