This one comes courtesy of David Stanten in Macromedia Product Support - If you have worked on webservices in CF you will run into a problem - when making a change to the signature of a webservice, there is no easy way to 'refresh' the webservice stubs created by CFMX if a developers doesn't have access to the administrator. I've also found that even if you manage to figure out the name of the directory containing a given webservices' stub files, you can't simply delete it without causing errors. (It seems some of these files are stored in memory). Anywho, once again, the service factory comes to the rescue, with a curiously named 'refreshWebService' function:
<cfset RpcService = factory.XmlRpcService>
You can either pass the full path to your wsdl - or, if you've registered a name for the webservice through the administrator, pass that name to this refreshWebService function - i.e. <cfset RpcService.refreshWebService("dude")>
After refreshing your stubs, you're good to go ... AND ready to rock!
Thank Zeus and the divine goat that suckled him. Working on the Fullasagoog (http://www.fullasagoog.com/) webservice has been driving me insane. This just made my life a lot easier -- yer a legend.
Thank you so much!
Just started working on some webservices yesterday, and this was driving me totally banannas.
[Pastes code at the top of his test page]
That was well needed --- thanks!
This is a very anoying "feature" in CFMX for J2EE. I've also noticed that when using the Rpc Service, it fails to generate the stubs....essentially, the code fails. The only work-around I've found is to delete the entries in the CFMX Admin under "Web Services".
Is MM going to improve WebServcies with Blackstone?
Also, have you run into a situation where the WebService throws an AXIS fault but browsing the cfc through the component invoker works perfectly.
I've gone as far as 1) Stopping the instance 2) deleting all files/folders in /opt/jrun4/servers/<instance>/cfusion-ear/cfusion-war/WEB-INF/cfusion/cfc-skeletons and cfclasses. This has not corrected on WebService in particular.
Matt, This is something that is recieving attention in Blackstone. If you still see problems once the beta comes out, let them know on the beta forums.
The webservice I'm using just abrutply stopped working and it was driving me CRAZY to the point I was about to start using other solutions for web services. Why the heck do we have to refresh the stubs manually if the signature changes?! They should release a fix for CFMX 6.1 customers this is crazy.
Why does it take SO LONG for the stubs to refresh? Any ideas?
I have just upgrade my CF Installation with the last updater from 7 to 7.01... Everything works fine, except that I had a dot.net call to some webservices that were working fine, and now gets a "The AXIS engine could not find a target service to invoke! targetService is " and nothing else...targetService comes blank and that error...can you help? Any idea of what can be happening? If I use the webservices from a regular URL it works, if I invoke them as components too...just from the dot.net that was working perfectly before..I couldn't find any documentation on this error anywhere, so any help is appreciated.
just FYI, the webservice address is http://220.127.116.11/webservices/client.cfc and you can use method=getUserDetails