Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The Services Browser in ColdFusion Builder gives you access to all of the ColdFusion components on your ColdFusion server as well as external Web services that you can add directly inside the Services Browser. So, let's first take a look at the ColdFusion components. If you don't already have the Services Browser open in this bottom group of views, you can choose Window > Show View and find the Services Browser. I want to make this a little bit larger so we can get in here and play. I'll expand my Local CF9 server and here I can see all of the components that are currently available to me inside of my application.
If I expand the cfcs package here, I can see all of the components that are currently inside that directory, and if I go take a look here inside my Navigator view, you can see all of those matching components. As I expand each component, I can also see its location and each of its individual methods and the type of method that it is. As you notice this small gift wrapped box here, that's a package method. The init method is public, and I could also show private and remote methods. If I only want to be able to see public methods, I can also turn off specific methods by clicking these boxes here at the top.
So, I'll deselect the Show Package option and all the package methods disappear. I'll click it again and they show up. You can also use the Services Browser to insert calls directly to methods, which I'll cover later in this course when we talk more about components. Now if you are building any sort of application that requires access to the ColdFusion Administrator APIs, you can click the little lightning bolt icon here and it will actually show you all of the system cfcs. Here, I can see cfdocs, CFIDE and all of the Administrator API functionality.
If I deselect the lightning bolt, all those will disappear again. So, as I said earlier, that's all we are going to cover for components in the Services Browser for now, but I'll show you some more about that later on in the course. Next, we're going to take a look at Web services. In the upper right-hand corner here, I can click on the Show Web Services icon and it switches over to this nice empty screen. So, what we're going to do now is actually consume a Web service from the Adobe Feeds Website. I have the Web site open in Safari already. So, we'll switch over to Safari and I'm on feeds.adobe.com/Developers.cfm.
Here on the page, it lists a WSDL file that defines the Web service for the Adobe XML News Aggregator. I'm going to copy that WSDL URL, go back to my Services Browser, and click the Plus icon. This will bring up the Add WSDL dialog where I can paste in my URL and click OK. The ColdFusion server will then go out, take a look at that WSDL file and then show me all of the methods that are available on that particular service. I just need to expand the nodes here until I see all of the methods.
Now just like with components I can actually insert calls directly to these methods in my code. In the Chapter 3 folder, I have an empty index.cfm file ready to go. So, if I want to call the getCategories method of this Web service, I can right-click and choose Insert CFInvoke. So, the CFInvoke tag already has my WSDL URL set up for the Web service attribute. It's calling the proper method and then putting the results into this ws return variable. So, now I'm going to add a cfdump and actually dump out the results of that variable to make sure it's actually working.
So, if I click on the Safari tab, I'm going to get an alert that there is no server yet configured. While I've added a server to the Servers view I have yet to associate it with my project. So, I'll click OK and switch back to my Code view and then in the Navigator, I'll right-click on my project, choose Properties, and then in the ColdFusion Server Settings section, just choose the server that I want to relate to this project, click OK. I'll switch back to the Safari tab, and here I can see the results of the getCategories method call to that Web service.
If I have more Web services I'd like to use, I can just click the Plus icon again and continue to add WSDL files until I have everything I need. So, the Services Browser is probably something you are going to keep open all the time so that you can quickly gain access to all of your components and all of your Web services as you continue developing your applications.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 104756 Viewers
56 Video lessons · 116646 Viewers
71 Video lessons · 85823 Viewers
131 Video lessons · 41064 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.