No, you need to uses arguments and pass in the form values
you want to use.
Something like this.
<cfinvoke webservice="ws_ReviewSheet"
method="ReviewWS"
argumentCollection="#form#"
returnVariable="response">
</cfinvoke>
<!--- CFC Code --->
<cfcomponent>
<cffunction name="ReviwWS"...>
...
<cfmodule
template="#arguments.FileLoc#"/review_ins.cfm"...
...
</cfcomponent>
cfchick12 wrote:
> Hi,
> Thank you for the response, I guess I can't use form or
request variables. I
> think I have to parse and return response back as a
return value and do my
> inserts. Below is my code, the variables are defined in
the page where I am
> invoking the webservice.
>
> <!---Function Invoked--->
> <cfinvoke
> webservice="ws_ReviewSheet"
> method="ReviewWS"
> returnvariable="response">
> </cfinvoke>
>
> <!---cfc Code--->
> <cfcomponent>
> <cffunction name="ReviewWS" returnType="Struct"
output="false"
> access="remote">
> <cfset response_XML =
XmlParse("\\ServerName\XMLDocuments\Review10.xml")>
>
> <cfset NoOfPeople =
>
ArrayLen(XmlSearch(response_XML,"/p1:ReviewReport/p3:Person"))>
>
> <cftransaction action="BEGIN">
> <cftry>
>
> <cfloop from="1" to="#ListLen(NoOfPeople)#"
index="i">
> <cfmodule template="#Form.FileLoc#/review_ins.cfm"
> review_no="#Form.review_no#"
> user_add="#Request.user_add#"
> source_add="#Request.source_add#"
> seq_no="#i#">
> <cfset response.count = i>
> </cfloop>
> <cfcatch>
> <cftransaction action="ROLLBACK"/>
> <cfrethrow>
> </cfcatch>
> </cftry>
> </cffunction>
> </cfcomponent>
>
>
> Message : Could not perform web service invocation
"ReviewWS".
>
> Detail : Here is the fault returned when invoking the
web service operation:
>
> AxisFault
> faultCode: {
http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode:
> faultString: coldfusion.xml.rpc.CFCInvocationException:
> [coldfusion.runtime.UndefinedElementException : Element
user_add is undefined
> in REQUEST.]
> faultActor:
> faultNode:
> faultDetail:
>
> {
http://xml.apache.org/axis/}stackTrace:coldfusion.xml.rpc.CFCInvocationExcepti
> on: [coldfusion.runtime.UndefinedElementException :
Element user_add is
> undefined in REQUEST.]
> at
>
coldfusion.xml.rpc.CFComponentSkeleton.__createCFCInvocationException(CFComponen
> tSkeleton.java:717)
> at
>
coldfusion.xml.rpc.CFComponentSkeleton.__invoke(CFComponentSkeleton.java:663)
> at ReviewWs.ReviewWS(C:\Inetpub\wwwroot\ReviewWs.cfc)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
> a:25)
> at java.lang.reflect.Method.invoke(Method....
>
>
>