How do I specify the type of a non-string param value in an XMLRPC request?

I am using the deprecated XMLRPC service to export spaces.  I can formulate and successfully execute a request for the exportSpace method with three String parameters:

<?xml version="1.0"?>
<methodCall>
<methodName>confluence2.exportSpace</methodName>
<params>
<param>
<value>a4b89b18f0</value>
</param>
<param>
<value>cm2011</value>
</param>
<param>
<value>TYPE_XML</value>
</param>
</params>
</methodCall>

but the method I need has a fourth parameter, which is boolean, specifying whether I want to export everything. When I try to add it like this:

 <param>
<value>true</value>
</param>

I get a response saying that there's no method by that name with four String parametersparam is a string. The WSDL spec for the SOAP service method definition has the fourth parameter with a type attribute with the value"xsd:boolean", so I naïvely tried changing my param tag to add the attribute, without success.

I realize that this was a shot in the dark -- after all, this isn't a SOAP request -- but I haven't found anywhere how to specify a non-default type for a parameter in XMLRPC requests.

This should be easy, but I haven't found it anywhere.

1 answer

1 accepted

Sorry; it was easy.

The answer is at http://xmlrpc.scripting.com/spec.html, which says that you surround the content of the value tag with a type-specifying tag.  In my case:

<param>
<value><boolean>true</boolean></value>
</param>

Now, however, it says that there's no such method with three Strings and a boolean...

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Monday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

195 views 3 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you