1
votes

I am trying to integrate Sql Server Reporting Service with Java EE application. I can see 2 reports on the reporting server. I am trying to use the RS web service to access the server. Steps taken by me are

  1. Created Dynamic project in Eclipse
  2. Got to New - Web Service client and entered the Web service defination as ://serverName:port/ReportServer/reportservice2010.asmx?wsdl
  3. I see in my project the below packages com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer.holders

My code:

com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer.Reporting‌Service2010SoapProxy service = new com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer.ReportingSe‌​rvice2010SoapProxy();
String endPo="://serverName:port/ReportServer/reportservice2010.asmx?wsdl";
service.setEndpoint(endPo);
service.logonUser("serverName\\username", "password",null );

The error is:

AxisFault faultCode: {xml.apache.org/axis}HTTP faultSubcode: faultString: (401)Unauthorized

After this I am not sure what I need to do. Please help me. I also tried to consume this web service using a proxy but I am getting an error. Kindly help me on what should be exactly done in order to consume SSRS 2010 webservice in Java.

Regards, Neel

1
Welcome to Stack Overflow! re: "but I am getting an error" - please include the error and how you tried to consume the service.Tass
@Tass:I created Proxy java class to consume the web service.code: 1.com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer.ReportingService2010SoapProxy service = new com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer.ReportingService2010SoapProxy(); 2. String endPo="://serverName:port/ReportServer/reportservice2010.asmx?wsdl"; service.setEndpoint(endPo); 3. Next service.logonUser("serverName\\username", "password",null ); Error I am getting is AxisFault faultCode: {xml.apache.org/axis}HTTP faultSubcode: faultString: (401)Unauthorizeduser2146388
Have a look how I've edited your question above, much easier to read the code this way.Tass

1 Answers

1
votes

My guess is that you've got incorrect authentication settings.

Your generated proxy is likely using HTTP Basic authentication, which by default isn't supported by reporting services. If you want to support it (if it's acceptable?) you need to enable the RSWindowsBasic authentication type.

Have a look at http://msdn.microsoft.com/en-us/library/bb283249.aspx for the documentation on how to do so.

Ongoing, you'll need to research how to make your java proxy work with NTLM.