Search in sources :

Example 1 with GetUserListByCustomerRequest

use of de.vitero.schema.user.GetUserListByCustomerRequest in project OpenOLAT by OpenOLAT.

the class ViteroManager method getCustomersUsers.

public List<Usertype> getCustomersUsers() throws VmsNotAvailableException {
    try {
        GetUserListByCustomerRequest listRequest = new GetUserListByCustomerRequest();
        listRequest.setCustomerid(viteroModule.getCustomerId());
        Userlist userList = getUserWebService().getUserListByCustomer(listRequest);
        List<Usertype> userTypes = userList.getUser();
        return userTypes;
    } catch (SOAPFaultException f) {
        ErrorCode code = handleAxisFault(f);
        switch(code) {
            default:
                logAxisError("Cannot get the list of users of customer: " + viteroModule.getCustomerId(), f);
        }
        return null;
    } catch (WebServiceException e) {
        if (e.getCause() instanceof ConnectException) {
            throw new VmsNotAvailableException();
        }
        log.error("Cannot get the list of users of customer: " + viteroModule.getCustomerId(), e);
        return null;
    }
}
Also used : Usertype(de.vitero.schema.user.Usertype) WebServiceException(javax.xml.ws.WebServiceException) Userlist(de.vitero.schema.user.Userlist) SOAPFaultException(javax.xml.ws.soap.SOAPFaultException) ErrorCode(org.olat.modules.vitero.model.ErrorCode) GetUserListByCustomerRequest(de.vitero.schema.user.GetUserListByCustomerRequest) ConnectException(java.net.ConnectException)

Example 2 with GetUserListByCustomerRequest

use of de.vitero.schema.user.GetUserListByCustomerRequest in project openolat by klemens.

the class ViteroManager method getCustomersUsers.

public List<Usertype> getCustomersUsers() throws VmsNotAvailableException {
    try {
        GetUserListByCustomerRequest listRequest = new GetUserListByCustomerRequest();
        listRequest.setCustomerid(viteroModule.getCustomerId());
        Userlist userList = getUserWebService().getUserListByCustomer(listRequest);
        List<Usertype> userTypes = userList.getUser();
        return userTypes;
    } catch (SOAPFaultException f) {
        ErrorCode code = handleAxisFault(f);
        switch(code) {
            default:
                logAxisError("Cannot get the list of users of customer: " + viteroModule.getCustomerId(), f);
        }
        return null;
    } catch (WebServiceException e) {
        if (e.getCause() instanceof ConnectException) {
            throw new VmsNotAvailableException();
        }
        log.error("Cannot get the list of users of customer: " + viteroModule.getCustomerId(), e);
        return null;
    }
}
Also used : Usertype(de.vitero.schema.user.Usertype) WebServiceException(javax.xml.ws.WebServiceException) Userlist(de.vitero.schema.user.Userlist) SOAPFaultException(javax.xml.ws.soap.SOAPFaultException) ErrorCode(org.olat.modules.vitero.model.ErrorCode) GetUserListByCustomerRequest(de.vitero.schema.user.GetUserListByCustomerRequest) ConnectException(java.net.ConnectException)

Aggregations

GetUserListByCustomerRequest (de.vitero.schema.user.GetUserListByCustomerRequest)2 Userlist (de.vitero.schema.user.Userlist)2 Usertype (de.vitero.schema.user.Usertype)2 ConnectException (java.net.ConnectException)2 WebServiceException (javax.xml.ws.WebServiceException)2 SOAPFaultException (javax.xml.ws.soap.SOAPFaultException)2 ErrorCode (org.olat.modules.vitero.model.ErrorCode)2