| mn8 Language Reference | Index | ||
XMLRPCHandler |
||
|
||
XMLRPC URL handler concept for all URIs starting with "xmlrpc://"
and "xmlrpcs://" (for secure connection).
With this concept you can invoke methods to execute on XMLRPC server.
URL format is : xmlrpc://<userName>:<password>@<hostName>:<port>/<separator><handlerName>.<methodName>?<parameters>
The separator is used to separe the path and the handler name, eg:
xmlrpc://localhost/_Date.getToday
Possible options :
If these options are specified then the userName and the passwd will be overwrited in the URL.
Execute a SEP command on XMLRPC server.
$x FROM "xmlrpc://user:passwd@host:port/_handler.method?sep=SEPCommand&db=DBName&user=DBUser&pwd=DBPasswd"
print $x
| Version: | 0.1 |
| Authors: | Szabo Csaba () Antal Attila () |
| Location: | |
| Inherits: | Concept, URIHandler |
| create (String $url) |
| static Logical | acceptsURI (String $url) |
| Logical | closeConnection |
| Concept | getContent |
| Logical | initialize (Map $options) |
| Logical | openConnection |
| Logical | setContent (Concept $value) |
| create (String $url) |
| Parameters: | ||
|
Creates the URL handler concept
| static acceptsURI (String $url) |
| Parameters: | ||
|
| Returns: Logical |
Determines whether this implementation can handle the URI.
print XMLRPCHandler.acceptsURI("xmlrpc://guest:guest@localhost:10300/")
-- the result is --
true
| closeConnection |
| Returns: Logical |
Flag to close the connection.
$url = "xmlrpc://guest:guest@localhost:10300/_url.echo?msg='Hello!!!'"
$xmlrpc = XMLRPCHandler.create( $url )
if $xmlrpc.acceptsURI( $url ) then [
$m typeof Map
if ( $xmlrpc.initialize( $m ) ) then [
if ( $xmlrpc.openConnection ) then [
print $xmlrpc.getContent
$xmlrpc.closeConnection
]
]
]
| getContent |
| Returns: Concept |
| Exceptions: | |
| connectionException : (Error) | If unable to connect to XMLRPC server. |
Get the all informations from URL.
$url = "xmlrpc://guest:guest@localhost:10300/_url.echo?msg='Hello!!!'"
$xmlrpc = XMLRPCHandler.create( $url )
if $xmlrpc.acceptsURI( $url ) then [
$m typeof Map
if ( $xmlrpc.initialize( $m ) ) then [
if ( $xmlrpc.openConnection ) then [
print $xmlrpc.getContent
$xmlrpc.closeConnection
]
]
]
| initialize (Map $options) |
| Parameters: | ||
|
| Returns: Logical |
| Exceptions: | |
| badURLException : (Error) | If the URL is not valid. |
Initializes the URL useing the user informations
$url = "xmlrpc://guest:guest@localhost:10300/_url.echo?msg='Hello!!!'"
$xmlrpc = XMLRPCHandler.create( $url )
if $xmlrpc.acceptsURI( $url ) then [
$m typeof Map
if ( $xmlrpc.initialize( $m ) ) then [
if ( $xmlrpc.openConnection ) then [
print $xmlrpc.getContent
$xmlrpc.closeConnection
]
]
]
| openConnection |
| Returns: Logical |
| Exceptions: | |
| connectionException : (Error) | If unable to connect to XMLRPC server. |
Opens the XMLRPCClient connection
$url = "xmlrpc://guest:guest@localhost:10300/_url.echo?msg='Hello!!!'"
$xmlrpc = XMLRPCHandler.create( $url )
if $xmlrpc.acceptsURI( $url ) then [
$m typeof Map
if ( $xmlrpc.initialize( $m ) ) then [
if ( $xmlrpc.openConnection ) then [
print $xmlrpc.getContent
$xmlrpc.closeConnection
]
]
]
| setContent (Concept $value) |
| Parameters: | ||
|
| Returns: Logical |
Rerurn false.