7 Replies Latest reply on Feb 22, 2010 5:08 PM by Adam Cameron.

    adding CFC timeout?

      iam trying add a timeout in a CFC but having some issues with it...I need help...here is my sample CFC which needs a timeout added....could somebody please help me how to add a timeout in the code..i tried requesttimeout using cfsetting but i could not pull WSDL up..

      <cfsetting requesttimeout="30" />
      <cffunction name = "test" access="remote" returntype="struct" output="no">

      <cfargument name="var1" required="true">
      <cfargument name="var2" required="true">
      //Request structure
      stOrder = structNew();
      stOrder.var11 = #arguments.var1#;
      stOrder.var21 = #arguments.var1#;

      //needs a timeout added around this call
      ws = createObject("webservice", "#WebServiceURL#");
      myReturnVar = ws.NewOrder(stOrder); //end of timeout

      <CFSET returnStruct = StructNew()>
      <CFSET structRC = StructInsert(returnStruct, "output", myReturnVar.outputvar1)>
      <cfreturn returnStruct>