El error que te muestra el programa, como te comentó Tony, es un
problema en las credenciales de tu administrador. En la siguiente
línea de código, debes asegurarte que la información es correcta:
AppsForYourDomainClient apps = new AppsForYourDomainClient
(AppServiceBean.account,
AppServiceBean.domain,AppServiceBean.password);
Por ejemplo, AppServiceBean.account,
AppServiceBean.domain,AppServiceBean.password deberían tener este
formato:
AppsForYourDomainClient apps = new AppsForYourDomainClient
("[EMAIL PROTECTED]", "domain.com","Password");
Un problema frecuente, es utilizar el nombre del administrador sin
"@dominio.com".
Para saber si el usuario existe, puedes utilizar el código de
userExists, que comentamos anteriormente, con el username que generas
y si existe le puedes agregar el numero al final.
http://groups.google.com/group/google-apps-apis/browse_thread/thread/53e69f10acf037dc/7c5262464fc21564
Saludos.
Julian
On Nov 25, 1:55 am, "Abraham Segura" <[EMAIL PROTECTED]> wrote:
> Julian que tal
>
> Oye una pregunta creo que no me di a entender de mi requerimiento te lo
> explico
>
> Tengo que crear usuarios de la siguiente manera
>
> Ellos van a poner su nombre y su apellido y yo genero el username y el
> password y ademas tengo que validar si ya existe y si existe sumarle un
> numero, tu crees que tengas algun codigo de ejemplo que me pueda ayudar,
> espero que me puedas ayudar, muchas gracias de antemano.
>
> On Mon, Nov 24, 2008 at 8:35 AM, Julian (Google) <[EMAIL PROTECTED]> wrote:
>
> > Hi Abraham,
>
> > I don't understand clearly your problem, What is the problem with
> > username? this parameter is needed for apps.createUser.
>
> > (Puedes escribir el problema en Español, si crees que sería más fácil
> > explicarlo)
>
> > Cheers,
> > Julian
>
> > On Nov 23, 6:11 pm, "Abraham Segura" <[EMAIL PROTECTED]> wrote:
> > > Hi group i need your help, i am trying to create a user, but i have a
> > > problem i need to generate automatic, but i can´t give to ma variable *
> > > username* to take the value of this i dont know where to put it, if
> > anyone
> > > could help me, will me so happy, I put my code so you can see:
>
> > > @WebMethod(operationName = "createUser")
> > > public String createUser(@WebParam(name = "username")
> > > String username,@WebParam(name = "givenName")
> > > String givenName, @WebParam(name = "familyName")
> > > String familyName){
> > > //TODO write your implementation code here:
> > > try
> > > {
> > > AppsForYourDomainClient apps = new
> > > AppsForYourDomainClient(AppServiceBean.account, AppServiceBean.domain,
> > > AppServiceBean.password);
> > > apps.createUser(username, givenName, familyName,
> > > PasswordGenerator.getPassword(
> > > PasswordGenerator.MINUSCULAS+
> > > PasswordGenerator.MAYUSCULAS+
> > > PasswordGenerator.NUMEROS,10),
> > > IDGenerator.getId(
> > > IDGenerator.NUMEROS,5));
> > > CheckUser.userExists(apps, givenName);
> > > }
> > > catch(Exception ex){}
> > > String u = givenName +" "+ familyName;
> > > return u +"Tu usuario es:"+" "+ (username =
> > > givenName.toLowerCase().substring(0, 1) +
> > > familyName.toLowerCase()+IDGenerator.getId()) +" "+ "tu password es:" +"
> > "+
> > > PasswordGenerator.getPassword();
> > > }
>
> > > Regards.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---