NAME
PICA::SOAPClient - PICA::Store via SOAP access (aka 'webcat')
VERSION
version 0.585
SYNOPSIS
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
);
DESCRIPTION
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.
METHODS
new ( %params )
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.
get ( $id )
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.
create ( $record )
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 ( [ $id, ] $record [, $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
.
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id', 'record', and 'version'.
delete ( $id )
Deletes a record by ID.
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id'.
access ( key => value ... )
Set general access parameters (userkey, password, dbsid and/or language). Returns the store itself so you can chain anothe method call.
about
Return a string "SOAPClient: $baseurl" with information about this store.
INTERNAL METHODS
_soap_query ( $operation, @params )
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!
AUTHOR
Jakob Voß <voss@gbv.de>
COPYRIGHT AND LICENSE
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.