I am looking and have searched extensively, but is there more information on the status of user registration service? Something like user.register?

If I wanted to develop it, how would I go about it?

This info, was somewhat helpful, but it doesn't work on D6:
http://drupal.org/node/178051

I am using 6.x-2.x-dev at the moment, and have used 6.x-0.14 before that.

Thanks!

Comments

Paintbox’s picture

I have been searching further and apparently user.save is used for registration, problem is I dont see upfront what input it is expecting, thats what I will research next.

Paintbox’s picture

I found this piece of code for flash (AS2) :

var userCreate:Object = new Object();
	userCreate.name = "user900";
	userCreate.pass = "password";
	userCreate.mail = "mymail@mymaildomain.com";
	userCreate.status = 1;
	//
	var reguser:PendingCall = user.save(userCreate);
	reguser.responder = new RelayResponder(this, "reguser_OK", "reguser_Failed");

But don't forget to also check user permissions, make sure anonymous role can create a new user.

To only thing now to make it completely work is that the user does not get any mail notifying of the creation, as if the authentication is being bypassed. Am I missing something here?

Paintbox’s picture

To clarify, how does one make sure a proper registration mail is being sent?

For sure someone must know the answer to this?

marcingy’s picture

Status: Active » Closed (duplicate)

The lack of email is related to this issue http://drupal.org/node/407726 in that user save is being called rather than the full drupal user registration process. Marking this as a duplicate and increasing priority of the other ticket. I roll a patch for this next weekend.

Paintbox’s picture

Thanks for looking into it! Much appreciated since I didn't get very far myself.

drecute’s picture

I have been making a research on this as well. Before finding this post I already used the user.save as the method to call for the user registration service. My implementation is in Java and my code snippet is as follows:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package userwebservice;

/**
 *
 * @author Kayode Odeyemi
 */

import java.net.*;
import java.io.*;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

public class DrupalApacheSoapService {

    public static String username = "myusername";
    public static String email = "example@mail.com";
    public static String fullnames = "Myfirstname";
    public String serviceUrl = "http://opevel?q=services/soap/";


    public static void main(String[] args) {
        new DrupalApacheSoapService().request(username, email, fullnames);
    }

    private void IntializeHash(DrupalServiceCommands drupalServiceCommand) {
        return;
    }

    private void request(String username, String email, String fullnames) {
        try {
            URL url = new URL(serviceUrl);
            Call call = new Call();
            call.setTargetObjectURI("urn:DrupalApacheSoapService");//this is of the format URI:local name where the local name is the SIB(Service Implementation Bean) class name
            call.setMethodName(DrupalServiceCommands.SaveUser.toString());
            call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
            Vector params = new Vector ( );
            params.addElement (new Parameter("username", String.class, username, null));
            params.addElement(new Parameter("email", String.class, email, null));
            params.addElement(new Parameter("fullnames", String.class, fullnames, null));
            //params.add(username);
            //params.add(email);
            //params.add(fullnames);
            call.setParams (params);
            System.out.print("The SOAP Server says: ");
            Response resp = call.invoke(url, "");
            if (resp.generatedFault ( )) {
            Fault fault = resp.getFault ( );
            System.out.println ("\nOuch, the call failed: ");
            System.out.println (" Fault Code = " + fault.getFaultCode ( ));
            System.out.println (" Fault String = " + fault.getFaultString ( ));
            } else {
            Parameter result = resp.getReturnValue ( );
            System.out.print((Object)result.getValue ( ));
            System.out.println( );
            }
        } catch (MalformedURLException ex) {
            Logger.getLogger(DrupalApacheSoapService.class.getName()).log(Level.SEVERE, null, ex);
        } catch(SOAPException se) {
            System.out.println(se.getMessage());
        }
    }

}

When I ran this code, everything works fine but I got this unexpected response from the server

No Deserializer found to deserialize a 'http://schemas.xmlsoap.org/soap/envelope/:Parameter' using encoding style 'null'.

I don't know what it is right now, but I'm thinking it has something to do with the service method call.

I will be glad if anyone has experience in this to please help out.

Thanks