On 9/26/06, Manuel Fernández Campos <[EMAIL PROTECTED]> wrote:
Hello.

I need a complex structure to my project. I define this structure in
C++ server that it use the xmlrpc++ lib.  In the server i try to make
a structure that contain this "struct of array of a struct".

Well, the code that does this is:

                result["Energia"] = cds->getEnergiaTotal();
                result["Iteraccion"] = cds->getIteraccion();

                lista = cds->getNodos();
                nodo = lista->getNodoInicial();
                i=0;
                do
                {
                        result["nodos"][i]["x"] = nodo->getX();
                        result["nodos"][i]["y"] = nodo->getY();
                        nodo = nodo->sig;
                        i++;
                }while(nodo != lista->getNodoInicial());


the struct have three terms or elements. The two firts are a
String-double pair. The third term is a
String-array-struct(String-int).

With the key "nodos" i obtain the array where each element is a structure.

this work perfectly with a C++ client but I need that the client will
be in Java.

the problem that I have is that the Array it recognizes as an object
and I cannot work with him.

I am unsure, whether I understand your problem right, but my
impression is that you should simply cast the result object to an
object array. In other words, if you currently have

   Object result = client.execute(...)

then make this

   Object[] array = (Object[]) client.execute(...)

Is that possible?


Jochen


--
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to