You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Davy Crocket <dv...@hotmail.com> on 2004/06/03 00:30:12 UTC
Axis client gets a Session Id Required error when attempting to perform an render action against Microsoft's Reporting Services
Hello, I am attempting to use Axis with my Java application to interact with Microsoft's Reporting Services to save, retrieve, and render reports. I am able to save and retrieve the reports but when I attempt to run a report I get a MissingSessionIdException error. I am trying to figure out how to get the session id passed in the request. I used the WSDL2Java utility and created stub classes from Microsoft's WSDL.
Here is the error:
System.Web.Services.Protocols.SoapException: The session identifier is missing. A session identifier is required for this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.MissingSessionIdException: The session identifier is missing. A session identifier is required for this operation.
at Microsoft.ReportingServices.WebServer.ReportingService.GetSessionId(Boolean required)
at Microsoft.ReportingServices.WebServer.ReportingService.RenderStream(String Report, String Format, String StreamID, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, Byte[]& Result, String& Encoding, String& MimeType)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.WebServer.ReportingService.RenderStream(String Report, String Format, String StreamID, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, Byte[]& Result, String& Encoding, String& MimeType)
Here is the request from my Java application:
POST /ReportServer/ReportService.asmx HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: 127.0.0.1
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/RenderStream"
Content-Length: 575
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<RenderStream xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices">
<Report>/MyReport2/Report1</Report>
<Format>MHTML</Format>
<StreamID xsi:nil="true"/>
<HistoryID xsi:nil="true"/>
<DeviceInfo xsi:nil="true"/>
<Parameters xsi:nil="true"/>
</RenderStream>
</soapenv:Body>
</soapenv:Envelope>
thanks
davy crocket
RE: Axis client gets a Session Id Required error when attempting to perform an render action against Microsoft's Reporting Services
Posted by Anne Thomas Manes <an...@manes.net>.
Microsoft's Reporting Services supports session information using either a
SOAP Header block or a URL.
See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/
rsp_prog_soapapi_dev_8x5u.asp
_____
From: Davy Crocket [mailto:dvjm9186@hotmail.com]
Sent: Wednesday, June 02, 2004 6:30 PM
To: axis-user@ws.apache.org
Subject: Axis client gets a Session Id Required error when attempting to
perform an render action against Microsoft's Reporting Services
Hello, I am attempting to use Axis with my Java application to interact with
Microsoft's Reporting Services to save, retrieve, and render reports. I am
able to save and retrieve the reports but when I attempt to run a report I
get a MissingSessionIdException error. I am trying to figure out how to get
the session id passed in the request. I used the WSDL2Java utility and
created stub classes from Microsoft's WSDL.
Here is the error:
System.Web.Services.Protocols.SoapException: The session identifier is
missing. A session identifier is required for this operation. --->
Microsoft.ReportingServices.Diagnostics.Utilities.MissingSessionIdException:
The session identifier is missing. A session identifier is required for this
operation.
at
Microsoft.ReportingServices.WebServer.ReportingService.GetSessionId(Boolean
required)
at
Microsoft.ReportingServices.WebServer.ReportingService.RenderStream(String
Report, String Format, String StreamID, String HistoryID, String DeviceInfo,
ParameterValue[] Parameters, Byte[]& Result, String& Encoding, String&
MimeType)
--- End of inner exception stack trace ---
at
Microsoft.ReportingServices.WebServer.ReportingService.RenderStream(String
Report, String Format, String StreamID, String HistoryID, String DeviceInfo,
ParameterValue[] Parameters, Byte[]& Result, String& Encoding, String&
MimeType)
Here is the request from my Java application:
POST /ReportServer/ReportService.asmx HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: 127.0.0.1
Cache-Control: no-cache
Pragma: no-cache
SOAPAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/
RenderStream"
Content-Length: 575
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<RenderStream
xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingser
vices">
<Report>/MyReport2/Report1</Report>
<Format>MHTML</Format>
<StreamID xsi:nil="true"/>
<HistoryID xsi:nil="true"/>
<DeviceInfo xsi:nil="true"/>
<Parameters xsi:nil="true"/>
</RenderStream>
</soapenv:Body>
</soapenv:Envelope>
thanks
davy crocket