Cant seem to get AddUser using SOAP to work
I am trying to create a user using the SOAP interface.
No matter what I do, I get the response: The username cannot be empty
I specified the user name in the User object exactly according to documentation.
Other SOAP actions are fine, for example, ChangePassword and GetUserList work fine, just that specific call.
I guess it is format of the SOAP in some why for complex objects, however, no matter what I do, I can't get it to work.
var soap = require('soap');
var url = 'https://<url>:10002/wsdl/Cerberus.wsdl';
const endpoint = 'https://<url>:10001/service/cerberusftpservice';
var args = {
credentials: {
user: 'admin',
password: 'My_Password'
}
};
soap.createClient(url, {disableCache: true}, function(err, client) {
args.User = {
name: 'kukumuku455',
password: {
value: 'sdfjhksdjhfkaf43t3fsvc##@%',
type: 'plain',
noExpire: true,
lastChange: '2021-04-27'
},
groupList: [
{
name: 'sandbox'
}
],
isAllowPasswordChange: {value: true},
isSimpleDirectoryMode: {value: true},
isDisabled: {value: false},
maxLoginsAllowed: {value: 10},
requireSecureControl: {value: true},
requireSecureData: {value: true},
disableAfterTime: {value: false},
authMethod: {
method: 'password'
},
permissions: {
allowUpload: true,
allowDownload: false,
allowDisplayHidden: false,
allowRename: false,
allowDelete: false,
allowDirectoryCreation: false
}
};
client.AddUser(args, (err, result, rawResponse, soapHeader, rawRequest) => {
if (err) {
console.error(err);
} else {
console.log(`User added: ${JSON.stringify(result)}`);
}
});
}, endpoint);
0
-
Thank you for your question. We are handing the response via the ticketing system - Cerberus Support.
0
Please sign in to leave a comment.
Comments
1 comment