Web services are software modules with a programmatic interface exposed over
the Internet. Published Web services can be invoked by other applications (even
other Web services) that reside anywhere on the Internet.
You can maintain a collection of bookmarks of your favorite Web services in Komodo's
Toolbox or
Project Manager.
Once bookmarked, Web services can easily be used in Perl, Python or PHP programs.
Web service language support is available for Perl, Python and PHP.
To use Web services with Perl and Python,
ActivePerl and/or
ActivePython must
be installed on your system.
Web service support is configured through Komodo's
Preferences.
Use the Web Services preference page to configure service
support, default support modules and proxy locations.
Web Service Bookmarks are links to your favorite Web services on the Internet.
Maintaining a library of bookmarks makes it more convenient to add a Web service
reference to a Perl, Python or PHP program.
You can add Web service bookmarks using the following methods:
- Drag and Drop: drag and drop a WSDL URL from a browser
address bar or editor onto the Toolbox, onto a Project, or onto a folder in
the Toolbox or a Project.
- Toolbox: From the Toolbox menu, select
Add|New Web Service. To add a Web service to an existing folder,
right-click the folder, or drag and drop a Web service onto the folder.
- Project Manager: From the Project menu, select
Add|New Web Service. To add a Web service to a project,
right-click the project, or drag and drop the Web service onto the project.
The Web Services dialog can be invoked from the Toolbox or
the Project Manager. It consists of the following components:
- Url: enter (or copy and paste) the URL of the Web service.
- Suggest: click this button to perform a WSDL (Web Service
Description Language) query on the Web service in the URL field, and attempt
to fill in the Name, Description and Object Name fields.
- Find on Web: click this button to display the Web Services
Reference home page on ActiveState's ASPN Web site.
- Name: enter the name of the Web service in this field.
If you used the Suggest button, this field will be automatically
filled in by the name extracted from the WSDL description of the Web service.
The name that that appears in this field will also be the name of the bookmark in
the Project Manager or Toolbox.
- Description: for reference, enter a description of the
Web service in this field. If you used the Suggest button,
this field will be automatically filled in by the description extracted from the WSDL
description of the Web service (if the WSDL contains a description).
- Object Name: the value in this field will be used as
the variable name when the Web service is used in a Perl, Python or PHP program.
Ensure that the Object Name conforms to the language's variable naming
conventions. If you used the Suggest button,
the Object Name will become, by default, the same as the "Name" of the Web
service.
Top
To insert a Web service into the current file that is opened in the editor,
invoke it from the place where the Web service bookmark is stored.
From the
Toolbox or the
Project Manager, double-click
the Web service bookmark to insert it in the current program in the Editor Pane.
When a Web service is inserted into your program, Komodo will automatically alter
the program to provide support for the Web service.
Perl and Web Services
When a Web service is inserted into a Perl program, Komodo performs the
following actions:
Python and Web Services
When a Web service is inserted into a Python program, Komodo performs the
following actions:
- "import" statement: when a Web service is inserted into
a Python program, the statement "import webservice" is added at the top of
the program, beneath any other "import" statements.
- object creation: the Web service URL will be placed in an
object; the Web service's Object Name
will be used as the variable name.
- AutoComplete:
will list the methods for the Web service object.
- Call Tips:
will list parameters for the Web service's methods.
PHP and Web Services
When a Web service is inserted into a PHP program, Komodo performs the
following actions:
- require_once statement: when a Web service in inserted into
a PHP program, the statement "require_once("webservice.php")" is added at the top of
the program, beneath any other "require_once" statements.
- object creation: the Web service URL will be placed in an
object; the Web service's Object Name
will be used as the variable name.
- AutoComplete:
will list the methods for the Web service object.
- Call Tips:
will list parameters for the Web service's methods.
Top
When Web service bookmarks are assigned to the
Project Manager or the
Toolbox, you can access
common functions by right-clicking the Web service bookmark and selecting the
desired function from the context menu.
- View WSDL: use this option to load the WSDL XML file in
the Komodo Editor Pane.
- Generate Proxy: use this option to generate a Perl
module from the WSDL. This is only an option when using Web services within
Perl programs.
- Service Help: use this option to view a reference page
for the Web service.
- Export as Project File: use this option to export Web
services as Komodo project files.
- Delete: select this item to remove the Web service
bookmark from the Project Manager or the Toolbox.
- Properties: select this option to display the Web Services
dialog box.
Top
|