Link to home
Start Free TrialLog in
Avatar of jledbetter
jledbetter

asked on

Connecting to SSRS Web Service

I know there was a lot of discussion about how to connect to the report server web service but I tried everything I read hear and couldn't get it to work for me. So I would appreciate if someone onthis forum can make a suggestion to solve it for me.
I have SSRS SQL 2008 R2 installed in Share Point mode. and I wrote a console app to use the web service. I created two proxies one that uses a service reference to http:\\<MyServer>/ReportServer/ReportService2010.asmx and one that uses web service reference to the same URL (I wasn't sure if there is a diffrence between the two).
I tried one simple API : Create Folder(...) and the service reference gave me an error of Security problem related to Annonimous login when NTLM is expected and the Web Reference complained about Unrecognized soap action - CreateFolder.
The code and the exact wording of the error messages are below. I appreciate any help I can get regarding this:
            //ReportService2005 is a service reference to ReportService2005.asmx
            ReportService2005.ReportingService2005SoapClient client = new ReportService2005.ReportingService2005SoapClient();
            client.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("myname", "mypassword", "mydomain");
            System.ServiceModel.Security.UserNamePasswordClientCredential crd = client.ClientCredentials.UserName;
            crd.Password = "mypassword";
            crd.UserName = "myname";
            ClientCredentials cr = client.ClientCredentials;
            ReportService2005.CatalogItem item1 = new ReportService2005.CatalogItem();
            client.CreateFolder(null, "xxx", "\\", null);
            //Getting the error: 
            //The HTTP request is unauthorized with client authentication scheme 'Anonymous'. 
            //The authentication header received from the server was 'NTLM'.

            //WSReportingService2005 is a web reference to ReportService2005.asmx
            WSReportingService2005.ReportingService2010 rs = new WSReportingService2005.ReportingService2010();
            rs.Credentials = new NetworkCredential("myname", "mypassword", "mydomain"); 
            rs.Url = "http://sql2008_dev/reportserver/reportservice2005.asmx";
            WSReportingService2005.CatalogItem item = null;
            item = rs.CreateFolder("xxx", "\\", null);
            //Getting the error:
            //Server did not recognize the value of HTTP Header SOAPAction: 
            //http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateFolder.

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike McCracken
Mike McCracken

This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.