On Thu, 7 Oct 2004 19:06:04 -0400, Roland Collins <[EMAIL PROTECTED]> wrote:
> Oh, and if you have a wsdl and/or an open service to test, that would help
> greatly too :)
> 

The wsdl is http://67.52.152.2:8500/testService.cfc?wsdl

This url
http://67.52.152.2:8500/test.cfm is running this code

<cfscript>
       ws = "http://localhost:8500/testService.cfc?wsdl";;
       args = structNew();
       args.dsn = "ttools_sql";
       args.orgID = 1;
</cfscript>

<cfset o = createObject("component", "testService") >
<cfinvoke component="#o#" method="getUsers" returnvariable="result1"
argumentcollection="#args#">
<cfdump var=#result1#>

<cfinvoke webservice="#ws#" method="getUsers" returnvariable="result2"
argumentcollection="#args#">
<cfdump var=#result2#>

testService.cfc is simply
<cfcomponent>
       <cffunction name="getUsers" access="remote" returntype="array"
output="true" hint="returns query of users">
               <cfargument name="dsn" type="string" required="true" />
               <cfargument name="orgID" type="numeric" required="true" />
               <cfset var q = "" />
               <cfset var result = ArrayNew(1) />
               <cfset var userData = "" />
               <cfquery name="q" datasource="ttools_sql">
                       SELECT top 5 userID, username
                       FROM    users
               </cfquery>
               <cfoutput query="q">
                       <cfset userData = createObject("component",
"userData") />
                       <cfset userData.userid = userid />
                       <cfset userData.username = username />
                       <cfset result[currentRow] = userData />
               </cfoutput>
               <cfreturn result />
       </cffunction>
</cfcomponent>

and userData is simply

<cfcomponent>
       <cfproperty name="userid" type="numeric" />
       <cfproperty name="username" type="string" />
</cfcomponent>

All these files are in the default CFMX/www-root.


Any ideas?

Thanks,
Phil
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to