Error: identity==null. (rsAuthenticationExtensionError) while Loading a Azure Report in Java
-
Thursday, May 10, 2012 6:53 AM
I am trying to load a report (deployed on azure reporting) using Axis Wsdl2Java in the java code.
I have been through with this for SqlServer Reporting Services 2008 R2.
Now, I want to achieve the same for reports deployed on SQL Azure.
While loading a SQL Azure report, the following exception is thrown. How to resolve it?AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (500)Server Error
faultActor:
faultNode:
faultDetail:
{}:return code: 500
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting Services 11.0.1722.11" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="127" />
<meta name="CountryLocaleID" content="1033" />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300; TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300; TEXT-DECORATION:underline}</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>The Authentication Extension threw an unexpected exception or returned a value that is not valid: identity==null. (rsAuthenticationExtensionError) <a href="http://go.microsoft.com/fwlink/?LinkId=20476&amp;EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&amp;EvtID=rsAuthenticationExtensionError&amp;ProdName=Microsoft SQL Server Reporting Services&amp;ProdVer=11.0.1722.11" target="_blank">Get Online Help</a></li><ul>
<li>Tracing ID is: 770441e5-b779-4f1e-a1c2-ff6e98117060.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
{http://xml.apache.org/axis/}HttpErrorCode:500(500)Server Error
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.ReportExecutionServiceSoapStub.loadReport(ReportExecutionServiceSoapStub.java:893)
at reportClient.SSRSUtil.getReports(SSRSUtil.java:30)
at reportClient.InvokeReport.main(InvokeReport.java:16)
All Replies
-
Friday, May 18, 2012 4:56 PMModerator
Hi Riddhi,
Could you provide more detail about how you are connecting and authenticating?
Please see:
http://msdn.microsoft.com/en-us/library/gg552871#Authentication
Thanks,
-
Monday, May 21, 2012 5:57 AM
Thanks, Cathy for the useful link.
I have accessed existing web service (https://INSTANCE.reporting.windows.net/reportserver/ReportExecution2005.asmx?wsdl) and generated java proxy classes using Apache Axis web service runtime.
Below is the method call to invoke the report:
String result = SSRSUtil.getReports("USERNAME", "PASS", "https://INSTANCE.reporting.windows.net/reportserver/ReportExecution2005.asmx", "/Report Project1/ReportName");Below is the java util program:
package reportClient; import java.net.URL; import javax.xml.rpc.holders.ByteArrayHolder; import javax.xml.rpc.holders.StringHolder; import javax.xml.soap.SOAPException; import org.apache.axis.message.SOAPHeaderElement; import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.ExecutionInfo; import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.ReportExecutionServiceLocator; import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.ReportExecutionServiceSoapStub; import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.holders.ArrayOfStringHolder; import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.holders.ArrayOfWarningHolder; public class SSRSUtil { public static String getReports(String userName, String password, String endPoint, String report) { ReportExecutionServiceSoapStub service = getService(endPoint, userName, password); /* * ParameterValue[] parameters = new ParameterValue[1]; parameters[0] = * new ParameterValue(); parameters[0].setName("<PARAMETER_1_NAME>"); * parameters[0].setValue("<PARAMETER_1_VALUE>"); */ try { ExecutionInfo info = service.loadReport(report, null); // Load // report setExecutionId(service, info.getExecutionID()); // You must set the session id before continuing // service.setExecutionParameters(parameters, "en-us"); // Set report parameters String format = "HTML4.0"; // Valid options are HTML4.0, MHTML, // EXCEL, CSV, PDF, etc String deviceInfo = "<DeviceInfo><Toolbar>False</Toolbar><HTMLFragment>True</HTMLFragment></DeviceInfo>"; // Only generate an HTML fragment ByteArrayHolder result = new ByteArrayHolder(); StringHolder extension = new StringHolder(); StringHolder mimeType = new StringHolder(); StringHolder encoding = new StringHolder(); ArrayOfWarningHolder warnings = new ArrayOfWarningHolder(); ArrayOfStringHolder streamIDs = new ArrayOfStringHolder(); service.render(format, deviceInfo, result, extension, mimeType, encoding, warnings, streamIDs); // Render report to HTML return new String(result.value); } catch (Exception e) { e.printStackTrace(); } return null; } public static void setExecutionId(ReportExecutionServiceSoapStub service,String id) throws SOAPException { SOAPHeaderElement sessionHeader = new SOAPHeaderElement( "http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", "ExecutionHeader"); sessionHeader.addChildElement("ExecutionID").addTextNode(id); service.setHeader(sessionHeader); } public static ReportExecutionServiceSoapStub getService(String endPoint,String userName, String password) { try { ReportExecutionServiceSoapStub service = (ReportExecutionServiceSoapStub) new ReportExecutionServiceLocator().getReportExecutionServiceSoap(new URL(endPoint)); service.setUsername(userName); service.setPassword(password); //service.logonUser(userName, password, "INSTANCE.reporting.windows.net");
service.setMaintainSession(false); return service; } catch (Exception e) { e.printStackTrace(); } return null; } public static org.apache.axis.EngineConfiguration getEngineConfiguration() { java.lang.StringBuffer sb = new java.lang.StringBuffer(); sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); sb.append("<deployment name=\"defaultClientConfig\"\r\n"); sb.append("xmlns=\"http://xml.apache.org/axis/wsdd/\"\r\n"); sb.append("xmlns:java=\"http://xml.apache.org/axis/wsdd/providers/java\">\r\n"); sb.append("<globalConfiguration>\r\n"); sb.append("<parameter name=\"disablePrettyXML\" value=\"true\"/>\r\n"); sb.append("<parameter name=\"enableNamespacePrefixOptimization\" value=\"true\"/>\r\n"); sb.append("</globalConfiguration>\r\n"); sb.append("<transport name=\"http\" pivot=\"java:org.apache.axis.transport.http.CommonsHTTPSender\"><parameter name=\"PROTOCOL\">HTTP/1.1</parameter> <parameter name=\"Transfer-Encoding\">chunked</parameter></transport>\r\n"); sb.append("<transport name=\"https\" pivot=\"java:org.apache.axis.transport.http.CommonsHTTPSender\"/>\r\n"); sb.append("<transport name=\"local\" pivot=\"java:org.apache.axis.transport.local.LocalSender\"/>\r\n"); sb.append("<transport name=\"java\" pivot=\"java:org.apache.axis.transport.java.JavaSender\"/>\r\n"); sb.append("</deployment>\r\n"); return new org.apache.axis.configuration.XMLStringProvider(sb.toString()); } }
For using Forms Authentication,
service.setUsername(userName);
service.setPassword(password);is used to provide the Credentials.
I have also tried using
service.logonUser(userName, password, "INSTANCE.reporting.windows.net");
instead of forms authentication but it results in another Exception
org.xml.sax.SAXException: Bad envelope tag: HTML
-
Friday, May 25, 2012 1:56 PMModerator
Hi Riddhi,
Your question falls into the paid support category which requires a more in-depth level of support. Please visit the below link to see the various paid support options that are available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
Thanks,
-
Wednesday, June 06, 2012 5:11 AM
Hi Cathy,
I also tried to get technical assistance from Microsoft support for SQL Azure Reporting but came to know that Azure Reporting Services is still in CTP phase.
I am quoting the mail response here:
At the present time Reporting Services in Azure is still in Customer Technical Preview (CTP) mode and as such does not have engineer based assistance. This will change as soon as it is comes out of CTP and is officially released.
While in CTP support is only offered via the forums on http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/threads which are monitored by our developers.
Sorry for the inconvenience but we will have to ask you to please post this same question on the forums.
So, When SQL Azure Reporting Services is expected to come out of CTP?
Thanks, Riddhi Mohan
-
Tuesday, June 12, 2012 6:43 PMModerator
Hi Riddhi,
I apologize for misinforming you. But, support is now available, as of June 7th. Support should be able to assist you in troubleshooting what might be missing in the HTTP request.
Thanks,
Cathy

