[Looking for Charlie's main web site?]

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, links and indeed comments from others may be outdated--though not necessarily. Corrections are welcome, in the comments. I may revise the content if 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 workaround

The following concern was fixed by the final release.

There IS a gotcha. (There's always a catch, right?) Actually, since CFBuilder is still in beta, we can hope this will be fixed soon.

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.

Comments
hey, sweet tip Charlie, I'm a big fan of web services and SOA in general, this is a nice little help. Thanks!

Rob
# Posted By Robert Rawlins | 8/8/09 1:18 PM
Just a quick update. I can report that the bug above still remains in the public beta 3 but I did get word it was targeted to be fixed for the final. Let's hope so.

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.
# Posted By Charlie Arehart | 12/17/09 1:30 PM
Good news on the bug above: it's fixed in the next version of CFB. (The bug was that when you would add a URL to the web services pane of the services browser, and expanded it, it would seem to hang, at least until tried to add or delete a new one.)

Thanks to the CFB team for fixing that. :-)
# Posted By charlie arehart | 3/13/10 1:03 PM
Copyright ©2019 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting