Menu

All types reutrn TypeArray?

Help
2004-10-07
2013-04-24
  • Michael Lovett

    Michael Lovett - 2004-10-07

    I'm sending several types of requests to my C++ app and regardless of the type sent (array, struct, string) all are being reported as TypeArray (when I do a getType() call.

    Any ideas?

    Dumbfounded in Detroit :-)

     
    • eric lindvall

      eric lindvall - 2004-10-19

      An XML-RPC Request is always an array and an XML-RPC response is always a single value.

      Even if you use:

      XmlRpcValue request;
      requset = "Some String";

      client.execute (method, request, response);

      The other side will have to access it with:
      Method::execute (XmlRpcValue &request, XmlRpcValue &response)
      {
          std::cout << request[0] << std::endl;
      }

      So if you pass a struct, you'll just have to use:
      request[0]["struct-member"]

      to access it.

       

Log in to post a comment.