Well my account is for a partner edition, is for a client, that we have we
are reseller for gapps, and i have my Provisioning API Enable, but i still
get this problem.

2008/11/25 George Adams <[EMAIL PROTECTED]>

> In order for this to work you need to be set up as a Primeir Edition of
> Google Apps or Google Apps for Education.
> Are you set up as one of these?
> The "administrator" user will need to be an administrator of the domain.
> You will need to  *Enable provisioning API*
> See the attached image.
> If you have done all these things someone else will need to help you.
>
>
>
> 2008/11/25 Abraham Segura <[EMAIL PROTECTED]>
>
>> I do that and I get the same error.
>>
>> 2008/11/25 George Adams <[EMAIL PROTECTED]>
>>
>> Try aztecamail.com.mx <http://google.com/a/aztecamail.com.mx>  instead of
>>> google.com/a/aztecamail.com.mx as your domain.
>>>
>>>
>>> 2008/11/25 Abraham Segura <[EMAIL PROTECTED]>
>>>
>>> Pues lo puse de la siguiente manera:
>>>>
>>>> @WebMethod(operationName = "createUser")
>>>>    public String createUser(@WebParam(name = "givenName")
>>>>    String givenName, @WebParam(name = "familyName")
>>>>    String familyName){
>>>>         String username = givenName.toLowerCase().substring(0, 1) +
>>>> familyName.toLowerCase()+IDGenerator.getId();
>>>>        //TODO write your implementation code here:
>>>>        try
>>>>        {
>>>>            AppsForYourDomainClient apps = new AppsForYourDomainClient
>>>> ("[EMAIL PROTECTED]", "google.com/a/aztecamail.com.mx
>>>> ","4dm1nm41l");
>>>>            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){
>>>>          return "Error: " + ex.getMessage();
>>>>        }
>>>>        return givenName +" "+ familyName +"Tu usuario es:"+" "+ username
>>>> +" "+ "tu password es:" +" "+ PasswordGenerator.getPassword();
>>>> }
>>>>
>>>> Y este es mi error no se en que me estoy equivocando me podrias ayudar
>>>> por favor:
>>>>
>>>> Método devueltojava.lang.String : "*Error: Invalid credentials*"
>>>> ------------------------------
>>>> Solicitud SOAP
>>>> ------------------------------
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>>
>>>>
>>>> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/";>
>>>>
>>>> <S:Header/>
>>>> <S:Body>
>>>> <ns2:createUser xmlns:ns2="http://ejb.gapps.kionetworks.com/";>
>>>> <givenName>Abraham</givenName>
>>>>
>>>>
>>>>
>>>> <familyName>Segura</familyName>
>>>>
>>>> </ns2:createUser>
>>>> </S:Body>
>>>> </S:Envelope>
>>>>
>>>> ------------------------------
>>>> Respuesta SOAP
>>>> ------------------------------
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/";>
>>>>
>>>> <S:Body>
>>>> <ns2:createUserResponse xmlns:ns2="http://ejb.gapps.kionetworks.com/";>
>>>> <return>Error: Invalid credentials</return>
>>>>
>>>>
>>>> </ns2:createUserResponse>
>>>>
>>>> </S:Body>
>>>> </S:Envelope>
>>>>
>>>>
>>>>
>>>> 2008/11/25 Julian (Google) <[EMAIL PROTECTED]>
>>>>
>>>>
>>>>> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to