IceWarp Server User to User Forum IceWarp Server User to User Forum

Forums  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

RPC-API with PHP Pear XML-RPC2 Libraty

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [IceWarp Product Configuration] >> IceWarp Mail Server Configuration >> RPC-API with PHP Pear XML-RPC2 Libraty Page: [1]
Login
Message << Older Topic   Newer Topic >>
RPC-API with PHP Pear XML-RPC2 Libraty - 9/8/2008 1:36:25 AM   
masaru

 

Posts: 3
Score: 0
Joined: 9/3/2008
Status: offline
Is there person who can use RPC API with PHP-Pear XML-RPC2 Library?

We are using IceWarp Linux version and want to use API managements. I'm trying to make
RPC-Client sample code but always fail. Can I find PHP sample code or Documents?
Post #: 1
RE: RPC-API with PHP Pear XML-RPC2 Libraty - 9/8/2008 3:53:11 PM   
masaru

 

Posts: 3
Score: 0
Joined: 9/3/2008
Status: offline
Below is additional information. It always reply Error message
=>Exception : Curl returned non 200 HTTP code: 401. Response body:

Have I misunderstanding RPC API?
--------------------------------------------------------------------------
require_once "PEAR.php";
require_once "XML/RPC2/CachedClient.php";
$options = array(
'prefix' => 'IceWarpServer.AccountObject.',
'chcheOptions' => array(
'cachedir' => '/tmp/',
'lifetime' => 3600
)
);
$client = XML_RPC2_CachedClient::create('http://xxx.xxx.xxx.xxx/rpc/', $options);
try {
$result1 = $client->ValidateUser('admin');
print_r($result1);
}
catch (XML_RPC2_FaultException $e) {
die('Exception #' . $e->getFaultCode() . ' : ' . $e->getFaultString());
}
catch (Exception $e) {
die('Exception : ' . $e->getMessage());
}
--------------------------------------------------------------------------------------

(in reply to masaru)
Post #: 2
RE: RPC-API with PHP Pear XML-RPC2 Libraty - 11/15/2008 12:21:55 AM   
marciohumpris

 

Posts: 274
Score: 0
Joined: 5/1/2008
Status: offline
Hi,

I suggest you check with support, pls keep us posted.

regards

(in reply to masaru)
Post #: 3
RE: RPC-API with PHP Pear XML-RPC2 Libraty - 11/21/2008 12:10:30 AM   
masaru

 

Posts: 3
Score: 0
Joined: 9/3/2008
Status: offline
I inquiry it problem to IceWarp Support center again. and I got clear answer.

Unfortunately, IceWarp Linux version has XML-RPC Bug and it will be fix at next night build release -- they says.
By the way, IceWarp XML-RPC require HTTP Basic authentication(undocumented). and pear XML-RPC2
library seems to pass this restriction.

$user = "admin@domain.com"; <-- IceWarp admin priv user
$pass = "admpass";
$client = XML_RPC2_CachedClient::create('http://$user:$pass@xxx.xxx.xxx.xxx/rpc/', $options);

I will report this method can access IceWarp server or not, when UNIX version's BUG fixed.

(in reply to marciohumpris)
Post #: 4
Page:   [1]
All Forums >> [IceWarp Product Configuration] >> IceWarp Mail Server Configuration >> RPC-API with PHP Pear XML-RPC2 Libraty Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


2001 - 2008 © IceWarp