LS::Service::Namespace - Namespace for data or metadata retrieval
package TestNamespace; use LS::Service; use vars qw( @ISA ); @ISA = ( 'LS::Service::Namespace' ); sub getMetadata { my $self = shift; # $metadata_type is undefined for getData calls my ($lsid, $requestedFormats) = @_; # # You must return a LS::Service::Response object with the data to be # attached. Expiration headers should be provided in the SOAP envelope. # # If there is an error, you can return an LS::Service::Fault object # return new LS::Service::Response(format=> 'text/plain', response=> 'Metadata'); } package Service; # Add a namespace to a metadata service my $ns = TestNamespace->new(name=> 'myNamespace'); my $metadata = new LS::Service::DataService; $metadata->addNamespace($ns);
Creates namespaces to be added to data or metadata services. Each namespace is responsible for retrieving and formatting its data so that it can be included in the SOAP MIME attachment. The specified function can return a LS::Service::Response object which can hold expiration, data/metadata, format type returned to the client.
Use this constructor to create namespaces with the following %option keys:
name: The name of the namespace as seen in the LSID (e.g myns is the namespace in urn:lsid:mylsid.org:myns:object)
Wrapper function for the user supplied method that will be called to retrieve the data or metadata. The first and only parameter is the LSID that is associated with the data or metadata
Copyright (c) 2002,2003 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at http://www.opensource.org/licenses/cpl.php
To install LS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LS
CPAN shell
perl -MCPAN -e shell install LS
For more information on module installation, please visit the detailed CPAN module installation guide.