1

My environment : Drupal 7 & service 3.x

I use userpoints and service-userpoints. I want to CRUD userpoints.

So i create a xmlrpc server and test it by Postman from Chrome store.

The xml code is belowed:

<?xml version='1.0' ?>
<methodCall>
  <methodName>pointss.add</methodName>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>uid</name>
            <value>
              <int>1</int>
            </value>
          </member>
          <member>
            <name>points</name>
            <value>
              <int>150</int>
            </value>
          </member>
          <member>
            <name>description</name>
            <value>
              <string>test for xmlrpc service</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

"pointss" is my userpoints-api's alias

i connect successful but got the message belowed.

<?xml version="1.0"?>

faultCode 401 faultString Missing required argument points

How can i fix my xml body? Does anybody have experience? Thanks a lot.

0

I finally get it.

The XMLRPC format is belowed:

<?xml version="1.0"?>
<methodCall>
   <methodName>pointss.addpoints</methodName>
   <params>
     <param>
           <name>uid</name>
           <value><int>1</int></value>
           <name>points</name>
           <value><int>150</int></value>
           <name>tid</name>
           <value><int>18</int></value>
           <name>operation</name>
           <value><string>test for operation</string></value>
           <name>description</name>
           <value><string>test for description</string></value>
           <name>entity_type</name>
           <value><string>node</string></value>
           <name>entity_id</name>
           <value><int>1</int></value>
     </param>
   </params>
</methodCall>

If somebody use service3.x and userpoints service, i hope i can help you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.