Options

Querying SmartAssembly web service

JDHnzJDHnz Posts: 16
edited June 28, 2012 6:57AM in SmartAssembly
Hi there,

We're putting the finishing touches on our winforms application as we get ready to release it, and I was wanting to have a little system tray app for myself that notified me when there were new error reports waiting to be downloaded from the web service, so that I am made aware of problems as soon as possible.

I have set up a copy of the web service files on our own server and got that all working fine. Exploring the asmx files, I suspect that it is Reporting.asmx?op=GetReportCount that I need to call to find out if there are any error reports waiting to be retrieved, but clicking on the Invoke button to test that call gives me an "Err Session timed out." message, so I suspect there is another call that I need to make before that. I guess that this is probably to Reporting.asmx?op=SecuredLogin, but I have no idea of the values to pass for the licenseID or password.

Am I taking the right approach to this, and if so, what are the details that I am missing? If it's not the right approach, how should I be trying to solve this problem?

I have managed to set up a schedule task to invoke "SmartAssembly.com /downloadnewreports" on a regular basis, so that I could just query the database for new error reports, but that means I have to have the virtual machine with my dev environment running for the reports to be downloaded, so I would much rather query the web service directly if possible.

Thanks,
Jason

Comments

  • Options
    Have you tried using the SDK. It is the only supported way to customise interaction with the webservice.
  • Options
    Yes, the SDK is where I found how to retrieve new reports by invoking "SmartAssembly.com /downloadnewreports" (see the DownloadNewReportsClick() event handler in the Database SDK sample).

    I could write my own web service to check for the presence of files in the configured ReportsFolder, but as they are encrypted reports I can't differentiate the exception reports from the feature usage reports, so I couldn't get a count of only the exception reports waiting on the server.

    Is there really no other way of finding out if there are error reports waiting to be downloaded from the web service?
  • Options
    James BJames B Posts: 1,124 Silver 4
    Hi,

    Chris is away on vacation right now so I thought I'd see if I could help - just to confirm, you're trying to get notified of new reports?

    I'm not familiar with calling the URLs for the webservice via code, so I can't immediately help with the authentication error you got - are you using the custom web service or are your reports coming via our hosted one?

    I think the easiest way is to use the SDK to download new reports as the Exception reports and Feature Usage ones go into separate tables as you already saw- but if that's not really useful you may want to look at the custom webservice (see here) and seeing if you can customise it to report back to your notifier somehow?
    Systems Software Engineer

    Redgate Software

  • Options
    Hi James,

    yes, that is correct. We are already running our own custom web server as you have suggested. Unfortunately, both the error and feature usage reports are saved as encrypted reports on the web server before they are downloaded by the SA client, so there doesn't seem to be a way for me to write my own addition to the web service to find out how many error reports there are waiting to be downloaded.

    Most of the code in behind the custom web server is obfuscated of course, so it's not much help in working out what I need to call to get the information I need. I can see that there is a GetReportCount() web method on the ReportingService class behind the Reporting.asmx web service file, but it looks like it is checking details of an established session, which makes me suspect that a call to the SecuredLogin() web method on the same class is required, but that requires licenseID and password parameters for which I don't know the necessary values.
Sign In or Register to comment.