SOAP / XML-RPC

访问RRPproxy™系统也可以使用SOAP(简单对象访问协议)和XML-RPC(可扩展标记语言远程呼叫)。

模块支持PERL和PHO语言。请将参数设置为"s_opmode"至"OTE"以便于与我们的OT&环境系统连接。

访问接入SOAP-API

使用我们的SOAP API访问,请使用以下连接参数:

Without SSL proxy => http://api.rrpproxy.net:8080/soap
With SSL proxy => https://api.rrpproxy.net:8082/soap

Perl

用perl访问,我们建议使用“SOAP:: Lite”,请参考下面的例子。

#!/usr/bin/perl -w

use SOAP::Lite; #+trace => debug;
use Data::Dumper;

my $soap = SOAP::Lite
-> uri('urn:Api')
-> proxy('https://api.rrpproxy.net:8082/soap')
;

my @commands = (
{
's_login' => 'demo',
's_pw' => 'demoote',
's_opmode' => 'OTE',
'command' => 'CheckDomain',
'domain' => 'example.com',
},
);

my $res = $soap->xcall(@commands);

print Dumper($res->result) . "\n";

PHP

我们建议使用我们的 PHP-内部 SOAP功能访问我们的SOAP-API和PHP。详情请参考下面的例子。

<?php
$client = new SoapClient(NULL,
array(
"location" => "https://api.rrpproxy.net:8082/soap",
// "location" => "http://api.rrpproxy.net:8080/soap",
"uri" => "urn:Api",
"style" => SOAP_RPC,
"use" => SOAP_ENCODED,
)
);

$params = array(
array(
-"s_login" => "demo",
-"s_pw" => "demoote",
-"s_opmode" => "OTE",
-"command" => "CheckDomain",
-"domain" => "example.com"
-)
);

$result = $client->__call("xcall",
$params,
array(
"uri" => "urn:Api",
"soapaction" => "urn:Api#xcall")
);

print_r($result); ?>