NAME

Xpriori::XMS - Perl extension for Xpriori::XMS Database.

Xpriori::XMS::Http - Perl extension for communicating with Xpriori::XMS Database.

SYNOPSIS

1. Normal use strict; use Xpriori::XMS::Http; my $oXpH = new Xpriori::XMS('http://localhost:7700/', 'Administrator', 'admin'); $oXpH->storeXML('<sample><base/></sample>'); $oXpH->insertXML('/ND/sample/base', '<XYZ>xyz</XYZ>'); my $sRes = $oXpH->queryXML('/ND/sample/XYZ');

2. Use Previous Connect use strict; use Xpriori::XMS::Http; my $oXpH = new Xpriori::XMS('http://localhost:7700/', 'Administrator', 'admin'); my $iSid = $oXpH->getSid(); (snip) #Use Previous Connect(Even other scripts!) my $oNew = new Xpriori::XMS('http://localhost:7700/', { sid => $iSid});

3. With auto logout use strict; use Xpriori::XMS::Http; my $oXpH = new Xpriori::XMS('http://localhost:7700/', 'Administrator', 'admin', AUTO_LOGOUT => 1); (or) my $oNew = new Xpriori::XMS('http://localhost:7700/', { sid => $iSid} AUTO_LOGOUT => 1);

DESCRIPTION

Xpriori::XMS is a module enables you to talk to Xpriori::XMS Database with http using LWP.

new($$$%)

$oXpH = Xpriori::XMS::Http->new($URL, $User, $Passwd [, $sID, %Option]);

Constructor. Creates a Xpriori::XMS::Http object and start session. If $URL is undef or empty string, Xpriori::XMS::Config::_connect will be used.

IF $sID is not set, this will login with $User, $Passwd. IF $sID is set, this will this SID for request without login.

getSID

$oXpH = $oXpH->getSID();

return SID.

logout

$sXml = $oXpH->logout();

ends up session.

setTraceLevels

$sXml = $oXpH->setTraceLevels($sTraceLevel);

sets trace levels. (ex. 'INFO:LOG_Performance')

getTraceLevels

$sXml = $oXpH->getTraceLevels();

gets current trace levels. (ex. '<TraceLevel>FATAL:LOG_all;WARNING:LOG_all;ERR:LOG_all</TraceLevel>')

activateAccessControl

$sXml = $oXpH->activateAccessControl();

ativates access controls.

setPassword

$sXml = $oXpH->setPassword($User, $Passwd);

changes $User's password to $Passwd.

setIsolationLevel

$sXml = $oXpH->setIsolationLevel($sLvl);

sets isolation level. You can set $sLvl to READ_COMMITTED, READ_UNCOMMITTED and REPEATABLE_READ

startTransaction

$sXml = $oXpH->startTransaction(); $sXml = $oXpH->startTransaction($Flush); $sXml = $oXpH->startTransaction($Flush, $MaxDuration, InactivityDuraion);

starts trasaction. You can set $Flush FLUSH (immediately flush after commit) or NOFLUSH (flushed by background process).

$MaxDuration is maximum duraion of transaction. $InactivetyDuration is maximum duraion of transaction is inactive.

commitTransaction

$sXml = $oXpH->commitTransaction();

commits transaction.

rollbackTransaction

$sXml = $oXpH->rollbackTransaction();

rollbacks transaction.

queryXML

$sXml = $oXpH->query($Xquery);

gets the result of $Xquery.

queryFlatXML

$sXml = $oXpH->queryFlatXML($Xquery);

gets the result of $Xquery with flatten XML.

queryCountXML

$sXml = $oXpH->queryCountXML($Xquery);

counts nodes from the result of $Xquery.

queryTreeXML

$sXml = $oXpH->queryTreeXML($Xquery);

gets the names of children tags from the result of $Xquery.

queryXMLUpdateIntent

$sXml = $oXpH->queryXMLUpdateIntent($Xquery);

queries and gets result of $Xquery considering transaction and locks.

queryDataContextXML

$sXml = $oXpH->queryDataContextXML($Xquery);

Sorry I can't find out the use of this method.

deleteXML

$sXml = $oXpH->deleteXML($Xquery);

deletes nodes where matches $Xquery.

insertXML_File

$sXml = $oXpH->insertXML_File($Xquery, $XmlFile);

inserts contents of $XmlFile at the point of $Xquery.

insertXML

$sXml = $oXpH->insertXML($Xquery, $Xml);

inserts $Xml at the point of $Xquery.

modifyXML_File

$sXml = $oXpH->modifyXML_File($Xquery, $XmlFile);

modifies $Xquery with the contents of $XmlFile.

modifyXML

$sXml = $oXpH->insertXML($Xquery, $Xml);

modifies $Xquery with $Xml.

copyXML

$sXml = $oXpH->copyXML($Xquery);

copies a document specified with $Xquery.

storeXML_File

$sXml = $oXpH->storeXML_File($XmlFile [, $schemaURI, $prefix]);

stores contents of $XmlFile.

storeXML

$sXml = $oXpH->storeXML($Xml [, $schemaURI, $prefix]);

stores $Xml.

getServerStatistics

$sXml = $oXpH->getServerStatistics($Param);

$Param can be set : ''(=ALL, default), ADMIN, STORAGE, ACCESS, BUFFER, TRANSACTION, WINDOW.

clearServerStatistics

$sXml = $oXpH->clearServerStatistics();

clears statistics.

getServerVersion

$sXml = $oXpH->getServerVersion();

gets server version info.

setCharset

$sXml = $oXpH->setCharset($Charset);

sets characterset.

setLanguage

$sXml = $oXpH->setLanguage($Language);

sets language.

getCharset

$sXml = $oXpH->getCharset();

gets current characterset.

getLanguage

$sXml = $oXpH->getLanguage();

gets current language.

SEE ALSO

Xpriori::XMS::ServerUtil, Xpriori::XMS::Config

AUTHOR

KAWAI,Takanori kwitknr@cpan.org

COPYRIGHT

The Xpriori::XMS::Http module is Copyright (c) 2009 KAWAI,Takanori, Japan. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.