Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I like to know how to reload a document from Visual Studio C#. I m trying to use QMS API, but I cant seem to figure out how to do it? Can anyone please help me.... Thanks in advance.......
Take a look at QMSEDX described here.
You'll also find a VS sample solution in attached to this document.
For some task I m getting an QDSMain.Exceptions.DistributionFailedException --==> QDSMain.Exceptions.LogBucketErrorException error when i run it. What am i doing wrong here....?
Are you able to trigger and run the task succesfully from within QMC (manually and/or by scheduler)?
yes, i m able to trigger the task using edx.... and some document is reloading properly. For document it works, apparently no distribution is required. I get error whenever distribution is required for the document.
Well, my question was more about wether you can succesfully execute the distribution task from QMC.
I can't really see what the issue might be with the information provided, maybe an authorization issue?
try something like this:
using System;
using System.Linq;
using System.ServiceModel.Security;
using QMSAPIStarter.QMSAPIService;
using QMSAPIStarter.ServiceSupport;
namespace QMSAPIStarter
{
class Program
{
static void Main(string[] args)
{
if (args.Count() != 1)
{
Console.WriteLine("No task name specified");
Console.WriteLine("Exiting!");
return;
}
QMSClient Client;
string QMS = "http://10.200.10.10:4799/QMS/Service";
Client = new QMSClient("BasicHttpBinding_IQMS", QMS);
WindowsClientCredential creds = Client.ClientCredentials.Windows;
creds.ClientCredential.UserName = "XXX";
creds.ClientCredential.Password = "XXXXXXX";
string key = Client.GetTimeLimitedServiceKey();
ServiceKeyClientMessageInspector.ServiceKey = key;
var taskName = args[0];
var password = "XXXXXXX";
Client.TriggerEDXTask(new Guid("00000000-0000-0000-0000-000000000000"), taskName, password, "", new string[0]);
Console.WriteLine("Qlikview task started");
}
}
}
here is the code an exefile you can trigger through SQL server job agent to trigger qlikview tasks to run