Monday, February 20, 2012

LoadReport() - SoapException - Help needed

Hi Experts,

getting the Error:

Server did not recognize the value of HTTP Header SOAPAction: http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/LoadReport

when calling LoadReport().

I can access the ReportServer and ReportManager through Browser and get perfect results.

I also can querying the WebService through a DataSet (XML-Data-Provider) in a Report Project.

VS 2005; SQL SERVER 2005; IIS6; Windows Server 2003. RS is configured on DefaultWebSite(Port 80)

rsExec = new rsExecService.ReportExecutionService();

rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;

rsExec.Url = http://pserver01/ReportServer/ReportService2005.asmx;

// Render arguments

byte[] result = null;

string reportPath = "/ObjectsRpt/Sales";

string format = "PDF";

string historyID = null;

string devInfo = @."<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>";

// Prepare report parameter.

rsExecService.ParameterValue[] parameters = new rsExecService.ParameterValue[1];

parameters[0] = new rsExecService.ParameterValue();

parameters[0].Name = "SalesOrderNumber";

parameters[0].Value = "SO43659";

string encoding;

string mimeType;

string extension;

rsExecService.Warning[] warnings = null;

string[] streamIDs = null;

rsExecService.ExecutionInfo execInfo = new rsExecService.ExecutionInfo();

rsExecService.ExecutionHeader execHeader = new rsExecService.ExecutionHeader();

rsExec.ExecutionHeaderValue = execHeader;

// Next line will cause the Error, when API tries to call Invoke

execInfo = rsExec.LoadReport(reportPath, historyID);

Help wanted

Thanx Ronny

Your code looks good. What happens when you browse http://pserver01/ReportServer/ReportService2005.asmx?|||

Hi Theo,

Browser opens with the XML-Definition.

If i put this URL in VS when adding a Web-Reference i also get the correct Definition of the Web-Services.

Any other suggestions?

Ronny

|||

I assume the URL line to be actually:

rsExec.Url = "http://pserver01/ReportServer/ReportService2005.asmx";

|||

Hi Teo,

it is like you assumed.

rsExec.Url = "http://pserver01/ReportServer/ReportService2005.asmx";

i added a watch and url is correct!

?

Ronny

|||If you run the code locally on the server using localhost as server name, does it work?|||

Hi Teo,

no, not with localhost and also not with the IP-Address..

No Entry in logs-Folder (RS or IIS), Configuration-Files looking good..

Any other ideas?

Ronny

|||It looks like IIS is rejecting the remote request. Intercepting the response with utilities like tcpTrace or SOAPTrace will help determining the cause.|||You are binding the proxy to the wrong endpoint (you are binding it to the management endpoint). Change the URL to http://pserver01/ReportServer/ReportExecution2005.asmx|||

Hello John, thanx for the great hint! - It's working fine now!

Ronny

No comments:

Post a Comment