Viewing Individual Entry / Main
October 30, 2003
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: <cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory"> <cfset RpcService = factory.XmlRpcService> <cfset RpcService.refreshWebService(" http://wonderboy:8500/MX/components/dude.cfc?wsdl")> 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!
Comments
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.
Posted by Geoff Bowers at 10/30/03 2:07 PM
Ooooooh yeah.
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]
Cheers!
Posted by mark at 10/30/03 4:00 PM
That was well needed --- thanks!
Posted by Josh Trefethen at 11/3/03 9:49 AM
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.
Any thoughts?
Matt
Posted by Matt Knight at 5/31/04 10:24 AM
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.
Posted by Brandon at 6/4/04 5:34 AM
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.
Jon
Posted by Jon Block at 3/3/05 7:16 AM
Why does it take SO LONG for the stubs to refresh? Any ideas?
Troy
Posted by Troy Allen at 3/22/05 8:37 PM
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.
Posted by fabian at 10/31/05 8:37 PM
just FYI, the webservice address is http://64.14.248.6/webservices/client.cfc and you can use method=getUserDetails
Posted by fabian at 10/31/05 8:38 PM
|