This documentation is for WSO2 Application Server 5.2.0. View documentation for the latest release.
Page Comparison - Creating a Resource from a Given URL (v.2 vs v.3) - Application Server 5.2.0 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

If a resource needs to be created with content from any given URL, the following line of code can be used to add a resource from a given URL to a suggested location. The real location to which the resource was added is returned. The template_resource should contain metadata of the resource that a user wants to add.

Code Block
String real_location = registry.importResource("c1/c2/r3", "http://wso2.com", template_resource);
Info

metadata of the resource is defined as the properties of the resource, media type of the resource, author of the resource, create date of the resource, last updates time of the resource, etc.