[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlrpc-user
Subject:    Re: How to use Vector or Hashtable from a PHP Client
From:       Eric BOYER <Eric.Boyer () insa-toulouse ! fr>
Date:       2006-03-22 13:00:37
Message-ID: 44214A75.9070909 () insa-toulouse ! fr
[Download RAW message or body]

the right syntax is :

to receive a Hashtable :
$myArray = new xmlrpcval(
  array(
    "tom" => new xmlrpcval("Tom"),
    "dic" => new xmlrpcval("Dick"),
    "harry" => new xmlrpcval("Harry")
  ),
  "struct");

to receive a Vector
$myArray = new xmlrpcval(
  array(
    0 => new xmlrpcval("Tom"),
    1 => new xmlrpcval("Dick"),
    2 => new xmlrpcval("Harry")
  ),
  "array");


Christoph Theis a écrit :

>Eric BOYER <Eric.Boyer@insa-toulouse.fr> wrote:
>  
>
>>my problem comes from my PHP Client.
>>with
>>    
>>
>
>  
>
>>$myArray = new xmlrpcval(
>>  array(
>>    1 => new xmlrpcval("Tom"),
>>    3 => new xmlrpcval("Dick"),
>>    5 => new xmlrpcval("Harry")
>>  ),
>>  "array");
>>    
>>
>
>  
>
>>you are suppose to receive an Hashtable
>>    
>>
>
>Now I'm suprised, because you are using this, but your Java server
>expects a Vector. Hmmm, perhaps this is a Vector with 5 or 6 elements,
>some of them are undefined?
>
>Regards
>
>Christoph
>
>
>
>  
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic