This documentation is for WSO2 ESB version 4.0.2. View documentation for the latest release.

Adding a Resource

WSO2 ESB allows to add a resource to a certain collection for more convenient usage of the Registry.

Follow the instructions below to add a new child entry to a collection.

1. To add a new resource, click on the "Add Resource" link.

2. In the "Add Resource" panel, select "Method" from the drop-down menu.

The following methods are available:

Uploading Content from File

1. If this method was selected, specify the following options:

  • File - The path of a file to fetch content (XML, WSDL, JAR etc..)

    Tip

    Use the "Browse" button to upload a file.

  • Name - The unique name of a resource.
  • Media type
  • Description - The description of a resource.

2. Click "Add."

Importing Content from URL

1. If this method was selected, specify the following options:

  • URL - The full URL of the resource to fetch content from URL.
  • Name - The unique name of a resource.
  • Media type
  • Description - The description of a resource.

2. Click "Add."

Text Content Creation

1. If this method was selected, specify the following options:

  • Name - The unique name of a resource.
  • Media type
  • Description - The description of a resource.
  • Content

    Tip

    You can use either "Rich Text Editor" or "Plain Text Editor" to enter the content of a resource.

2. Click "Add."

Custom Content Creation

1. If this method was selected, choose the "Media Type" from the drop-down menu:

Each collection or resource which created and stored on the repository has an associated media type. However, you also have the option to leave this unspecified enforcing the default media type. There are two main ways to configure media types for resources.

  • The first method is by means of a one-time configuration, which can be done by modifying the mime.types file found in the server configuration directory. This can be done just once before the initial start-up of the server.
  • The second method is to configure the media types via the server administration console. The first method does not apply for collections, and the only available mechanism is to configure the media types via the server administration console.

Initially the system will contain the media types defined in the mime.types file will be available for resources and a set of default media types will be available for collections.

Managing media types for resources can be done via the server administration console, by editing the properties of the /system/mime.types/index collection. This collection contains two resources, collection and custom.ui. To manage media types of collections and custom user interfaces, edit the properties of these two resources.

2. Click "Create Content."