Reply Objetc Array in Web Service XML-RPC

0

Friends, I need the XML-RPC Web Service that I developed to respond to an object Array (1) and what it responds to is an objetc Objetc (1)

What answers me is with the structure: Response object Object (1) - filter: 0 String (1): "2"

And what I need is: Response object Array (1) - filter: 0 String (2): "03"

This I could see with the Google Chrome extension XML-RPC Client Link Extension The code of the WS is the following:

<?php
include 'xmlrpc.inc';
include 'xmlrpcs.inc';
function Suma ($xmlrpcmsg) {
    $uno = $xmlrpcmsg->getParam(0)->scalarval();
    $dos = $xmlrpcmsg->getParam(1)->scalarval();
    $resultado = $uno+$dos;
    $xmlrpcretval = new xmlrpcval(array(new xmlrpcval($resultado, "string")),"struct");
    $xmlrpcresponse = new xmlrpcresp($xmlrpcretval);
    return $xmlrpcresponse;
}

$servidor = new xmlrpc_server(array(
                    "ejemplo.Suma" =>  array( 
                    "function" => "Suma", 
                    "signature" => array(array($xmlrpcInt, $xmlrpcInt, $xmlrpcInt)), 
                    "docstring" =>  'Resultado suma'
                    )));                              
?>
    
asked by Seba Venegas 30.11.2018 в 20:28
source

0 answers