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 8027217
In Process

The Archive Base Latest Questions

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

I’m trying to call an xml-rpc web service method that takes 1 parameter (an

  • 0

I’m trying to call an xml-rpc web service method that takes 1 parameter (an array of values) key and leads.

Key must be named ‘key’ and must have a value of type string.
Leads is an xml document containing the leads data.This must be packaged as a binary object. This value must be named leads and must be of type base64.

Alright so the SINGLE parameter for this method call in python is:

 r = proxy.leads({'key': key, 'leads': doc})

My first question is how can I do this in c#? The closest thing .net has to that is a dictionary object which won’t work for this.

Secondly, how do I make the xml doc a binary object of type base64? Is that the same as converting a byte[] array to base64 string? Like this:

 Convert.ToBase64String(byteArray)

Here is what the request should look like:

 <?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>

I’m completely stuck on this problem. Any help would be much appreciated.

  • 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-04T23:44:47+00:00Added an answer on June 4, 2026 at 11:44 pm

    Check this out http://codinghints.blogspot.com/2010/03/xml-rpc-calls-with-c.html to see how one can manually call the service. There are probably libraries to do it in nice way…

    How you specify parameters depends on what approach you find to construct the request. In case of manually constructing request (I’d recommend XDocument to build XML, not String.Format, but String.Format may be ok in very simple cases like your example) you would just put values into right places in boilerplate XML…

    Yes byte array to base64 is Convert.ToBase64String(byteArray).

    Something like following could be enough (but please try use proper ways to construct XML for non-one-time-use code):

    String.Format("<?xml versi... <name>key</name><value><string>{0}</string>...", 
          key, Convert.ToBase64String(byteArray));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters

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.