Question
Aren't web services supposed to be easy?
my web service.
<cfcomponent>
<cfproperty name="id" default="10" type="numeric">
<cfset variables.id = 10>
<cffunction name="setId" access="remote" returntype="void">
<cfargument name="id" type="numeric" required="yes">
<cfset variables.id = arguments.id>
</cffunction>
<cffunction name="getId" access="remote" returntype="numeric">
<cfreturn variables.id>
</cffunction>
</cfcomponent>
my test page.
<p>Call component as web service</p>
<cfset myWS = createObject("webservice","http://10.104.106.39:8080/ian.cfc?wsdl")>
<cfoutput>#myWS.getId()#</cfoutput>
<cfset myWS.setId(888)>
<cfoutput>#myWS.getId()#</cfoutput>
<cfdump var="#myWS#">
Both outputs are outputing the same value of 10. The web service does not seem to be maintaining state from one method call to another.
