question

natongm avatar image
natongm asked

Adding Web Service to Project

I added a web service in VS 2008, but don't know what code to add to the service. This is in regards rendering reports using SOAP. How do I customize the code below? Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. _
ssrs
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Oleg avatar image Oleg commented ·
@natongm I might be wrong, but I sense that you probably went in the wrong direction. If you add a web service to your .NET solution, it simply stabs a blank method named HelloWorld() returning a string. Practically, this means that if you open another project and add a **web reference** to it pointing to the asmx file of your original web service, you will get a proxy code generated by the Visual Studio, which will allow you to call that web service using the proxy. What you probably need instead is to add a ***web reference*** to your project (instead of adding a blank web service) pointing it to the wsdl provided by SSRS. This will generate a callable proxy, so you will be able to get the data out of the SSRS using the generated API. The link Ken provided in his answer should give you enough information to get started. It points to the really old .NET 1.1 sample, but you should be able to modify it to comply with 3.5 version.
2 Likes 2 ·
KenJ avatar image KenJ commented ·
Great insight @Oleg. This would have made a good "answer" where I could vote it up!
0 Likes 0 ·

1 Answer

·
KenJ avatar image
KenJ answered
I'm not sure if this is at all what you are looking for, but here is an article demonstrating "SQL "Reporting Services Viewer Page Using SOAP API]" -- [ http://www.codeproject.com/KB/reporting-services/SQLRSViewer.aspx][1] I've never worked with it and can't vouch for the article's accuracy, but it does have source code and might get you moving in the right direction. [1]: http://www.codeproject.com/KB/reporting-services/SQLRSViewer.aspx
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

natongm avatar image natongm commented ·
Thank you KenJ and @Oleg. I actually just got it. I was substituting http:// /reportserver/reportservice2005.asmx with http://gmcisvc01/reportserver/reportservice2008.asmx while I was adding the web reference since I am using 2008. It works when I use 2005
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.