Hello,
I downloaded and installed the latest version of OpenEmm 2019 (19.10.000.133) and I am testing the web services.
As specified in the manual, I have created one new web service user using the web gui and specifyied its username and password.
Now I am trying to invoke the web service (for example ListSubscribers).
How the user authentication parameters should be passed ?
I guess I should use an invocation like below, but even with the corrent username and password i've got the error: "com.sun.xml.wss.XWSSecurityException: Receiver Requirement for Digested Password has not been met; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Receiver Requirement for Digested Password has not been met".
How the security header should be specified ?
Is available any example for use the web services ?
Thanks for the help.
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://agnitas.org/ws/schemas">
<soapenv:Header>
<wsse:Security >
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>passoword</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<sch:ListSubscribersRequest>
</sch:ListSubscribersRequest>
</soapenv:Body>
</soapenv:Envelope>
Invoking Web Service
Moderator: moderator
Re: Invoking Web Service
Thanks, it works!
This is a simple example using node and node-soap (https://github.com/vpulim/node-soap).
var soap = require('soap');
var url = '<wsdl url>';
var options = {
hasNonce: true,
passwordType:'PasswordDigest',
hasTimeStamp:false
};
var wsSecurity = new soap.WSSecurity('username', '>password>', options);
soap.createClient(url, function(err, client) {
client.setSecurity(wsSecurity);
client.ListMailinglists(args, function(err, result) {
console.log("result:",result);
console.log("err:", err);
});
});
This is a simple example using node and node-soap (https://github.com/vpulim/node-soap).
var soap = require('soap');
var url = '<wsdl url>';
var options = {
hasNonce: true,
passwordType:'PasswordDigest',
hasTimeStamp:false
};
var wsSecurity = new soap.WSSecurity('username', '>password>', options);
soap.createClient(url, function(err, client) {
client.setSecurity(wsSecurity);
client.ListMailinglists(args, function(err, result) {
console.log("result:",result);
console.log("err:", err);
});
});