BWS 12.3.0 setGenerateAndEmailRandomPassword

Hello.

I am able to call the api above without problems, but can't seem to find a way to select an email of activation model to use, that's why all e-mails go through LOWER in the English text by default.

The console DOWN 12 to select a model in the list drop-down, not quite sure if this is available through BWS.

Does anyone have this working.

This is not currently supported.  In case you weren't aware, you can change the default activation e-mail template.

But I'm going to send this feedback to the development team of BWS.

Tags: BlackBerry Developers

Similar Questions

  • How to delete a user using the BWS

    Hello

    I'm working on a little app that can remove multiple users from the BOTTOM. I use the BWS for this, but something is not clear.

    My function is:

            public static bool DeleteUser(string[] inputEmail)
            {
                DeleteUsersRequest UserDeleteRequest = new DeleteUsersRequest();
                UserDeleteRequest.metadata = BasicSettingData.Metadata;
    
                User egy = new User();
                User[] DeletableUserArray = new User[1]{egy};
                DeletableUserArray[0].emailAddresses = inputEmail;
                UserDeleteRequest.users = DeletableUserArray;
    
                DeleteUsersResponse UserDeleteResponse = new DeleteUsersResponse();
    
                try
                {
                    UserDeleteResponse = BasicSettingData.bwsService.deleteUsers(UserDeleteRequest);
                }
                catch (Exception e)
                {
                    MessageBox.Show( e.Message + "     " + e.StackTrace);
                    return false;
                }
                if (UserDeleteResponse.returnStatus.code.Equals("SUCCESS"))
                {
                    MessageBox.Show("trololololololo");
                }
    
                return true;
    

    The service lift any error or exception, however, users are not deleted. I am defenetly missed something, just don't know what.

    In your function, you create the user object, and then use this same user object try deleting. Instead, you will need to enter the users to remove an appeal from getUsers().

  • BWS - 401

    Hello

    I get a 401 error when I run the sampling program. How can I solve this problem. The user is a BES-enabled AD user and I have assigned administrator Enteripse to this user. Any ideas?

    Thank you

    A.

    That sounds about right. Are you sure that he is a user of AD? When you sign the BOTTOM portal using this user you specify the field? Can you perform the same actions through the BOTTOM with this user account you are trying to run via BWS?

  • BWS account authorization

    Hello

    Anyone know what is the lowest allowed the user to run the BWS?

    Thank you

    A.

    Permissions for BWS is from the BOTTOM. Permissions for the list using BWS user accounts would be the same permissions for the user list of accounts of users across the BOTTOM.

  • Is it possible to add an application to a SoftwareConfiguration more BWS

    Hello

    I have a question is possible to add an application to a SoftwareConfiguration on th BWS?

    I found a function, but they do not work.

    GetSWConfigsRequest request = new GetSWConfigsRequest();
               request.setMetadata(_meta);
    
               //get all SWConfigs
               request.setName("SC_Sample_APP");
               request.setLoadApplicationSettings(true);
               request.setLoadDeviceSettings(true);
    
               GetSWConfigsResponse response = _myCoreWSStub.getSWConfigs(request);
               if (response.getReturnStatus().getCode().compareTo("SUCCESS") != 0){
                   System.out.println("Error occurred: " + response.getReturnStatus().getMessage());
               }
    
               for (SWConfig itr: response.getSwConfigs()) {
                   if (itr.getLocaleNameAndDescription() == null) {
                       continue;
                   }
                   for (LocaleNameAndDescription localeNameAndDesc: itr.getLocaleNameAndDescription()) {
                       if (_meta.getLocale().equalsIgnoreCase(localeNameAndDesc.getLocale())) {
                           System.out.println(localeNameAndDesc.getName());
                           break;
                       }
                   }
                   ApplicationSettings applicationSettings = new ApplicationSettings();
                   applicationSettings.setApplication(getSWConfigApplications());
                   ObjectDeliveryMode deliveryMode = new ObjectDeliveryMode();
                   deliveryMode.setPUSH(true);
                   applicationSettings.setObjectDeliveryMode(deliveryMode);
                   DeliveryTransportType deliveryTransportType = new DeliveryTransportType();
                   deliveryTransportType.setWIRELESS(true);
                   applicationSettings.setObjectDeliveryTransport(deliveryTransportType);
                   ApplicationDisposition applicationDisposition = new ApplicationDisposition();
                   applicationDisposition.setALLOWEDANDREQUIRED(true);
                   applicationSettings.setSelectedApplicationDisposition(applicationDisposition);
                   ApplicationControlPolicyType applicationControlPolicyType = new ApplicationControlPolicyType();
                   applicationControlPolicyType.setAPPLICATION(true);
                   applicationSettings.setSelectedApplicationControlPolicyType(applicationControlPolicyType);
                   itr.getApplicationSettings().add(applicationSettings);
                   System.out.println(itr.getApplicationSettings().get(0).getSoftwareConfigurationApplicationKey());
                   System.out.println(itr.getApplicationSettings().get(0).getObjectDeliveryTransport().getValue());
                   System.out.println(itr.getApplicationSettings().get(0).getSelectedApplicationControlPolicyType().getValue());
                   System.out.println(itr.getApplicationSettings().get(0).getSelectedApplicationDisposition().getValue());
                   System.out.println(itr.getApplicationSettings().get(0).getApplicationControlPolicy().getOrganizationUid());
    
               }
    

    Thanks in advance.

    Benjamin

    I can't say with certainty. It was asking for in the past for domestic developers are aware of the request. I recommend monitoring the most recent releases of BWS.

  • Minimum permissions required for authenticating to the BWS

    Hello

    We use user accounts admin (ad and non-ad) to connect to BWS? Is there a minimum role/permission that a user must authenticate successfully against BWS?

    No, if the user can connect to the console BOTTOM of the same account will attempt to authenticate with BWS. All permissions for the actions of BWS are the same as the permissions required to perform these actions at the BOTTOM.

  • Examples of code to create the connection of BWS

    Hi I started using BWS (Blackberry Web Services) recently after the use of BAA (Blackberry Administration API) for some time. I would get a tutorial or sample code showing the initialization of the connection to the BWS and then use it to call the getUsersDetail method. I have the below code is missing the connection of BWS.

    import java.util.List;
    
    import com.rim.ws.enterprise.admin.*;
    public class BWSTest {
    
        public static String locale = "en_US";
        public static void main(String[] args){
    
            RequestMetadata requestMetadata = new RequestMetadata();
            requestMetadata.setLocale(locale);
            GetUsersDetailRequest userRequest = new GetUsersDetailRequest();
            userRequest.setMetadata(requestMetadata);
            userRequest.setLoadDevices(true);
            userRequest.setLoadAccounts(true);
            userRequest.setLoadITPolicies(true);
            userRequest.setLoadSWConfigs(true);
    //      List allUsers=userRequest.getUsers(); this method reflects users added as part of the request, not resulting from it
            GetUsersDetailResponse response = bws.getUsersDetail(request);
    
            if (response.getReturnStatus().getCode().compareTo("SUCCESS") !=0){
                System.out.println("Error occurred: "+response.getReturnStatus().getMessage() );
            }
    
            for(GetUsersDetailIndividualResponse individualResponse:response.getIndividualResponses()){
                individualResponse.getUserDetail().getDisplayName();
            }
    
        }
    
    }
    

    I found this code on the following link in a zip file:

    BWS Java sample

    import java.net.MalformedURLException;
    import java.net.URL;
    
    import javax.xml.ws.BindingProvider;
    
    import com.rim.ws.enterprise.admin.BWS;
    import com.rim.ws.enterprise.admin.BWSService;
    import com.rim.ws.enterprise.admin.BWSUtil;
    import com.rim.ws.enterprise.admin.BWSUtilService;
    import com.rim.ws.enterprise.admin.GetEncodedUsernameRequest;
    import com.rim.ws.enterprise.admin.GetEncodedUsernameResponse;
    import com.rim.ws.enterprise.admin.GetUsersRequest;
    import com.rim.ws.enterprise.admin.GetUsersResponse;
    import com.rim.ws.enterprise.admin.GetUsersSearchCriteria;
    import com.rim.ws.enterprise.admin.GetUsersSortBy;
    import com.rim.ws.enterprise.admin.RequestMetadata;
    import com.rim.ws.enterprise.admin.User;
    
    /**
     * This simple program finds users on the BlackBerry Administration Server,
     * and displays the existing users in the Console output.
     *
     * @author gbeukeboom
     *
     */
    
    public class TestMain {
    
        public static BWSService _myBWSService;
        public static BWS _bws;
        public static BWSUtilService _myBWSUtilService;
        public static BWSUtil _bwsUtil;
        private static String _locale = "en_US";
        private static String _clientVersion = "5.0.3"; //The version of BAS this application was created for
        private static RequestMetadata _meta = new RequestMetadata();;
    
        private static boolean setup() {
            String strBASURL=System.getProperty("basurl");
            URL serviceUrl = null;
            URL utilServiceUrl=null;
    
            //The Metadata object includes information about this application, it is included with every call
            _meta.setClientVersion(_clientVersion);
            _meta.setOrganizationUid("0"); //Not used currently, set to "0"
            _meta.setLocale(_locale);
    
            try {
                serviceUrl = new URL("https://" + strBASURL + "/enterprise/admin/ws?wsdl");
                utilServiceUrl = new URL("https://" + strBASURL + "/enterprise/admin/util/ws?wsdl");
            } catch (MalformedURLException e) {
                System.err.println("Cannot initialize the wsdl");
                return false;
            }
    
            //Initialize our web service stubs that will be used for all calls
            _myBWSService = new BWSService(serviceUrl);
            _bws = _myBWSService.getBWS();
            _myBWSUtilService = new BWSUtilService(utilServiceUrl);
            _bwsUtil = _myBWSUtilService.getBWSUtil();
    
            String username=System.getProperty("username");
            String password=System.getProperty("password");
    
            GetEncodedUsernameRequest request=new GetEncodedUsernameRequest();
            request.setMetadata(_meta);
            request.setUsername(username);
            request.setDomain(strBASURL);
    
            //The BAS expects the username to be encoded, this call returns the encoded value
            GetEncodedUsernameResponse geurResponse = _bwsUtil.getEncodedUsername(request);
    
            if (geurResponse.getReturnStatus().getCode().compareTo("SUCCESS") != 0){
                System.out.println("Error occurred: " + geurResponse.getReturnStatus().getMessage());
                return false;
            }
    
            String myEncodeUsername = geurResponse.getEncodedUsername();
    
            //Set http basic authentication on the web service
            BindingProvider bp = (BindingProvider)_bws;
            bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, myEncodeUsername);
            bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
    
            return true;
        }
    
        public static void getUsers() {
    
            GetUsersRequest request = new GetUsersRequest();
            request.setMetadata(_meta); //Assign our Metadata to the call
    
            //This criteria object could be used to specify search parameters
            GetUsersSearchCriteria searchCriteria = new GetUsersSearchCriteria();
    
            request.setSearchCriteria(searchCriteria);
            request.setPageSize(500);
    
            GetUsersSortBy sortBy = new GetUsersSortBy();
            sortBy.setEMAILADDRESS(true);
            sortBy.setValue("EMAIL_ADDRESS");
            request.setSortBy(sortBy);
            request.setSortAscending(true);
    
            GetUsersResponse response = _bws.getUsers(request);
    
            //If the result returned from the call is SUCCESS then we loop through all returned users
            //outputting their information to the console.
            if (response.getReturnStatus().getCode().compareTo("SUCCESS") != 0){
                System.out.println("Error occurred: " + response.getReturnStatus().getMessage());
            } else if (response.getUsers() != null) {
                for (User itr: response.getUsers()) {
                    System.out.println("Display name: " + itr.getDisplayName());
                    System.out.println("User ID: " + itr.getUid());
                    for (String emailAddress :itr.getEmailAddresses() ){
                        System.out.println("Email Address: " + emailAddress);
                    }
                    System.out.print("\n");
                }
            }
        }
    
        /**
         * @param args
         */
        public static void main(String[] args) {
            System.out.println("Starting to intiialize credentials...");
            if (!setup()){
                System.out.println("Problem occurred while setting up credentials.");
                System.exit(0);
            }
            System.out.println("Credentials initialized.\n");
            System.out.println("Starting to retrieve users...");
            getUsers();
        }
    
    }
    
  • BWS sample error

    I did an example step by step by Web BlackBerry Services for Enterprise Administration Getting Started Guide document, but there is an error "HTTP 401 response: unauthorized ' when communicating with https://MYSERVER:3443 / business/admin/ws", but the user can connect administration service console Web use blackberry, I use BlackBerry Enterprise Server Express for Microsoft Exchange 5.0.3 any solution?

    It seems that your username is badly encoded. I guess "MyServer" is the field? The field is only necessary if using Active Directory, using without would the 401, assuming that you have no BOTTOM user with the name "bwsadminmyserver". If you need help with the code for this problem, so thank you post the snippet where you set up your GetEncodedUsernameRequest object.

    Kind regards

  • BWS baseUrl for HA

    Hello

    To HA, do I need to set the baseUrl as primary server? Also, is there a baseUrl for HA pool so that I can take advantage of the recovery.

    Thank you

    A.

    It takes an address for the pool if you can continue to use the same URL no matter what server took more than primary.

  • ERROR during the generation of Proxy for BWS and Service Web BWSUtil files

    I'm trying to configure web service for BlackBery 10 infrastructure.

    I followed the steps in http://docs.blackberry.com/en/admin/deliverables/49270/dme1348595223038.jsp

    When I run the command as shown in the doc, I got the below error. Let me know, what went wrong. Thank you.

    ERROR:

    WSDLToJava error: org.apache.cxf.wsdl11.WSDLRuntimeException: unable to create the wsdl definition of: https://bes101.blrresearch.com:38443 / business/admin/ws? wsdl
    Caused by: WSDLException: faultCode = PARSER_ERROR: the analysis of problem 'https://bes101.blrresearch.com:38443 / business/admin/ws? wsdl ".: javax.net.ssl.SSLHandshakeE"
    Xception: sun.security.validator.ValidatorException: building way PKIX failed:
    sun.security.provider.certpath.SunCertPathBuilderException: could not find valid
    path to certification for target asked

    Thank you

    It was instead of update of wsdl2java.bat, I've updated wadl2Java.bat.

  • Bug in the API BES12 setUsersActivationPassword?

    Hello corporate developers!

    While preparing our migration of the device from BES10 to BES12, I've developed some tools with the Web services of BlackBerry BES12.1.1. Everything is running, but I have a problem with the generation and sending of a random activation using the API password "setUsersActivationPassword".

    I call the API and users receive the activation password and user BES12 interface indicates the period of activation as expected. All right, BUT...

    The issue is the registration of the e-mail address of the user with the ID of the PRS in the BlackBerry Infrastructure to allow Enterprise activation simple and straigth forward on the BlackBerry.

    My Java method to manage demand for Activation password and logs:

    private static boolean generateActivationPassword(String accountName, com.rim.ws.enterprise.admin.User user) {
            final String METHOD_NAME = "generateActivationPassword()";
            final String BWS_API_NAME = "_bws.setUsersActivationPassword()";
            logMessage("Entering %s", METHOD_NAME);
            boolean returnValue = false;
    
            SetUsersActivationPasswordRequest request = new SetUsersActivationPasswordRequest();
            request.setMetadata(REQUEST_METADATA);
            // request.setExpiryHours(24); // wird mit Standard = 48 überschrieben
            request.getUsers().add(user);
            request.setGenerateAndEmailRandomPassword(true);
    
            SetUsersActivationPasswordResponse response = null;
            try {
                logRequest(BWS_API_NAME);
                response = _bws.setUsersActivationPassword(request);
                logResponse(BWS_API_NAME, response.getReturnStatus().getCode(), response.getMetadata());
            } catch (WebServiceException e) {
                // Log and re-throw exception.
                logMessage("Exiting %s with exception \"%s\"", METHOD_NAME, e.getMessage());
                throw e;
            }
    
            if (response.getReturnStatus().getCode().equals("SUCCESS")) {
    
                if (response.getIndividualResponses() != null) {
                    for (IndividualResponse individualResponse : response.getIndividualResponses()) {
                        logMessage("Message: %s (Code: %s)", individualResponse.getReturnStatus().getMessage(), individualResponse.getReturnStatus()
                                .getCode());
                        logMessage("Request UID: %s", individualResponse.getUid());
                    }
    
                    returnValue = true;
                }
    
            } else {
                logMessage("Error Message: \"%s\"", response.getReturnStatus().getMessage());
    
                if (response.getIndividualResponses() != null) {
                    for (IndividualResponse individualResponse : response.getIndividualResponses()) {
                        log.error(String.format("Individual Response - Code \"%s\", Message: \"%s\"", individualResponse.getReturnStatus().getCode(),
                                individualResponse.getReturnStatus().getMessage()));
                    }
                }
            }
    
            logMessage("Exiting %s with %s", METHOD_NAME, returnValue);
            return returnValue;
        }
    
    28.07.2015 14:07:27,116 DEBUG : Entering generateActivationPassword()
    28.07.2015 14:07:27,116 DEBUG : Calling _bws.setUsersActivationPassword()...
    28.07.2015 14:07:29,241 DEBUG : ..._bws.setUsersActivationPassword() returned "SUCCESS"
    28.07.2015 14:07:29,241 DEBUG : Execution Time: 0,7531 seconds
    28.07.2015 14:07:29,241 DEBUG : Request UID: b7963c52-a841-419a-976b-05597583d6b2
    28.07.2015 14:07:29,241 DEBUG : Message:  (Code: SUCCESS)
    28.07.2015 14:07:29,241 DEBUG : Request UID: a95f7e29-6388-4b97-bb3a-96645f516255
    28.07.2015 14:07:29,241 DEBUG : Exiting generateActivationPassword() with true
    

    Is there no workaround solution for the registry API information with the BlackBerry infrastructure? Am I doing something wrong or miss some peace of code here?

    Thanks for helping!

    Greetings from the Germany,

    Daniel

    P.S.: Generate a password for the user BES12 interface saves the data in the infrastructure properly!

    It isn't a fix available for this today.  You are a subscriber to BlackBerry TSupport?  If so, I recommend there curious to see if this would be possible.

  • WebServices API performance test. BB10

    I would like to test the performance of my Application that uses the BB WebServices API for BES10.

    How can I add false devices to perform the test?

    I have not found any BlackBerry tool or third-party applications.

    Thank you

    You cannot add a fake device.  You can create users in the system using the BWS with the API "createUsers.

    You can create administrative users who do not have a device, but order of queries users device information (device with users), they must be registered and then company activate their device against that account which was created (using the email address provided when they were created).

    A number of companies use BWS (BB WebServices) available to their users prior to their receiving device user.  Once they receive their device, the user will add an account using the Enterprise Activation password that was set for them when they were saved/created.

    In the absence of the user to activate their (physical device), you will only have the user objects stored in the database with no realization of activation (No PIN, the device type, model, OS version, etc.).  You can still use BWS for the users from the list, add it policies, add them to groups, etc.

    I hope that clarifies things, even if it is not the result you're looking for.

  • Web API call to get all the features of BlackBerry10

    Hello community,

    We have developed an own website based on ASP.NET for our UserHelpDesk that they can see the information about a users device. To get all BlackBerry10 devices, we use the API with the following code:

    GetUsersRequest request = new GetUsersRequest();
    Metadata RequestMetadata = new RequestMetadata();
    metadata.clientVersion = ClientVersion;
    Metadata.locale = locale;
    metadata.organizationUid = OrgUid;
    Request.Metadata = metadata;
    GetUsersSearchCriteria searchCriteria = new GetUsersSearchCriteria();
    request.searchCriteria = searchCriteria;
    request.pageSize = 0;
    GetUsersSortBy sortBy = new GetUsersSortBy();
    sortBy.EMAIL_ADDRESS = true;
    sortBy.value = "Email_Address";
    request.sortBy = sortBy;

    GetUsersResponse response = service.getUsers (request);

    The problem is now, that only 2000 devices return so defined! When we try to change the pageSize to 3000, then an error with the message "pageSize" too big is displayed. Is it possible to retrieve more than 2000 devices of the service?

    Kind regards

    Steffen

    Hi Steffen,

    The call of GetUsersRequest and most of the calls of BWS, will page the answers to help with efficiency and the load of the installation. The call has a parameter "lastUserUid" which can be set to indicate where to start the next request, so say that you make your call with 2,000 users listed and the last user in the list has an ID of "2000", if you pass this ID in the next GetUsersRequest, then the query will start the ID of the next user, ex '2001' and continue from there.

  • BlackBerry API Web services 12 - compatibility with version 10

    Hello

    Plan ahead here... I'll build a set of web pages that perform functionality admin for BES 5/6 and 10 BES using BlackBerry web services. I would like to understand what changes, if any if to do when BES 12 happens. The API will remain the same? What changes, if any there? There may be additional features that could be useful?

    Thank you

    John

    Hey John,

    Although I expect that there are features of addtitional, BES12 documentation has not been published, so the list of features is still not yet public. Regarding Webservice of Blackberry, I don't foresee much change to the existing list of APIs with the new version, the transition should be as transparent it would go BWS with BES 5 BWS on 10 BES.

  • With the help of BES Admin API to manage devices non - BB

    Hello

    Anyone know if I can use the web of BES Admin API to write web pages of management that allows to manage IOS and Android devices that are registered with a BES?

    John

    Hey John,

    Yes, in 10 BES with Blackberry Webservice for Universal Service device you can. Here is the link for the http://www.blackberry.com/developers/docs/bws/enterprise/admin/10.2.0.18/ API reference

Maybe you are looking for