purabk
2007-12-03 20:24:41 UTC
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" />
<cfcomponent>
<cffunction name = "test" access="remote" returntype="struct" output="no">
<cfargument name="var1" required="true">
<cfargument name="var2" required="true">
<cfscript>
//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
</cfscript>
<CFSET returnStruct = StructNew()>
<CFSET structRC = StructInsert(returnStruct, "output",
myReturnVar.outputvar1)>
<cfreturn returnStruct>
</cffunction>
</cfcomponent>
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" />
<cfcomponent>
<cffunction name = "test" access="remote" returntype="struct" output="no">
<cfargument name="var1" required="true">
<cfargument name="var2" required="true">
<cfscript>
//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
</cfscript>
<CFSET returnStruct = StructNew()>
<CFSET structRC = StructInsert(returnStruct, "output",
myReturnVar.outputvar1)>
<cfreturn returnStruct>
</cffunction>
</cfcomponent>