Excellent and thanks for the quick response!

New to java so please bare with me.

Question:
-------------
1. What is javacall / its purpose?
2. Would I have to import the com.newatlanta.cfc.CFCProxy or
java.util.Map or java.io.Writer at the top of the .java file?
3. In [Object[] myArgs = {"Java invocation working"};], where you have
"Java invocation working", could you provide a sample syntax of real
data/object I would put in there if my cfc was expecting say 3 strings
like sendTo, sendFrom & messageBody?
4. If a CFC does pass back a response, I could then access the
response by the myCFC object correct?
5. I can see that in the example that getData is the called CFC.  How
do you reference a path to the CFC if it is not in the same
directory?





On Nov 12, 11:05 pm, Paul Bonfanti <[email protected]> wrote:
> Yes you can invoke a cfc from a servlet using the following syntax. Note that 
> request is the servlet request object, response is the servlet response 
> object, and out is a java.io.Writer where the output from the cfc is written. 
> The invoke() method returns an object so you'll need to cast it to the type 
> returned by the cfc. In the case below the cfc is returning a java.util.Map 
> object.
>
> com.newatlanta.cfc.CFCProxy myCFC = new 
> com.newatlanta.cfc.CFCProxy("javacall", request, response, out);
> Object[] myArgs = {"Java invocation working"};
> java.util.Map map = (java.util.Map)myCFC.invoke("getData", myArgs);
>
> If the cfc doesn't generate any output then you don't need to pass a 
> java.io.Writer as shown below:
>
> com.newatlanta.cfc.CFCProxy myCFC = new 
> com.newatlanta.cfc.CFCProxy("javacall", request, response);
> Object[] myArgs = {"Java invocation working"};
> java.util.Map map = (java.util.Map)myCFC.invoke("getData", myArgs);
>
> Paul
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of 
> BD_Architect
> Sent: Thursday, November 12, 2009 10:45 PM
> To: Open BlueDragon
> Subject: [OpenBD] Execute CFC from Java
>
> Is there a simple way to invoke a cfc from a java file?  I see that
> there is a CFCProxy for adobe, is this (or similar) also available in
> openBD.
>
>
--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official site @ http://www.openbluedragon.org/

!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to