Red Gate forums :: View topic - Querying SmartAssembly web service
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Querying SmartAssembly web service

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
JDHnz



Joined: 01 Sep 2008
Posts: 13

PostPosted: Mon May 21, 2012 5:21 am    Post subject: Querying SmartAssembly web service Reply with quote

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
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 546

PostPosted: Mon May 21, 2012 4:09 pm    Post subject: Reply with quote

Have you tried using the SDK. It is the only supported way to customise interaction with the webservice.
Back to top
View user's profile Send private message
JDHnz



Joined: 01 Sep 2008
Posts: 13

PostPosted: Tue May 22, 2012 12:13 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Wed Jun 13, 2012 4:14 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
JDHnz



Joined: 01 Sep 2008
Posts: 13

PostPosted: Thu Jun 28, 2012 11:57 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group