Curiously, it's only available when you invoke a web service using createObject(), not CFOBJECT or CFINVOKE.
It's enabled using the new ArgStruct argument that I discussed last month.
wsargs = structnew();
You may wonder why you have to put it in this argStruct when it's the only key being put in the structure. That's just the way it is. Of course, I could have created the structure using the new implicit array creation syntax, as in:
which replaces 2 lines with 1.
For those who don't care for CFSCRIPT
Of course, you don't need to use CFSCRIPT to use createObject, for those not comfortable with it. I could just as well have done it all in tags, as:
Where the Java source is placedSo where is the Java placed? In the same directory where the java proxy stubs have been placed since CF6: [coldfusion]/stubs/. In the case of the standalone version of CF8, that might be c:\coldfusion8\stubs.
Each invocation of a web service in CF (whether you use the saveJava option or not) will create a directory there, typically in a form like WS729914123 (one for each separate web service invoked by any CFML requests), and within the subdirectories of that directory you'll find class files reflecting the name of the called web service.
If you don't use the saveJava option, you'll see only class files. If you'll see corresponding .java source files for each.
Finally, note that the Java source files will be removed automatically if the web service is refreshed (manually or in the CF Admin) and you call it without the SaveJava option (which also means if you invoke it using CFOBJECT or CFINVOKE).
(*Update*: In the original entry, I said the source would be removed if you called the web service without the SaveJava option, but I should clarify that it's if you do that and you cause the web service to be refreshed, not just any call, since that would use the compiled result of the earlier call unless you told it to do otherwise.)
Still, for those who have long wished to better understand these Java proxy stubs, it's nice that we have the option to see the source if we want to.
Still more to comeThere's still more power in CF8 for those that like to tinker with the java proxy/stub generation. More on that in a later entry.