Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Services 1

Status
Not open for further replies.

CTekMedia

Programmer
Oct 5, 2001
634
US
These examples work:

<!---
<CFCOMPONENT OUTPUT="NO">
<CFFUNCTION NAME="getGUID" RETURNTYPE="GUID" ACCESS="REMOTE" OUTPUT="FALSE">
<CFRETURN insert("-", createUUID(), 23)>
</CFFUNCTION>
</CFCOMPONENT>

OR

<CFCOMPONENT OUTPUT="NO">
<CFFUNCTION NAME="getSessionID" RETURNTYPE="NUMERIC" ACCESS="REMOTE" OUTPUT="FALSE">
<CFRETURN 123>
</CFFUNCTION>
</CFCOMPONENT>

OR

<CFSET VARIABLES.XYZ = 124>
<CFFUNCTION NAME="getSessionID" RETURNTYPE="NUMERIC" ACCESS="REMOTE" OUTPUT="FALSE">
<CFRETURN #XYZ#>
</CFFUNCTION>
</CFCOMPONENT>

But this doesn't:

<CFSET VARIABLES.XYZ = "A124">
<CFFUNCTION NAME="getSessionID" RETURNTYPE="STRING" ACCESS="REMOTE" OUTPUT="FALSE">
<CFRETURN #XYZ#>
</CFFUNCTION>
</CFCOMPONENT> --->

Any suggestions? I'm stumped

Cheers,

Bluetone
 
i tried with a test component:
Code:
<cfcomponent>
<CFSET VARIABLES.XYZ = "A124">
<CFFUNCTION NAME="getSessionID" RETURNTYPE="STRING" ACCESS="REMOTE" OUTPUT="FALSE">
<CFRETURN #XYZ#>
</CFFUNCTION>
</cfcomponent>

called it and i got back A124 just as i expected, can you elaborate a little more?

=========================================
Don't sweat the petty things and don't pet the sweaty things.
 
ahh, i now see from the title this is a web service.. i guess that changes things

=========================================
Don't sweat the petty things and don't pet the sweaty things.
 
i tested it out as a web service, this function:
Code:
<cfcomponent>
<CFSET VARIABLES.XYZ = 'A124'>
<CFFUNCTION NAME="getSessionID" RETURNTYPE="string" ACCESS="REMOTE" OUTPUT="FALSE">

<CFRETURN #XYZ#>
</CFFUNCTION>
</cfcomponent>

called like:
Code:
and it also worked as expected, maybe you need to clear your wsdl cache in the cf server?
<cfset testCom = CreateObject("webservice","[URL unfurl="true"]http://www.mysite.com/pathTo/test.cfc?wsdl")>[/URL]

<cfdump var="#testCom.getSessionID()#">

=========================================
Don't sweat the petty things and don't pet the sweaty things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top