This documentation is for WSO2 Application Server version 5.0.0. View documentation for the latest release.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This sample demonstrates the WSO2 Application Server's ability to generate code for a WSDL 2.0 description and its ability to invoke a real world application RESTfully. The WSDL describes the REST API ( of Flickr via HTTPBinding ( of WSDL 2.0. The Client provided in the sample uses a stub which is dynamically generated by the Application Server.

You can find the "FlickrClient" sample discussed here in <AS_HOME>/samples/FlickrClient.

Building and Running the Sample

To build the samples you need Apache Ant build tool.

The steps are as follows:

1. Install and run the WSO2 Application Server. Refer to the  Installation Guide for instructions.

2. In a command prompt, switch to the FlickrClient directory.

For example, cd <AS_HOME>\samples\FlickrClient

3. From there, type ant.

The build dynamically generates a stub using the WSDL 2.0 description and opens the Client.

Interacting with Flickr

1. You need to provide an API key obtained from Flickr in order to continue. The API key will be used for subsequent invocations of the Flickr API. If you do not have have an API key, you can apply for one from
2. The application can be configured using the configure menu using the following properties:

  • Host - Can be used to change the host address the requests are sent to (Useful if you want to track the wire messages. e.g tcp monitor).
  • Port - Can be used to change the port the requests are sent to (Useful if you want to track the wire messages. e.g tcp monitor).
  • API KEY - Used to change the API KEY provided.
  • Secret - Used to change the shared secret provided.

3. Each main tab in the application corresponds to a category of methods specified in the Flickr API. For example, the "people" tab corresponds to the people category while the "PhotoSetsComments" tab corresponds to the photosets.comments category

4. Each sub tab in the appilication corresponds to a single method specified in the Flickr API under the main category. For example, the "FindByEmail" tab corresponds to the flickr.people.findByEmail method defined under the "people" category while the "PhotoSetsComments" tab corresponds to the "photosets.comments" category.

Flickr Authentication

Many methods in Flickr require the user to be logged in. Therefore, when such a method is accessed, the application shows you the following dialog box.

If you click "Yes," the application will authenticate you using the Flickr Authentication API. If you are not currently logged into flickr, you will be asked to do so first. The application will fire your default browser so that you can grant permission to the application. It always requests only the permission needed to fulfill a particular request. Therefore if the application does not have sufficient permission when another operation is attempted, it may require you to grant permission again.

There are three levels of permission.

  • read - permission to read private information.
  • write - permission to add, edit and delete photo metadata (includes 'read').
  • delete - permission to delete photos (includes 'write' and 'read').

The WSDL for the FlickrClient can be found here: <AS_HOME>/samples/FlickrClient/wsdl

  • No labels