:disgust;
Newbie trying to understand how to work with Complex Data Type. Came across
the following example in the Dev Guide
What is wrong with Client Code? What am I missing?
Please help
Thanks
Prashanth
<!--- Component defining complex Data Type called "name" (Saved within
name.cfc) --->
<cfcomponent>
<cfproperty name="Firstname" type="string">
<cfproperty name="Lastname" type="string">
</cfcomponent>
<!--- Web Service Function --->
<cfcomponent>
<cffunction name="echoName" returnType="name" access="remote" output="false">
<cfargument name="input" type="name">
<Cfset input.firstname="First Name">
<CfSet input.lastname="Last Name">
<cfreturn #arguments.input#>
</cffunction>
</cfcomponent>
<!--- Client trying to Access the Webservice Function echoName --->
<cfinvoke
webservice="http://localhost:8500/SampleSites/DataTypeComponent.cfc?wsdl"
method="echoName"
returnvariable="aName">
<cfinvokeargument name="input" value="aName"/>
<cfoutput> #aName.firstname# </cfoutput>
</cfinvoke>
mrampson - 29 Jul 2006 23:05 GMT
I believe the complex types must be their own cfcs, separate from the service.
engineer2100 - 31 Jul 2006 04:31 GMT
And That's what I did. [b] name.cfc [/b] is the component that has complex data types created.