Discussion:
[phpxmlrpc] Need help for xmlrpc
Aymen GRUN
2008-12-17 16:02:35 UTC
Permalink
Hi all,
I'm using xmlrpc.inc,v 1.158 2007/03/01 21:21:02
My problem is that xmlrpc_client() needs $path variable, I'm beginner with
this framework and I don't understand what's this variable ?
I asked the xmlrpc server admin and he said that he don't know about this
variable, all what he gives me is the server url and methods name :
for example : https://toto.titi.com:8443/tata/getSomething

he also gives me a client example but in java :

PostMethod post = new PostMethod("
https://toto.titi.com:8443/tata/getSomething");
RequestEntity entity = new StringRequestEntity(inputRequest,
"application/xml", "ISO-8859-1");
post.setRequestEntity(entity);

HttpClient httpclient = new HttpClient();
int result = httpclient.executeMethod(post);

How can I communicate with this server and execute those methods in php and
using xmlrpc.inc,v 1.158 2007/03/01 21:21:02 ?

Another issue : when using https, why it fails returning this error message
: "Fault code: [16] Reason: 'No CURL support compiled in.'"
what's the solution to work with a https server ? Knowing that I have the
security certificate xxx.cer for this https server.

Thanks.
--
---------
Aymen GRUN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.usefulinc.com/pipermail/phpxmlrpc/attachments/20081217/a4317ebd/attachment.htm
Gaetano Giunta
2008-12-17 18:05:31 UTC
Permalink
Post by Aymen GRUN
Hi all,
I'm using xmlrpc.inc,v 1.158 2007/03/01 21:21:02
My problem is that xmlrpc_client() needs $path variable, I'm beginner
with this framework and I don't understand what's this variable ?
I asked the xmlrpc server admin and he said that he don't know about
for example : https://toto.titi.com:8443/tata/getSomething
PostMethod post = new
PostMethod("https://toto.titi.com:8443/tata/getSomething");
RequestEntity entity = new
StringRequestEntity(inputRequest, "application/xml", "ISO-8859-1");
post.setRequestEntity(entity);
HttpClient httpclient = new HttpClient();
int result = httpclient.executeMethod(post);
How can I communicate with this server and execute those methods in
php and using xmlrpc.inc,v 1.158 2007/03/01 21:21:02 ?
The online docs for the creator method of the client are here:
http://phpxmlrpc.sourceforge.net/doc-1.1/ch05s01.html#d0e322

In short, the line you need is:
$client = new xmlrpc_client("/tata/getSomething
<https://toto.titi.com:8443/tata/getSomething>
<https://toto.titi.com:8443/tata/getSomething>", "toto.titi.com
<https://toto.titi.com:8443/tata/getSomething>", 8443
<https://toto.titi.com:8443/tata/getSomething>);

One thing that worries me a little bit in the java example you gave is
that I see no trace of xmlrpc in there - of course the inputRequest
creation is not shown, but the "method name" looks to be coded in the
url, while in xmlrpc it is usually only part of the post body.
Are you sure you are using the xmlrpc protocol? Maybe the server just
expects a plain xml request via post (also known as REST-style
webservices, and not supported by phpxmlrpc lib)
Post by Aymen GRUN
Another issue : when using https, why it fails returning this error
message : "Fault code: [16] Reason: 'No CURL support compiled in.'"
what's the solution to work with a https server ? Knowing that I have
the security certificate xxx.cer for this https server.
To support https, the phpxmlrpc lib needs to have the curl extension
compiled in into php. Look up the documentation about setting up php on
your platform for that.

Bye
Gaetano

Loading...