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 outputting the same value of 10.  The web service does 
not seem to be maintaining state from one method call to another.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329469
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to