This concept can be used to execute SEP commands on specified BEEP server.
The URL format is "beep://user:password@host:port/DBName".
First create a BEEP connection
$beep = BEEPClient.create( URL )
where URL is something like this:
- "beep://guest:guest@host:port/DB"
where DB is the DataStore database name
To execute a SEP command:
$beep.execute( SEPcommand )
where SEPCommand like this:<request reqno='1'><fetch><union><intersect><compare subtree='xmlrpctest/1'><path/><value></value></compare></intersect></union></fetch></request>
it returns a String concept.
You can use a secure connection if you have a JSSE TLS package.
For secure connection append to the end of your url "security=jsse"
query the url will show like this:
- beep://guest:guest@host:port/DB?security=jsse
For this connection you need to have the following jar packages:
- jsse.jar
- jnet.jar
- jcert.jar
- beeptls-jsse.jar
Do not forgot to set the security provider into your java.security file.
You can find this file:
- in case of Sun Java:
- <JAVA-HOME>/lib/security/
- in case of IBM Java:
- <JAVA-HOME>/jre/lib/security
To set the JSSE security provider add the following line into this file:
- security.provider.n=com.sun.net.ssl.internal.ssl.Provider
where the character 'n' is the next provider number, you may have
already in this file a provider with the number one
in this case the next provider (with number two) will be the JSSE
provider:
- security.provider.1=sun.security.provider.Sun
- security.provider.2=com.sun.net.ssl.internal.ssl.Provider
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getErrorHandler, getInheritedConcepts, getResourceURI, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML, setResourceURI |
|
Parameters: |
$url : |
The URL to the BEEP server. (ex. beep://user:password@host:port/DBname) |
|
Exceptions: |
badURLException :
(Error) |
If the URL to the BEEP server isn't valid. |
connectionException :
(Error) |
If unable to connect to specified XML database. |
unsupportedProtocolException :
(Error) |
If the URL protocol isn't beep. |
Constructs a new BEEPClient to the specified BEEP server.
Parameters: |
$command : | SEP command to execute. |
|
Exceptions: |
executeSEPException :
(Error) |
If unable to execute SEP command on BEEP server. |
Executes the specified command and returns the result in a String
concept.
$beep = BEEPClient.create("beep://guest:guest@host:port/DB")
print $beep.execute("<request reqno='1'><fetch><union><intersect><compare subtree='xmlrpctest/1'><path/><value></value></compare></intersect></union></fetch></request>")
-- the result is --
The content of xmlrpctest/1 document will be returned:
<testxml>
<homedir path="/home/user"/>
</testxml>