CFBuilder tip: Browsing web services--did you know you can? and a bug you may hit
Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.Did you realize that you can browse web services in CFBuilder (just like you could in Dreamweaver or the Adobe ColdFusion 8 Extensions for Eclipse), seeing all the methods, their args, etc.? I'll show you how, but I'll also warn of a bug you may hit in the beta, and give a simple solution.
This is another in a series of tips I want to start share for those working with CFBuilder. While oriented mostly to those who had not used (or stuck with) CFEclipse before, this one may surprise even folks who had used it.
How to browse web services in CFBuilder
Just as with the older Adobe Eclipse extensions for CF8, the ability to browse web services in CFBuilder is in the same Services Browser interface that one can use to look at CFCs.
It's easy to miss, even if you do know about the Services Browser (Window>Show View>Services Browser). Look in the top right corner of that view, and there's a pair of icons which when you mouse over them allow you to switch between "Show Web Services" and "Show CFCs on RDS Server". Nifty.
So just as in DW, you can then add the WSDL URL for any web service, either by clicking the red circled plus sign in the top left of the view, or by right-clicking on whitespace in the view and choosing "add wsdl".
It will then retrieve the web service description information and display in a friendly tree view all its services, their methods, and those methods arguments and datatypes, etc. (see the screenshot above).
This really can make it so much easier to work with web services, especially ones you don't know or are having trouble with.
But wait, there's more. Call now and receive .... (sorry) ...
Seriously, though, this is nice if you didn't know about it. The tool can even build code for you to call the web service. As with Dreamweaver, you can right-click on a method and have the editor build for you your choice of either CFINVOKE or creatobject code to call the web service and that method. It will even populate a placeholder for the required arguments for you. Talk about service with a smile. :-)
(As a bonus, I'll note that there are also several other tools, free and commercial, some web-based and some downloadable, that can also be used to browse web services. More on that in another entry I've now posted.)
One gotcha, for now: stuck on "contacting server", and easy workaroundThe following concern was fixed by the final release.
When you first add a web service URL, and you then try to expand it to see its services and methods, sadly it will seem stuck reporting "contacting server" where the service names and methods should be. Grr.
Oddly, when I saw that, I moved on thinking it was a problem with that web service, and when I added another WSDL URL, suddenly the one that was hung now worked. I though it odd, till I noticed it did that with EVERY URL I added.
So what's the solution when you add one and it hangs like that? Just add another. You could even just add the same one twice (and then delete the dupe you will now have).
It also "fixes itself" if you delete one of the listed WSDL URLs.
While you might think a restart of CFBuilder (the "workbench", in Eclipse parlance) would also help, actually it hurts. When you restart it, and try to open a web service again, it hangs. You have to repeat the process above. Worse, you need to do it for any web service you try to open. That's an annoyance, for sure.
But here's some "good" news. I just confirmed that you don't even need to enter a valid WSDL URL (or even a valid URL). I just added "x" as a new service, and it got the hung services working. One may argue it shouldn't allow that, but for now that's a blessing. :-)
I've opened a bug report for the problem of the "hanging" web service feature. If you'd like to vote for it, you can find it as bug id 79321.
More to come, here and in my daylong CFUnited class, "Getting Started with CFBuilder"
If you're looking for more such CFBuilder tips, keep an eye here. More than that, if you'd like to spend a day getting immersed in an introduction to CFBuilder from the perspective of one coming from other editors, that will be the focus of my daylong class being held on-site the day before CFUnited, August 11. It's one of several such daylong classes being organized by (and available for purchase separately from) CFUnited.
More on the class in my previous blog entry or at the class detail page.
For more content like this from Charlie Arehart:
Need more help with problems?
- Signup to get his blog posts by email:
- Follow his blog RSS feed
- View the rest of his blog posts
- View his blog posts on the Adobe CF portal
- If you may prefer direct help, rather than digging around here/elsewhere or via comments, he can help via his online consulting services
- See that page for more on how he can help a) over the web, safely and securely, b) usually very quickly, c) teaching you along the way, and d) with satisfaction guaranteed
Also, if anyone finds this and thinks, "hey, I'd like to try it, but I don't have any web services URLs to use to test it", here is the one I used in the screenshot above: http://www50.brinkst... . There are also many others at sites like http://www.xmethods....
And if you missed it, the problem I refer to at the opening of this comment is that the first time you add a new web service, CFB will report that it's "contacting server". I offer a simple solution in the entry above.
Thanks to the CFB team for fixing that. :-)
java.lang.ClassCastException: class org.eclipse.swt.layout.GridData cannot be cast to class org.eclipse.swt.layout.FillData (org.eclipse.swt.layout.GridData and org.eclipse.swt.layout.FillData are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @72a2312e)
That said, this post you are commenting on is from over 10 years ago. I appreciate that what you share is a problem, but I don't see a connection between the problems I was reporting then.
This is something you should report to Adobe. You can offer it on the Tracker site (tracker.adobe.com), where they do address and resolve such things. If you do that, feel free to share a link here to the report, and I or others who would could vote for it.
You could also/instead report it via the [email protected] address, as this is a problem with the basic functionality of Builder (for those who would use it to work with Web Services).
Thanks for bringing it up. Hope it gets resolved.