Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / July 2006



Tip: Looking for answers? Try searching our database.

Web Services Complex Data Type Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
engineer2100 - 29 Jul 2006 12:33 GMT
: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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.