Menu

Problems with XmlRpcValue = bool declaration

Help
Mark Ghosh
2003-11-23
2013-04-24
  • Mark Ghosh

    Mark Ghosh - 2003-11-23

    I am wondering if someone can help me with this. I am trying to declare one of the elements of an array of XmlRpcValue(s):

    XmlRpcValue args;
    args[0] = true;

    I am getting the following error:
    error C2666: '=' : 6 overloads have similar conversions

    Anyone else come across this? Any solutions? I looked through the XmlRpcValue.cpp file and the overloaded operators look ok, but the code is convoluted enough that I will spend days trying to figure out the problem.
    Thanks in advance!

     
    • Mark Ghosh

      Mark Ghosh - 2003-11-23

      Using the above method and XmlRpcClient, I am getting XML POST which looks like:
      <methodCall>
      <methodName>blogger.getUsersBlogs</methodName>
      <params>
      <param>
      <param><value>admin</value></param>
      </param>
      </params>
      </methodCall>

      If the value "admin" is a string, how would I get
      <methodCall>
      <methodName>blogger.getUsersBlogs</methodName>
      <params>
      <param>
      <param><value><string>admin</string></value></param>
      </param>
      </params>
      </methodCall>

       
    • Mark Ghosh

      Mark Ghosh - 2003-11-23

      Never mind. I found the answers.

      In the first case, define a seperate bool using
      XmlRpcValue true_test(true);
      and pass this to the array.

      In the second case, the tag addition is commented out in the code, remove the comments and add _ETAG properties in the definitions.

       
    • eric lindvall

      eric lindvall - 2004-10-20

      There is a bug (in that the overload that takes a bool is missing).

      The easiest work-around is what you described:
      request["entry"] = XmlRpcValue (true);

      I have a patch that fixes that (and other) issues at:
      http://5stops.com/xmlrpcpp/patches/value-cleanup.patch

       

Log in to post a comment.