Foren

Home » Liferay Portal » English » Liferay Legacy

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
lyo li yashnoo
UserServiceSoap addUser method set passwordEncrypt to 1?
20. März 2007 18:54
Antwort

lyo li yashnoo

Rang: Regular Member

Nachrichten: 112

Eintrittsdatum: 28. November 2006

Neue Beiträge

Hi friends:

I add a portal user by using method "UserServiceSoap.addUser(...)" method,But I find that the passwordEncrypt column is set to "1" automatically.It's not what I want. I mean that I want to add a user add set the passwordEncrypt to "0".There is not passwordEncrypt parameter in "addUser(...)" method.emoticon If I don't want to change liferay code,how to do it? Thks
Jorge Ferrer
RE: UserServiceSoap addUser method set passwordEncrypt to 1?
31. März 2007 09:26
Antwort

Jorge Ferrer

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 2757

Eintrittsdatum: 31. August 2006

Neue Beiträge

That cannot be done through the API, but you can set a property in portal(-ext).properties to avoid having the user passwords encrypted:
1passwords.encrypted=false
lyo li yashnoo
RE: UserServiceSoap addUser method set passwordEncrypt to 1?
3. April 2007 17:46
Antwort

lyo li yashnoo

Rang: Regular Member

Nachrichten: 112

Eintrittsdatum: 28. November 2006

Neue Beiträge

Jorge Ferrer:
That cannot be done through the API, but you can set a property in portal(-ext).properties to avoid having the user passwords encrypted:
1passwords.encrypted=false


Thank you! I do it in this way and no problem. emoticon
praveen kumar
RE: UserServiceSoap addUser method set passwordEncrypt to 1?
22. März 2010 23:50
Antwort

praveen kumar

Rang: New Member

Nachrichten: 3

Eintrittsdatum: 19. März 2010

Neue Beiträge

hi ,

any one could help me, how to call UserService and add new user in to liferay database.

i have tried but i got the following error. With this i have attached my code also for you reference ...

Error : AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:lab93

java.rmi.RemoteException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.ja

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

package com.liferay.portal.events;

/**
*
* @author kumar.ganapathy
*/
import java.net.URL;

import com.liferay.client.soap.portal.model.UserSoap;
import com.liferay.client.soap.portal.service.ServiceContext;
import com.liferay.client.soap.portal.service.http.GroupServiceSoap;
import com.liferay.client.soap.portal.service.http.GroupServiceSoapServiceLocator;
import com.liferay.client.soap.portal.service.http.UserServiceSoap;
import com.liferay.client.soap.portal.service.http.UserServiceSoapServiceLocator;
import java.io.Serializable;
import java.util.Iterator;
import javax.xml.namespace.QName;
import javax.xml.rpc.encoding.Deserializer;
import org.apache.axis.encoding.DeserializerFactory;

public class SampleWSClient1 implements Serializable , DeserializerFactory
{
public static void main(String[] args)
{
try
{
long creatorUserId = 0;
boolean autoPassword = false;
boolean autoScreenName = false;
String openId = "";
java.util.Locale locale = new java.util.Locale("en_US");
String middleName = "";
int prefixId = 0;
int suffixId = 0;
int birthdayMonth = 3;
int birthdayDay = 23;
int birthdayYear = 1985;
String jobTitle = "";
//long[] groupIds = null;
long[] organizationIds = null;
long[] roleIds = null;
long[] userGroupIds = null;
boolean sendEmail = false;
ServiceContext serviceContext = new ServiceContext();
String remoteUser = "test";
String password = "test";
String screenName="praveekan";
String emailAddress="pravee@liferay.com";
String password1="password";
String firstName="pravee";
String lastName="kan";
long[] groupIds = null;

// UserServiceSoapServiceLocator locator = new UserServiceSoapServiceLocator("http://10.1.11.93:9000/tunnel-web/axis/Portal_UserService?wsdl", new QName("Portal_UserService"));
UserServiceSoapServiceLocator locator = new UserServiceSoapServiceLocator();
UserServiceSoap soap = locator.getPortal_UserService(_getURL("12721", "Portal_UserService"));

UserSoap usoap= soap.addUser(10112, autoPassword,password1,password1,autoScreenName,screenName,emailAddress,openId,"ENGLISH",firstName,middleName,lastName,prefixId,suffixId, true,birthdayMonth,birthdayDay,birthdayYear, jobTitle, groupIds,organizationIds,roleIds,userGroupIds, sendEmail,new ServiceContext());

long[] uid={usoap.getUserId()};
System.out.println("uid : "+uid[0]);
soap.addUserGroupUsers(14502, uid);
}
catch (Exception e)
{
// TODO Auto-generated catch block
System.out.println("error message : "+e.getMessage());
e.printStackTrace();
}


}


public static URL _getURL(String userIdAsString, String serviceName) throws Exception {

// Unathenticated url

String url = "http://10.1.11.93:9000/tunnel-web/axis/" + serviceName;

// Authenticated url

if (false) {


url = "http://15730:password@10.1.11.93:9000/tunnel-web/axis/" + serviceName;
// url = "http://10.1.11.93:9000/tunnel-web/axis/" + serviceName;
}
System.out.println(url);
return new URL(url);
}

public Deserializer getDeserializerAs(String string) {
throw new UnsupportedOperationException("Not supported yet.");
}

public Iterator getSupportedMechanismTypes() {
throw new UnsupportedOperationException("Not supported yet.");
}
}

Antoine Comble
RE: UserServiceSoap addUser method set passwordEncrypt to 1?
14. Februar 2013 08:27
Antwort

Antoine Comble

Rang: Regular Member

Nachrichten: 204

Eintrittsdatum: 7. September 2012

Neue Beiträge

Hi,

Just replace ENGLISH by en_EN.