Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8017145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:45:20+00:00 2026-06-04T20:45:20+00:00

I’m using Charles Cook’s xml-rpc.net in an attempt to make an xml-rpc service call.

  • 0

I’m using Charles Cook’s xml-rpc.net in an attempt to make an xml-rpc service call.

The request needs to be sent in this format:

<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>leads</methodName>
<params>
<param>
<value>
<struct>
<member>
 <name>key</name>
 <value>
  <string>XXXXXXXXXXX</string>
 </value>
</member>
<member>
 <name>leads</name>
 <value>
  <base64>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGxlYWRzPgogICA8bGVhZD4K
          ICAgICAgPGlkPjM5OTk3PC9pZD4KICAgICAgPEZpcnN0TmFtZT5Cb2IgSmltPC9GaXJzdE5hbWU+
          CiAgICAgIDxMYXN0TmFtZT5TbWl0aDwvTGFzdE5hbWU+CiAgICAgIDxBZGRyZXNzPjEyMzQgV2Vz
          :
          :
          ICAgICA8UmVjZWl2ZUFkZGxJbmZvPlllczwvUmVjZWl2ZUFkZGxJbmZvPgogICAgICA8bG9wX3dj
          X3N0YXR1cz5ObzwvbG9wX3djX3N0YXR1cz4KICAgPC9sZWFkPgo8L2xlYWRzPg==
  </base64>
 </value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>

Where member name contains multiple tags in this format:

 <?xml version="1.0" encoding="UTF-8"?>
 <leads xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns="http://www.siteName.com/Leads"
   xsi:schemaLocation="http://www.siteName.com/Leads Leads.xsd"
   version="1.0">
  <lead>
  <id>39997</id>
  <first_name>Jim</first_name>
  <last_name>Smith</last_name>
  <address>1234 West 5th Street</address>
  <address2/>
  <city>Beverly Hills</city>
  <state_or_province>CA</state_or_province>
  <country>USA</country>
  <postal_code>90210</postal_code>
  <best_number>555-121-3322</best_number>
  <best_number_ext/>
  <alt_number/>
  <alt_number_ext/>
  <time_zone>Pacific</time_zone>
  <best_time>mid day</best_time>
  <request_uri>http://siteName.com/contact/
               ?source=VendorName&amp;leadid=VendorId&amp;ad=SomeAd</request_uri>
  <handoff_id>X-vendorid</handoff_id>
  </lead>
  <lead>
  <id>39987</id>
  <first_name>George</first_name>
   :
   :
  <lop_wc_status>No</lop_wc_status>
  <request_uri>http://siteName.com/contact/
               ?source=VendorName&amp;leadid=VendorId&amp;ad=SomeAd</request_uri>
 </lead>
</leads>

The documentation on the webservice method calls for one parameter that contains two values (array of values) – key and leads. The xml document containing the leads data must be packaged as a binary object. This value must be named leads and must be of type base64.

Here’s what I got so far that is failing:

My struct containing the leads info-

     [Serializable]
     public struct myLeads
     {
      public string id;
      public string first_name;
      public string last_name;
     }

The interface

    public interface ILead
    {
    [CookComputing.XmlRpc.XmlRpcMethod("leads", StructParams = true)]
    string NewLead(string key, myLeads leads);
    }

Finally, I initialize the struct values and call the method:

    myLeads newLead = default(newLeads);
    Guid guid = System.Guid.NewGuid();
    newLead.id = guid.ToString();
    newLead.first_name = "Test";
    newLead.last_name = "LastNameTest";
    newLead.address = "111 Test St";

    var leadPost = (ILead)XmlRpcProxyGen.Create(typeof(ILead));
    var clientProtocol = (XmlRpcClientProtocol)leadPost;
    clientProtocol.Url =  "https://dashboard.sitename.com/webservices/rpc/xmlrpc";
    try
    {
        result = leadPost.NewLead("XXXKeyXXX", newLead);
        Label1.Text = result;
    }
    catch (Exception ex)
    {
        throw ex;
    }

My code throws the error in the try block: The leads member is not of type base64! How do I set this up properly?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:45:22+00:00Added an answer on June 4, 2026 at 8:45 pm

    The parameter to the leads method should be a struct or class containing two members, for example:

    public struct leadsParam
    {
       public string key;
       public byte[] leads;
    }
    

    and the interface would be

    public interface ILead
    {
        [XmlRpcMethod("leads")]
        string NewLead(leadsParam leads);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.