Re:XMLRPC Plugin 14 Years ago
|
Karma: 0
|
thx for the reply, Edwin. Indeed I make the call using a port, like:
$c=new xmlrpc_client("my_folder_to_xmlrpc/xmlrpc/index.php", "myslavesite.com", 80);
However, adding www.myslavesite.com:80 or myslavesite.com:80 in the Domains list is not changing anything. Both www.myslavesite.com:80 and myslavesite.com:80 are forwarded properly to myslavesite.com when entering it in the browser. My version nr's:
Joomla Multi Sites version: 1.2.38
Patches definition version: 1.2.44
So, still getting only the system methods from the system.listMethods call. Calling the master site gives the same result. On the master, I also published the plugins and enabled web services.
Any ideas?
|
|
|
|
|
Re:XMLRPC Plugin 14 Years ago
|
Karma: 54
|
If it is calling the master, this is because the domain is not correctly defined in the slaave site or that domain info that reach the slave site does not match exactly what you expect.
Also check that you have the WWW and without WWW domain definition.
So you have to cross-check again.
If you want that we have a look on your server, this is still possible with our billable support that you can order at
www.jms2win.com/download?page=shop.produ...35&category_id=1
|
|
|
Last Edit: 2010/12/21 15:02 By edwin2win.
|
|
Re:XMLRPC Plugin 14 Years ago
|
Karma: 0
|
I appreciate the help, and I have cross-checked again. Here's what I did:
I disabled the webservice on the master site, to be sure my call to the slave site did not accidentally reach the master site. I added the port number to the slave site in the Site Manager of JMS, I now have:
www.slavesite.nl
slavesite.nl
www.slavesite.nl:80
slavesite.nl:80
The system.listMethods call is initiated using the following:
Code: |
include('path_to_my_lib/phpxmlrpc/xmlrpc.php');
$f=new xmlrpcmsg('system.listMethods');
$c=new xmlrpc_client("path_to_my_xmlrpc/index.php", "slavesite.nl", 80);
$c->setDebug(1);
$r=$c->send($f);
$v=$r->value();
if (!$r->faultCode()) {
print "<HR>I got this value back<BR><PRE>" .
htmlentities($r->serialize()) . "</PRE><HR>\n";
} else {
print "Fault <BR>";
print "Code: " . htmlentities($r->faultCode()) . "<BR>" .
"Reason: '" . htmlentities($r->faultString()) . "'<BR>";
}
|
Again, only the system methods are returned, although other joomla / blogger methods are also published.
Here is the response from the slavesite:
Code: |
---GOT---
HTTP/1.1 200 OK
Date: Tue, 21 Dec 2010 15:14:44 GMT
Server: Apache/2
X-Powered-By: PHP/5.2.14
Set-Cookie: c80730546823d3ee08fca1f58ad29fce=2ffde47ad896d887fb37d7ff69858d2a; path=/
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 176
Connection: close
Content-Type: text/xml
‹������•A‚@E÷žÂp�F÷ã°pãÆœ JƒM:ÃdZˆÜ^" Æh‚«¶¿ýmúlqó¼î0 5a—móMV¸•õ¨×¦:¡Ä&B„^ædˆp‹ÎBJÐe
/U4Q¨ô¢ès&Ñãc¡X3µ¬GXÆûäøŸ£¤:€¶ ÛZVºóRCº‡gbRÂo™‰…Ù¼5fvæIÓ|€¾ò5b��
---END---
HEADER: date: Tue, 21 Dec 2010 15:14:44 GMT
HEADER: server: Apache/2
HEADER: x-powered-by: PHP/5.2.14
HEADER: set-cookie: c80730546823d3ee08fca1f58ad29fce=2ffde47ad896d887fb37d7ff69858d2a; path=/
HEADER: p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
HEADER: vary: Accept-Encoding,User-Agent
HEADER: content-encoding: gzip
HEADER: content-length: 176
HEADER: connection: close
HEADER: content-type: text/xml
COOKIE: c80730546823d3ee08fca1f58ad29fce=2ffde47ad896d887fb37d7ff69858d2a
---INFLATED RESPONSE---[399 chars]---
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><array>
<data>
<value><string>system.listMethods</string></value>
<value><string>system.methodHelp</string></value>
<value><string>system.methodSignature</string></value>
<value><string>system.multicall</string></value>
<value><string>system.getCapabilities</string></value>
</data>
</array></value>
</param>
</params>
</methodResponse>
---END---
---PARSED---
xmlrpcval::__set_state(array(
'me' =>
array (
'array' =>
array (
0 =>
xmlrpcval::__set_state(array(
'me' =>
array (
'string' => 'system.listMethods',
),
'mytype' => 1,
'_php_class' => NULL,
)),
1 =>
xmlrpcval::__set_state(array(
'me' =>
array (
'string' => 'system.methodHelp',
),
'mytype' => 1,
'_php_class' => NULL,
)),
2 =>
xmlrpcval::__set_state(array(
'me' =>
array (
'string' => 'system.methodSignature',
),
'mytype' => 1,
'_php_class' => NULL,
)),
3 =>
xmlrpcval::__set_state(array(
'me' =>
array (
'string' => 'system.multicall',
),
'mytype' => 1,
'_php_class' => NULL,
)),
4 =>
xmlrpcval::__set_state(array(
'me' =>
array (
'string' => 'system.getCapabilities',
),
'mytype' => 1,
'_php_class' => NULL,
)),
),
),
'mytype' => 2,
'_php_class' => NULL,
))
---END---
I got this value back
<methodResponse>
<params>
<param>
<value><array>
<data>
<value><string>system.listMethods</string></value>
<value><string>system.methodHelp</string></value>
<value><string>system.methodSignature</string></value>
<value><string>system.multicall</string></value>
<value><string>system.getCapabilities</string></value>
</data>
</array></value>
</param>
</params>
</methodResponse>
|
Exactly the same call to a non-JMS installation (singe Joomla installation) returns all the other methods as well.
|
|
|
|
|
Re:XMLRPC Plugin 14 Years ago
|
Karma: 54
|
The key elements is not what is sent or the reply received but what is received by JMS Multisites.
Please debug the receiving call in JMS Multisites to verify the host URL received.
If you want that we do it for you, here it is our billable support
www.jms2win.com/download?page=shop.produ...35&category_id=1
|
|
|
|
|
Re:XMLRPC Plugin 14 Years ago
|
Karma: 0
|
Hi Edwin,
thx for your reply. I may have found the solution, although I'm not quite sure what exactly is happening.
In the [jms_root]/xmlrpc/index.php file an error was thrown about array_merge (line 46). After printing the array $allCalls I noticed that the first key in the array was empty. Hence the problem, the array never got filled with all the methods. This is the latest version of xmlrpc btw.
I fixed it by adding on line 46 (above array_merge):
Code: |
if( !is_array( $calls ) )
$calls = array();
|
All the published xmlrpc methods are returned now.
I will do some more testing to see if this fixes the issue permanently.
FYI: I used the following php code to check the client request (to see if the right slavesite was called:
Code: |
echo $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
The right call was made ( www.slavesite.nl/xmlrpc/index.php), so maybe the problem has nothing to do with JMS.
|
|
|
|
|
Re:XMLRPC Plugin 14 Years ago
|
Karma: 54
|
I am glad to see you have identified the potential reason.
Thank you for this post that perhaps will help other customers.
|
|
|
|
|
|