PICA::SOAPClient - PICA::Store via SOAP access (aka 'webcat')
version 0.585
use PICA::SOAPClient; # connect to store via SOAP API $server = PICA::SOAPClient->new( $baseurl, userkey => $userkey, password => $password, dbsid => $dbsid ); # get connection details from config file $server = PICA::SOAPClient->new( config => "myconf.conf" ); $server = PICA::SOAPClient->new( config => undef ); # autodetect (!) # CRUD operations %result = $server->get( $id ); %result = $server->create( $record ); %result = $server->update( $id, $record, $version ); %result = $server->delete( $id ); # set additional access parameters $store->access( userkey => $userkey, password => $password, dbsid => $dbsid );
This class implements a PICA::Store via SOAP-API (also know as "webcat"). A formal description of the CBS webcat SOAP-API can be found at http://cws.gbv.de/ws/webcatws.wsdl.
Create a new Server. You must specify at least a connection type and a base URL or the config file parameter to read this settings from a config file. Defined parameters override settings in a config file.
Other parameters are userkey, password, and database id. The optional language parameter (default: "en") for error messagescan be one of "de", "en", "fr", or "ne" depending in the servers capabilities.
Currently only the connection type "SOAP" is supported with limited error handling.
Retrieve a record by ID.
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id', 'record', and 'version'. The 'record' element contains a PICA::Record object.
Insert a new record. The parameter must be a PICA::Record object.
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id', 'record', and 'version'.
Update a record by ID, updated record (of type PICA::Record), and version (of a previous get, create, or update command). If no $id parameter is given, it is taken from $record->ppn.
$id
$record->ppn
Deletes a record by ID.
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id'.
Set general access parameters (userkey, password, dbsid and/or language). Returns the store itself so you can chain anothe method call.
Return a string "SOAPClient: $baseurl" with information about this store.
Internal method to prepare, perform and evaluate a SOAP request. Returns a hash with 'errorcode' and 'errormessage' or a hash with 'dbsid', 'id', 'record', and 'version' depending on the type of query. Do not directly call this method!
Jakob Voß <voss@gbv.de>
This software is copyright (c) 2014 by Verbundzentrale Goettingen (VZG) and Jakob Voss.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install PICA::Record, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PICA::Record
CPAN shell
perl -MCPAN -e shell install PICA::Record
For more information on module installation, please visit the detailed CPAN module installation guide.