Re: cfc and saas
Thanks you all. I got it. Here it is, and it is vey cl! Create this cfc on one machine with database access. The output=No is important. The access=remote is important. The returntype=query is important Save it as Vendors.cfc !--- Vendors.cfc --- cfcomponent displayname=Vendors hint=Obtains all Vendor for the Purchasing Application output=No !--- Remote Functions --- cffunction access=remote name=GetVendor_Remote output=no returntype=query displayname=GetVendor_Remote hint=Calls dbo.usp_VENDOR_Select_xxx cfargument name=getType default=ALL type=String required=yes cfargument name=Vendor_ID default=0 type=Numeric required=no cfswitch expression=#arguments.getType# cfcase value = SINGLE cfstoredproc procedure=usp_VENDOR_Select datasource=#application.datasource# returncode=No cfprocparam dbvarname=Vendor_ID type=In cfsqltype=CF_SQL_INTEGER value=#arguments.Vendor_ID# / cfprocresult name=qVendors /cfstoredproc /cfcase cfdefaultcase cfstoredproc procedure=usp_VENDOR_Select_All datasource=#application.datasource# returncode=No cfprocresult name=qVendors /cfstoredproc /cfdefaultcase /cfswitch cfreturn qVendors /cffunction /cfcomponent Create this cfm page on ONE OR MORE webservers! !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleUntitled/title /head body cfinvoke webservice=http://localhost/Purchasing/Vendor.cfc?wsdl; method=GetVendor_Remote refreshwsdl=true returnvariable=qVendor cfinvokeargument name=getType value=SINGLE cfinvokeargument name=Vendor_ID value=40 /cfinvoke cfdump expand=Yes var=#qVendor# / /body /html Notes: 1. Taging the function as access=remote publishes it as a web service. 2. Taging the invoke with webservice attribute consumes the webservice. 3. CF take care of handling all the json or xml protocols between the two servers. 4. You can also see the results as wddxPacket (xml) directly in your browser http://localhost/Purchasing/Vendor.cfc?method=GetVendor_Remote 5. Pass parameters on the command line http://localhost/Purchasing/Vendor.cfc?method=GetVendor_RemotegetType=SINGLEVendor_ID=44 6. Needless to say you can do any type of processing in the cfc, not just query data. Nick Stein ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300758 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfc and saas
Anyone know how to call a cfc function on another machine? Suppose I have a cfc in a file called vendor.cfc. When it resides on the same machine as the web server, it is a piece of cake to call... cfinvoke component=Vendor method=getVendor returnvariable=qVendor cfinvokeargument name=Vendor_ID value=#Vendor_ID# /cfinvoke How would I change this to call it on another machine, say 192.168.168.19? Make it a web service. There's no RPC protocol like DCOM or CORBA for CF. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.com/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300685 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfc and saas
I dont believe CF allows you to bridge them like that. The only way I can think of would be to call it as a webservice over standard http / https protocols =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300686 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfc and saas
On Thu, Mar 6, 2008 at 1:49 PM, Nicholas Stein [EMAIL PROTECTED] wrote: Anyone know how to call a cfc function on another machine? Suppose I have a cfc in a file called vendor.cfc. When it resides on the same machine as the web server, it is a piece of cake to call... cfinvoke component=Vendor method=getVendor returnvariable=qVendor cfinvokeargument name=Vendor_ID value=#Vendor_ID# /cfinvoke How would I change this to call it on another machine, say 192.168.168.19? set the cffunction to be access=remote and call it as a webservice. http://livedocs.adobe.com/coldfusion/8/htmldocs/webservices_17.html -- Evelyn the dog, having undergone further modification pondered the significance of short-person behaviour in pedal depressed, pan-chromatic resonance, and other highly ambient domains. Arf, she said. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300687 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfc and saas
You know.. that would be a fun project... RPC for CFCs... Mark On Fri, Mar 7, 2008 at 9:06 AM, Dave Watts [EMAIL PROTECTED] wrote: Anyone know how to call a cfc function on another machine? Suppose I have a cfc in a file called vendor.cfc. When it resides on the same machine as the web server, it is a piece of cake to call... cfinvoke component=Vendor method=getVendor returnvariable=qVendor cfinvokeargument name=Vendor_ID value=#Vendor_ID# /cfinvoke How would I change this to call it on another machine, say 192.168.168.19? Make it a web service. There's no RPC protocol like DCOM or CORBA for CF. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.com/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300688 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfc and saas
How about adding a mapped drive to the other machine and add a mapping to that location. Regards Dale Fraser http://learncf.com -Original Message- From: Nicholas Stein [mailto:[EMAIL PROTECTED] Sent: Friday, 7 March 2008 8:50 AM To: CF-Talk Subject: cfc and saas Anyone know how to call a cfc function on another machine? Suppose I have a cfc in a file called vendor.cfc. When it resides on the same machine as the web server, it is a piece of cake to call... cfinvoke component=Vendor method=getVendor returnvariable=qVendor cfinvokeargument name=Vendor_ID value=#Vendor_ID# /cfinvoke How would I change this to call it on another machine, say 192.168.168.19? Thanks, Nick ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300690 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfc and saas
Mapping a drive on server 1 from server 2 would share the cfc, but then depending on what that cfc did, it would be using server 1s resources not server 2, which I believe may be the goal. Otherwise it would be easier to just copy the file. On Thu, Mar 6, 2008 at 3:39 PM, Dale Fraser [EMAIL PROTECTED] wrote: How about adding a mapped drive to the other machine and add a mapping to that location. Regards Dale Fraser http://learncf.com -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300696 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4