For posterity sake... I found a work around for this
The only way to make both the cfm and web services calls to components work
with direct references to locations within your components (i.e.
myvirtualdir.com.myapp.mycomponent) is by adding a path with my virtual
directory to the jrun-web.xml configuration file as follows:
<virtual-mapping>
<resource-path>/myvirtualdir</resource-path>
<system-path>e:/inetpub/wwwroot/myvirtualdir</system-path>
</virtual-mapping>
FYI Related is Issue:
expandPath("/mapping/filename.ext") works on Solaris and Mac OS X (the
/mapping is correctly expanded) but not on Windows. (Bug #53683)
Thanks.
Jose.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Alfonso, Jose BGI SF
Sent: Monday, November 03, 2003 3:41 PM
To: '[EMAIL PROTECTED]'
Subject: [CFCDev] CFC calls Question
Hi,
I am having trouble with a component I want to be able to run both as a web
service and from call from within cfm's. I am trying to create a 'facade' of
sorts to other components in my app.
This is on IIS 5 on a Windows 2000 and the site is setup in an intranet
virtual dir and I believe this is also true I believe in shared host
environments.
If I remove the 'myvirtualdir' part of the path in my facade component it
works for the webservice call, but not in the cfm call and vice-versa. It
seems like I might be missing something real basic here...
Thanks in advance.
Jose.
My simple test component just returns a string and it is located in the
\myvirtualdir\com folder:
<cfcomponent><--- I don't want these components to have remote access -->
<cffunction name="getstring" access="public" returntype="string">
<cfargument name="myArgument" type="string" required="true">
<cfset myResult="foo">
<cfreturn myResult>
</cffunction>
</cfcomponent>
The 'facade' component that calls that component follows:
</cfcomponent>
<cffunction access="remote" name="getdata" returntype="string">
<cfargument name="myArgument" type="string" required="true">
<cfset var sReturned = "">
<cfinvoke
component="/myvirtualdir/com/bgi/test/bgitest"
method="getstring"
myArgument="#arguments.myArgument#"
returnvariable="sReturned">
<cfreturn "test data access string - #arguments.myArgument#
and the returned string is #sReturned#" />
</cffunction>
</cfcomponent>
My cfm call is this and it works if the virtual dir is specified in the
component call:
<cfinvoke
component="myvirtualdir.com.dataaccess"
method="getstring"
returnvariable="sMyString">
<cfinvokeargument name="myArgument" value="Just a string">
</cfinvoke>
<cfdump var="#sMyString#">
My webservice call is this and it works only if the path begins with com in
the component call above.
<!--- test web service call --->
<cfinvoke
method="getdata"
returnvariable="qData"
webservice='http://shareitdev/com/dataaccess.cfc?WSDL'>
<cfinvokeargument name="myArgument" value="My Test String">
</cfinvoke>
<cfdump var="#qData#">
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]