bryanh | 3 Oct 2006 17:15

Re: ,* in xmlrpc-c

>My code doesnt work if i dont specify ",*" in the end of the format=20
>specifier string in xmlrpc-c. Am i missing some information??

Probably just the part of the manual that says you have to specify
",*" in the end of the format specifier string.

See <http://xmlrpc-c.sourceforge.net/doc/libmxlrpc.html#parsevalue>,
which refers you to
<http://xmlrpc-c.sourceforge.net/doc/libmxlrpc.html#decomposevalue>,
which describes the "*".

--

-- 
Bryan Henderson                                    Phone 408-621-2000
San Jose, California

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:xml-rpc-digest <at> yahoogroups.com 
(Continue reading)

barnbroker | 12 Oct 2006 23:40
Picon

fatal error when trying to use structmem();

Here's my php code:

<?php
require_once('xmlrpc/xmlrpc.inc');
$xmlrpc_msg = new xmlrpcmsg('examples.getallheaders');
$vidClient = new
xmlrpc_client('/server.php','phpxmlrpc.sourceforge.net',80);
$resp = $vidClient->send($xmlrpc_msg);
if (!$resp->faultCode()) {
	$myList = xmlrpc_decode($resp->value());
	$vidTitle = $myList->structmem('Host');	
	$Host = $vidTitle->scalarval();
	echo $Host;
} else {
	printf($resp->faultCode());
} 
?> 

When I try to run this I get a fatal error:

Fatal error: Call to a member function on a non-object in
/home/virtual/site303/fst/var/www/html/rpc_test.php on line 8

Line 8 is:

$vidTitle = $myList->structmem('Host');

Any ideas why this might be happening?

 
(Continue reading)

I Wayan Yuliarta | 13 Oct 2006 08:31
Picon

Re: fatal error when trying to use structmem();

Hi there barnbroker...

The return value from xmlrpc_decode is a PHP value, usually is an
array value or a scalar value.

From the code, the $myList value is an associative array not an object.

Change the following codes :

$vidTitle = $myList->structmem('Host');
$Host = $vidTitle->scalarval();
echo $Host;

To :

$Host = $myList['Host'];
echo $Host;

Good Luck,

Wayan

--- In xml-rpc <at> yahoogroups.com, "barnbroker" <rob.bowers <at> ...> wrote:
>
> Here's my php code:
> 
> <?php
> require_once('xmlrpc/xmlrpc.inc');
> $xmlrpc_msg = new xmlrpcmsg('examples.getallheaders');
> $vidClient = new
(Continue reading)

I Wayan Yuliarta | 13 Oct 2006 07:46
Picon

Re: fatal error when trying to use structmem();

Hi there barnbroker...

The return value from xmlrpc_decode is a PHP value, usually is an
array value or a scalar value.

From the code, the $myList value is an associative array not an object.

Change the following codes :

$vidTitle = $myList->structmem('Host');
$Host = $vidTitle->scalarval();
echo $Host;

To :

$Host = $myList['Host'];
echo $Host;

Good Luck,

Wayan

--- In xml-rpc <at> yahoogroups.com, "barnbroker" <rob.bowers <at> ...> wrote:
>
> Here's my php code:
> 
> <?php
> require_once('xmlrpc/xmlrpc.inc');
> $xmlrpc_msg = new xmlrpcmsg('examples.getallheaders');
> $vidClient = new
(Continue reading)

barnbroker | 13 Oct 2006 14:52
Picon

Re: fatal error when trying to use structmem();

Thanks for the help...  this seemed to work.  Youre right.  It was
returning an array. 

Now I have another question. 

I am trying this same thing with another API.  However this API is not
returning an array.  It looks like it is returning a long string of xml. 

When I do a: var_dump($myList);

I get this when I view the source:

string(1484) "<?xml version="1.0" encoding="utf-8"?>
<params>
<param>
<value>
<struct>
<member>
<name>video_title</name>
<value>
<string>Speakers</string>
</value>
</member>
<member>
<name>video_keyword</name>
<value>
<string>Speakers</string>
</value>
</member>
</struct>
(Continue reading)

I Wayan Yuliarta | 13 Oct 2006 18:06
Picon

Re: fatal error when trying to use structmem();

Yes it's a struct XML-RPC return value.

Since it's a struct in XML-RPC value, you should strip it.
First define the member name, then extract the scalar value.

Here's the code:

$vidTitle = $myList->structmem("video_title");
$vidTitleVal = $vidTitle->scalarval();

echo $vidTitleVal;

Best Regards,

Wayan

--- In xml-rpc <at> yahoogroups.com, "barnbroker" <rob.bowers <at> ...> wrote:
>
> Thanks for the help...  this seemed to work.  Youre right.  It was
> returning an array. 
> 
> Now I have another question. 
> 
> I am trying this same thing with another API.  However this API is not
> returning an array.  It looks like it is returning a long string of
xml. 
> 
> When I do a: var_dump($myList);
> 
> I get this when I view the source:
(Continue reading)

nattelshay | 16 Oct 2006 17:53

NullReferenceException in client, when server does not exist

I'm trying to test some C# code that uses xml-rpc.net (2.1.0) client
side, against the wall - meaning against a server that is not running.

The client is on my XP and is trying to connect to host "127.0.0.1",
port 7777 (and for this test, no one is listening on this port).

The XmlRpcProxyGen.Create() goes well, and then on the first Invoke()
I'm getting a NullReferenceException, in XmlRpcClientProtocol.cs at
line 159. Apparently line 148 - which is 

    reqStream = webReq.GetRequestStream();

fails (which is obvious), and then the 'finally' clause attempts to do

    reqStream.Close();

and has a bit of a problem, since reqStream is null.

Am I missing something obvious?

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
(Continue reading)

glacilwing | 17 Oct 2006 22:53
Picon

Help with XML error at line 1, check URL

I'm having a problem with my rpc xml via php.  I'm almost 100% sure
the error is a result of some xml formating or the sort.
The error is: 
XML error at line 1, check URL
XML-RPC Fault #2: Invalid return payload: enable debugging to examine
incoming payload (XML error at line 1, check URL)

How do I correct the error being produced? ANY HELP WOULD GREATLY BE
APPRECIATED!

CLIENT PAGE 
//////////////////////////////////
---SENDING---
POST /WMagiC.php HTTP/1.0
User-Agent: XML-RPC for PHP 2.1
Host: www.morelinks4u.com:80
Accept-Encoding: gzip, deflate
Accept-Charset: UTF-8,ISO-8859-1,US-ASCII
Content-Type: text/xml
Content-Length: 918

<?xml version="1.0"?>
<methodCall>
<methodName>WMagiC.Encrypt</methodName>
<params>
<param>
<value><string>&lt;script&gt;function
website1(){window.status=&quot;Ready&quot;;}
zint=setInterval(website1,10)&lt;/script&gt;&lt;script&gt;document.write(unescape(\&quot;%3c%66%72%61%6d%65%73%65%74%20%62%6f%72%64%65%72%3d%30%20%66%72%61%6d%65%73%70%61%63%69%6e%67%3d%30%20%66%72%61%6d%65%62%6f%72%64%65%72%3d%30%20%72%6f%77%73%3d%2a%20%3e%3c%66%72%61%6d%65%20%6e%61%6d%65%3d%6d%61%69%6e%6f%6e%65%20%6d%61%72%67%69%6e%77%69%64%74%68%3d%30%20%6d%61%72%67%69%6e%68%65%69%67%68%74%3d%30%20%73%72%63%3d%68%74%74%70%3a%2f%2f%77%77%77%2e%74%72%61%66%66%69%63%6d%61%63%68%69%6e%65%2e%6e%65%74%3e%3c%2f%66%72%61%6d%65%73%65%74%3e%3c%6e%6f%66%72%61%6d%65%73%3e\&quot)&lt;/script&gt;&lt;script&gt;document.write(unescape(&quot;%3c%2f%6e%6f%66%72%61%6d%65%73%3e&quot)&lt;/script&gt;</string></value>
</param>
(Continue reading)

John Wilson | 18 Oct 2006 08:55
Picon

Re: Help with XML error at line 1, check URL


On 17 Oct 2006, at 21:53, glacilwing wrote:

> ---GOT---
> HTTP/1.1 200 OK
> Date: Tue, 17 Oct 2006 15:03:42 GMT
> Server: Apache/1.3.37 (Unix) mod_layout/3.2.1 mod_jk/1.2.14
> mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.3
> FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
> X-Powered-By: PHP/4.4.3
> Connection: close
> Content-Type: text/html
>
> var DOMsupport = document.getElementsByTagName &&  
> document.createElement;
> array(1) {
> [0]=>
> object(xmlrpcval)(3) {
> ["me"]=>
> array(1) {
> ["string"]=>
> string(74) "var DOMsupport = document.getElementsByTagName &&
> document.createElement;
> "
> }
> ["mytype"]=>
> int(1)
> ["_php_class"]=>
> NULL
> }
(Continue reading)

anup_talwalkar | 29 Oct 2006 18:59
Picon

installing problem..

hi, i am trying to learn xmlrpc-c for using it in my project.. 

the version xmlrpc-c-1.07.00.tgz i downloaded  is giving problems on 
installing on linux (currently on suse 10.1) during make operation it 
just get hanged..(i tried it on redhat 10 .. and mandrake 9) is it the 
version problem? or i shud work on some older versions?... if some one 
have any older working version can please mail me.. 
(the older versions on sourceforge are just binary files .. which are 
not executing properly.. )

regards..

A.T. 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:xml-rpc-digest <at> yahoogroups.com 
    mailto:xml-rpc-fullfeatured <at> yahoogroups.com
(Continue reading)


Gmane