I looked online to see if I could find any information about preventing ColdFusion from refreshing the stub classes, but no dice. I could only find information about how to force it to recompile. Not what I wanted. But perhaps someone out there knows of a server setting or some sort of parameter to prevent refreshing from the WSDL.
Now you might ask why I wouldn't want to make sure I have the latest and greatest from Netsuite. The problem is that for some unknown reason, ColdFusion refuses to generate and compile all of the necessary stub classes, so I can't rely on that process to get me everything I need. Perhaps the WSDL is too nested and complex? But that doesn't make sense because ColdFusion (I would presume) is using wsdl2java, which comes with Apache Axis. So why when I run wsdl2java from the command line does it successfully generate each and every java source file? I'm still scratching my head over that one. In any case, to ensure I had all necessary stub classes, I manually ran wsdl2java and compiled all of the resulting java files into class files from the command line, then whisked them away into a jar file that I dumped in the \CFusionMX7\lib directory.
Once I figured that the delay after the service restart was due to the stub classes being refreshed and ruled out preventing it with server settings or parameters, I realized I could simply avoid creating a ColdFusion web service object entirely by directly creating a java object from the stub classes. Unfortunately, the renders useless some of ColdFusion's handy functions like getSOAPRequest and getSOAPResponse.
Example:
<!--- Create a plain old coldfusion web service object (could also do a cfinvoke).--->
<cfset ws = CreateObject("webservice", "https://webservices.netsuite.com/wsdl/v2_5_0/netsuite.wsdl")>
<!--- call some function from that web service --->
<cfset ws.MakeSomethingHappen()>
<!--- dump the entire soap request --->
<cfdump var="#getSOAPRequest(ws)#">
<!------ --- ----- ------ --------- ------------- --->
<!--- Create an equivalent java object directly from the service locator stub class (the class name "[web service name]ServiceLocator" and method "get[web service name]Port()" will be what to look for; i.e. NetsuiteServiceLocator.getNetsuitePort(), MyWebServiceNameServiceLocator.getMyWebServiceNamePort(), etc) --->
<cfset ws = CreateObject("java", "com.netsuite.webservices.platform_2_5.NetSuiteServiceLocator").getNetSuitePort()>
<!--- call the same function from that web service as the previous example --->
<cfset ws.MakeSomethingHappen()>
<!--- dump the entire soap request (it's a little messy, but you can always write your own udf that returns the same thing)... --->
<cfdump var="#ws._getService().getCall().getMessageContext().getRequestMessage().getSOAPEnvelope().toString()#">
<!--- ... or dump only the request body --->
<cfdump var="#ws._getService().getCall().getMessageContext().getRequestMessage().getSOAPBody().toString()#">
