Showing posts with label implemented. Show all posts
Showing posts with label implemented. Show all posts

Wednesday, March 28, 2012

Reporting Services 2005 WMI documentation inccorect?

I have SQL Server 2005 + Reporting Services 2005 installed on a machine. I've
implemented Custom Forms Security Extension. When I run the code below I get
a WMI Exception "Not Found"? I think maybe I have the namespace or class name
wrong... The documentation has both "MSReportManager_ConfigurationSetting"
and "MSReportServerReportManager_ConfigurationSetting" but neither seem to
work. The only WMI class that works properly is "MSReportServer_Instance".
What am I doing wrong?
________________________________________________________
Nuno Pereira
ManagementScope scope = new
ManagementScope(@."\\localhost\root\Microsoft\SqlServer\ReportServer\v9");
scope.Connect();
ManagementPath path = new
ManagementPath("MSReportServerReportManager_ConfigurationSetting");
ObjectGetOptions options = new ObjectGetOptions();
ManagementClass serverClass = new ManagementClass(scope, path, options);
serverClass.Get(); // throws a "Not Found" error...
________________________________________________________________I am now encountering a similar problem as you. I am looking into the sample
provided by MS on Using Forms Authentication in Reporting Services (this is
in SQL2K) and trying to replicate it using SQL 2005 and VS2005.
But I have problems accessing the PathName property of
MSReportServer_ConfigurationSetting, which i need to point to the installed
path for the Report Server. Can any one help to explain more on this area?
Thanks for any assistance.
"Nuno" wrote:
> I have SQL Server 2005 + Reporting Services 2005 installed on a machine. I've
> implemented Custom Forms Security Extension. When I run the code below I get
> a WMI Exception "Not Found"? I think maybe I have the namespace or class name
> wrong... The documentation has both "MSReportManager_ConfigurationSetting"
> and "MSReportServerReportManager_ConfigurationSetting" but neither seem to
> work. The only WMI class that works properly is "MSReportServer_Instance".
> What am I doing wrong?
> ________________________________________________________
> Nuno Pereira
> ManagementScope scope = new
> ManagementScope(@."\\localhost\root\Microsoft\SqlServer\ReportServer\v9");
> scope.Connect();
> ManagementPath path = new
> ManagementPath("MSReportServerReportManager_ConfigurationSetting");
> ObjectGetOptions options = new ObjectGetOptions();
> ManagementClass serverClass = new ManagementClass(scope, path, options);
> serverClass.Get(); // throws a "Not Found" error...
> ________________________________________________________________
>
>|||I am also encountering similar problems trying to retrieve the RS Web Service
from the following constants in Utils.cs provided in the RS 2000 Forms
Authentication example:
// WMI constants
const string WmiNamespace =@."\\localhost\root\Microsoft\SqlServer\ReportingServices\v8";
const string WmiRSClass = @."MSReportServerReportManager_ConfigurationSetting";
I've had to hardcode the Web Service URL (server.Url = "https://<server
name>/reportserver/reportservice.asmx";) in my UILogon.aspx.cs file to make
it work but this obviously isn't a solution since we have multiple test and
production enviornments.
"ice" wrote:
> I am now encountering a similar problem as you. I am looking into the sample
> provided by MS on Using Forms Authentication in Reporting Services (this is
> in SQL2K) and trying to replicate it using SQL 2005 and VS2005.
> But I have problems accessing the PathName property of
> MSReportServer_ConfigurationSetting, which i need to point to the installed
> path for the Report Server. Can any one help to explain more on this area?
> Thanks for any assistance.
> "Nuno" wrote:
> > I have SQL Server 2005 + Reporting Services 2005 installed on a machine. I've
> > implemented Custom Forms Security Extension. When I run the code below I get
> > a WMI Exception "Not Found"? I think maybe I have the namespace or class name
> > wrong... The documentation has both "MSReportManager_ConfigurationSetting"
> > and "MSReportServerReportManager_ConfigurationSetting" but neither seem to
> > work. The only WMI class that works properly is "MSReportServer_Instance".
> >
> > What am I doing wrong?
> >
> > ________________________________________________________
> >
> > Nuno Pereira
> > ManagementScope scope = new
> > ManagementScope(@."\\localhost\root\Microsoft\SqlServer\ReportServer\v9");
> >
> > scope.Connect();
> >
> > ManagementPath path = new
> > ManagementPath("MSReportServerReportManager_ConfigurationSetting");
> > ObjectGetOptions options = new ObjectGetOptions();
> > ManagementClass serverClass = new ManagementClass(scope, path, options);
> >
> > serverClass.Get(); // throws a "Not Found" error...
> > ________________________________________________________________
> >
> >
> >|||Is anybody from Microsoft listening? What's the answer to this question? What
are the equivalent constants for RS 2005 that were documented in the RS 2000
security extension example?
// RS 2000 Code
// WMI constants
const string WmiNamespace = @."\\localhost\root\Microsoft\SqlServer\ReportingServices\v8";
const string WmiRSClass = @."MSReportServerReportManager_ConfigurationSetting";
"JSI" wrote:
> I am also encountering similar problems trying to retrieve the RS Web Service
> from the following constants in Utils.cs provided in the RS 2000 Forms
> Authentication example:
> // WMI constants
> const string WmiNamespace => @."\\localhost\root\Microsoft\SqlServer\ReportingServices\v8";
> const string WmiRSClass = @."MSReportServerReportManager_ConfigurationSetting";
> I've had to hardcode the Web Service URL (server.Url = "https://<server
> name>/reportserver/reportservice.asmx";) in my UILogon.aspx.cs file to make
> it work but this obviously isn't a solution since we have multiple test and
> production enviornments.
> "ice" wrote:
> > I am now encountering a similar problem as you. I am looking into the sample
> > provided by MS on Using Forms Authentication in Reporting Services (this is
> > in SQL2K) and trying to replicate it using SQL 2005 and VS2005.
> >
> > But I have problems accessing the PathName property of
> > MSReportServer_ConfigurationSetting, which i need to point to the installed
> > path for the Report Server. Can any one help to explain more on this area?
> >
> > Thanks for any assistance.
> >
> > "Nuno" wrote:
> >
> > > I have SQL Server 2005 + Reporting Services 2005 installed on a machine. I've
> > > implemented Custom Forms Security Extension. When I run the code below I get
> > > a WMI Exception "Not Found"? I think maybe I have the namespace or class name
> > > wrong... The documentation has both "MSReportManager_ConfigurationSetting"
> > > and "MSReportServerReportManager_ConfigurationSetting" but neither seem to
> > > work. The only WMI class that works properly is "MSReportServer_Instance".
> > >
> > > What am I doing wrong?
> > >
> > > ________________________________________________________
> > >
> > > Nuno Pereira
> > > ManagementScope scope = new
> > > ManagementScope(@."\\localhost\root\Microsoft\SqlServer\ReportServer\v9");
> > >
> > > scope.Connect();
> > >
> > > ManagementPath path = new
> > > ManagementPath("MSReportServerReportManager_ConfigurationSetting");
> > > ObjectGetOptions options = new ObjectGetOptions();
> > > ManagementClass serverClass = new ManagementClass(scope, path, options);
> > >
> > > serverClass.Get(); // throws a "Not Found" error...
> > > ________________________________________________________________
> > >
> > >
> > >|||For those of you who are still looking for the answer. The namespace in sql server 2005 is: "\\localhost\root\Microsoft\SqlServer\ReportServer\v9\Admin" while the class for report manager instance is: "MSReportManager_ConfigurationSetting". For more details please refer to: http://msdn2.microsoft.com/en-us/library/ms153571.aspx
From http://www.developmentnow.com/g/115_2006_2_0_0_693931/Reporting-Services-2005-WMI-documentation-inccorect.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com

Monday, March 26, 2012

reporting services 2005

What if any are the new features being implemented in Reporting
Services 2005? I tried looking around on the SQL server 2005 site for
info but there didn't seem to be any.Here is one:
- Report Builder
(http://www.microsoft.com/sql/reporting/productinfo/av_activeviews.asp)
I have seen a webcast about this feature and I think it will be very
interesting.
http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032259394&EventCategory=5&culture=en-US&CountryCode=US
Eric|||See ReportingServicesFAQ.com
http://www.ReportingServicesFAQ.com/ow.asp?RS2005Features
Aiwa wrote:
> Here is one:
> - Report Builder
> (http://www.microsoft.com/sql/reporting/productinfo/av_activeviews.asp)
> I have seen a webcast about this feature and I think it will be very
> interesting.
> http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032259394&EventCategory=5&culture=en-US&CountryCode=US
> Eric
>|||thanks!
"RS Guy" <JerryNY32513@.hotmail.com> wrote in message
news:u%23cSk0l$EHA.1908@.TK2MSFTNGP15.phx.gbl...
> See ReportingServicesFAQ.com
> http://www.ReportingServicesFAQ.com/ow.asp?RS2005Features
>
> Aiwa wrote:
>> Here is one:
>> - Report Builder
>> (http://www.microsoft.com/sql/reporting/productinfo/av_activeviews.asp)
>> I have seen a webcast about this feature and I think it will be very
>> interesting.
>> http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032259394&EventCategory=5&culture=en-US&CountryCode=US
>> Eric|||What about custom report designer controls? The lack of the ability
to develop custom controls in reporting services is one of the main
factors preventing our organization from adopting RS as our main
reporting platform.
"Susan Miller" <millersusanm@.sympatico.ca> wrote in message news:<IxDHd.50276$W33.1197052@.news20.bellglobal.com>...
> thanks!
> "RS Guy" <JerryNY32513@.hotmail.com> wrote in message
> news:u%23cSk0l$EHA.1908@.TK2MSFTNGP15.phx.gbl...
> > See ReportingServicesFAQ.com
> >
> > http://www.ReportingServicesFAQ.com/ow.asp?RS2005Features
> >
> >
> > Aiwa wrote:
> >> Here is one:
> >>
> >> - Report Builder
> >> (http://www.microsoft.com/sql/reporting/productinfo/av_activeviews.asp)
> >>
> >> I have seen a webcast about this feature and I think it will be very
> >> interesting.
> >> http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032259394&EventCategory=5&culture=en-US&CountryCode=US
> >> Eric
> >>sql

Reporting Services 2000 w/ Forms Auth - rs.Timeout not getting set

I have implemented the Forms Authentication in Reporting Services 2000. In addition, we have a reports web application that uses the authentication to access the reports in the Reports Server. I have implemented a similar code that is posted in http://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspxhttp://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspx for the Reports Server and Reports Manager. For the web application, I added reference to the custom security assembly, created a new ReportsServerProxy, and then called the LogonUser().

Now, one of the functionality we have in the applicaiton is to set the reporting services Timeout for reports that take too long to run. The weird thing is the Timeout (in milliseconds) is getting ignored by the ReportServerProxy using the custom security assembly. I verified that without the custom secuirty assembly, the Timeout property is getting set.

I did find the code for ReportServerProxy's GetWebRequest(Uri uri) is setting the request.Timeout to -1. I thought this was interfering with the rs.Timeout, but removing the code did not make any difference.

How do I set the Timeout property correctly? Do you know of any issues with setting the Timeout property for Reporting Services with Forms Authentication?

Can anybody help PLEASE? I need an answer ASAP. Thanks in advance for your help.

/**partial UILogon.aspx code for ReportServerProxy below**/

public class ReportServerProxy : ReportingService

{

protected override WebRequest GetWebRequest(Uri uri)

{

HttpWebRequest request;

request = (HttpWebRequest)HttpWebRequest.Create(uri);

// Create a cookie jar to hold the request cookie

CookieContainer cookieJar = new CookieContainer();

request.CookieContainer = cookieJar;

Cookie authCookie = AuthCookie;

// if the client already has an auth cookie

// place it in the request's cookie container

if (authCookie != null)

request.CookieContainer.Add(authCookie);

request.Timeout = -1;

request.Headers.Add("Accept-Language",

HttpContext.Current.Request.Headers["Accept-Language"]);

return request;

} ...}

/** Below is the Reports Web applicaiton code that calls the ReportsServerProxy LogonUser **/

Public Function GetReportServerProxy() As ReportServerProxy

Dim rsProx As New ReportServerProxy

rsProx.Url = ConfigurationSettings.AppSettings("REPORT_SERVER_URL") + "/ReportService.asmx"

Try

rsProx.LogonUser("SYSADMIN", "password", Nothing)

Return rsProx

Catch ex As Exception

Throw New Exception("GetReportServerProxy Failed.", ex)

End Try

End Function

Private Function CreateSnapShot() As String

...

Dim rs As RSCustomSecurity.ReportServerProxy

Try

rs = GetReportServerProxy()

' First set the parameters' default values

parameters = setParamters()

rs.SetReportParameters(reportPath, parameters)

If errorsList.Count > 0 Then Throw New Exception

'Server.ScriptTimeout = 10

rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))

lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)

'lblStatus.NavigateUrl = "ViewSnapShot.aspx?History_ID=" & lsHistoryID

lblStatus.Text = "Your request has been processed. View report as"

....

Catch ex As Exception

....

Finally

Debug.Write("End : " & Now.ToLongTimeString)

rs = Nothing

End Try

End Function

Anyone that has any idea, PLEASE respond. Just to reiterate...

I have implemented the forms authentication for Reporting Services 2000. Below, I set the ReportingServices.Timeout property and then call CreateReportHistory(). Before I implemented the Forms Authentication, the timeout was getting recognized, which means the CreateReportHistorySnapshot errors out with a message "Operation timed out". But now, with Forms Authentication, the Timeout is not recognized and CreateReportHistory runs until it finishes generating the report, which can take a while to run. Does anyone know what I need to do to set it correctly?

rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))

lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)

Thanks!

Reporting Services 2000 w/ Forms Auth - rs.Timeout not getting set

I have implemented the Forms Authentication in Reporting Services 2000. In addition, we have a reports web application that uses the authentication to access the reports in the Reports Server. I have implemented a similar code that is posted in http://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspxhttp://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspx for the Reports Server and Reports Manager. For the web application, I added reference to the custom security assembly, created a new ReportsServerProxy, andthen called the LogonUser().

Now, one of the functionality we have in the applicaiton istoset the reporting services Timeout for reports that take too longto run. The weird thing is the Timeout (in milliseconds) is getting ignored by the ReportServerProxy using the custom security assembly. I verified that without the custom secuirty assembly, the Timeout propertyis getting set.

I did find the code for ReportServerProxy's GetWebRequest(Uri uri) is setting the request.Timeout to -1. I thought this was interfering with the rs.Timeout, but removing the code did not make any difference.

How do I set the Timeout property correctly? Do you know of any issues with setting the Timeout propertyfor Reporting Services with Forms Authentication?

Can anybody help PLEASE? I need an answer ASAP. Thanks in advance for your help.

/**partial UILogon.aspx code for ReportServerProxy below**/

publicclass ReportServerProxy : ReportingService

{

protected override WebRequest GetWebRequest(Uri uri)

{

HttpWebRequest request;

request = (HttpWebRequest)HttpWebRequest.Create(uri);

// Create a cookie jar to hold the request cookie

CookieContainer cookieJar = new CookieContainer();

request.CookieContainer = cookieJar;

Cookie authCookie = AuthCookie;

// if the client already has an auth cookie

// place it in the request's cookie container

if (authCookie != null)

request.CookieContainer.Add(authCookie);

request.Timeout = -1;

request.Headers.Add("Accept-Language",

HttpContext.Current.Request.Headers["Accept-Language"]);

return request;

} ...}

/** Below is the Reports Web applicaiton code that calls the ReportsServerProxy LogonUser **/

PublicFunction GetReportServerProxy() As ReportServerProxy

Dim rsProx AsNew ReportServerProxy

rsProx.Url = ConfigurationSettings.AppSettings("REPORT_SERVER_URL") + "/ReportService.asmx"

Try

rsProx.LogonUser("SYSADMIN", "password", Nothing)

Return rsProx

Catch ex As Exception

Throw New Exception("GetReportServerProxy Failed.", ex)

End Try

EndFunction

PrivateFunction CreateSnapShot() AsString

...

Dim rs As RSCustomSecurity.ReportServerProxy

Try

rs = GetReportServerProxy()

' First set the parameters' default values

parameters = setParamters()

rs.SetReportParameters(reportPath, parameters)

If errorsList.Count > 0 Then Throw New Exception

'Server.ScriptTimeout = 10

rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))

lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)

'lblStatus.NavigateUrl = "ViewSnapShot.aspx?History_ID=" & lsHistoryID

lblStatus.Text = "Your request has been processed. View report as"

....

Catch ex As Exception

....

Finally

Debug.Write("End : " & Now.ToLongTimeString)

rs = Nothing

End Try

EndFunction

Anyone that has any idea, PLEASE respond. Just to reiterate...

I have implemented the forms authentication for Reporting Services 2000. Below, I set the ReportingServices.Timeout property and then call CreateReportHistory(). Before I implemented the Forms Authentication, the timeout was getting recognized, which means the CreateReportHistorySnapshot errors out with a message "Operation timed out". But now, with Forms Authentication, the Timeout is not recognized and CreateReportHistory runs until it finishes generating the report, which can take a while to run. Does anyone know what I need to do to set it correctly?

rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))

lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)

Thanks!

sql

Monday, March 12, 2012

Reporting Service Web Service from PowerBuilder 10.5 ...

Has anyone implemented Reporting Service (Execution) Web Service from within Powerbuilder 10.5?

I am trying to pass NULL value to the second argument of LoadReport function (to not get the History Snapshot) and the SOAP call gives an error message "String was not recognized as a valid DateTime". I could not pass Powerbuilder NULL (SetNull(StringColl) and StringCol passed as the snapshotID) value as the second argument to LoadReport as for some reason the Web Service could not be invoked. If I pass empty string (or 'NULL' string) I get the following error message. If I pass 'or '1900-01-01T00:00:00', then Reporting Service looks for a snapshot with this date and fails.

Is there a way to send a string from PowerBuilder, which would mean 'NULL Datetime' to the SOAP call so that Reporting Service just loads the passed Report without looking for a snapshot?

Thanks in advance.

--

System.Web.Services.Protocols.SoapException: The parameter value provided for 'snapshotID' does not match the parameter type. > Microsoft.ReportingServices.Diagnostics.Utilities.ParameterTypeMismatchException: The parameter value provided for 'snapshotID' does not match the parameter type. > System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
at System.DateTime.ParseExact(String s, String format, IFormatProvider provider)
at Microsoft.ReportingServices.Diagnostics.Globals.ParseSnapshotDateParameter(String snapshotDate, Boolean nullIsValid)
End of inner exception stack trace
at Microsoft.ReportingServices.Diagnostics.Globals.ParseSnapshotDateParameter(String snapshotDate, Boolean nullIsValid)
at Microsoft.ReportingServices.WebServer.HttpClientRequest.Init(CatalogItemContext context, String userName)
at Microsoft.ReportingServices.WebServer.SessionStarterAction.CreateNew()
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)
End of inner exception stack trace
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)

Hello,

Without pretending to know what powerbuilder is I want to let you know that I came across a similar exception in VS 2005 today.

{System.Web.Services.Protocols.SoapException: The parameter value provided for 'snapshotID' does not match the parameter type. > The parameter value provided for 'snapshotID' does not match the parameter type. > String was not recognized as a valid DateTime.

I resolved this by changing by changing this code (once again, not familiar with your problem - I'm not sure if you can actually change code in powerbuilder...):

byte[] fileData = rs.Render(_reportPath, formatStr, "", deviceInfo, renderParameters, null, "", out ignoreString, out ignoreString, out ignoreValue, out ignoreWarning, out ignoreArrayString);

to this:

byte[] fileData = rs.Render(_reportPath, formatStr, null, deviceInfo, renderParameters, null, "", out ignoreString, out ignoreString, out ignoreValue, out ignoreWarning, out ignoreArrayString);

Regards,

Luc Pettett

|||

Thanks for your reply. However, when NULL is passed the web service call fails with 'Cannot invoke web service' error. The same call works if a valid datetime is passed. It seems to be something specific to PowerBuilder as I could call these methods successfully in VS 2005.

Thanks

|||Hrrm... I am checking out powerbuilder now, but it looks like it is doing "the wrong thing" when sending the null string, which is causing us to try to interpret the empty string as a history id.|||Have you tried using the .NET SOAP bindings for Powerbuilder? I just installed PowerBuilder and tried it out, and it seems to send different XML than what the Visual Studio generated proxy sends. Specifically, the History element is marked w/xs:nil=true whereas the elements is ignored completely in the Visual Studio proxy. Maybe the XML will be closer to what VS generates if you use the .NET binding?|||

Thanks for your response. In fact, I have been trying this only with .NET SOAP engine.

If I call LoadReport with a proper HistoryID, the call succeeds. However, when NULL is passed as HistoryID, a SOAP exception is generated ('Cannot invoke the Web Service') and I do not see any entries in Trace. Are you able to see some entries in Trace when NULL is passed (from your reply - "... and it seems to send different XML than what the Visual Studio generated proxy sends.") from PowerBuilder?

I could not find a way to pass NULL string values as arguments to PB Web Service calls.

The function is defined as below in the PowerBuilder 10.5 generated proxy (using .NET SOAP engine) :

loadreport ( string report, string historyid ) returns
s25executioninfo

In the WSDL for this web service, the function argument
in question is defined as

- <s:element name="LoadReport">

- <s:complexType>

- <s:sequence>

<s:element minOccurs="0" maxOccurs="1" name="Report" type="s:string" />

<s:element minOccurs="0" maxOccurs="1" name="HistoryID" type="s:string" />

</s:sequence>

</s:complexType>

</s:element>

However, I do not see the attribute nillable="true" or xs:nil=true set for HistoryID. Is this what causing the problem with NULL argument in PowerBuilder? If I try the same call from within VS 2005 (using C#) using NULL argument, it works fine.

Please let me know if I can try anything different to make this work from within PowerBuilder 10.5 (Build 5079).

|||

I am not 100% certain about this, but I believe the issue is in how PowerBuilder is constructing the SOAP to send to the reporting server. Setting xsi:nil=true is not semantically equivalent to ignoring the element altogether. Since the XSD doesn't define the element as being nillable, I don't think ASP.Net honors the xsi:nil attribute on the incoming SOAP envelope.

I'm not really certain what to tell you at this point, other than you might want to consider using an alternative SOAP implementation for PowerBuilder. I am not aware of any though (I am new to PowerBuilder as of last night).

If using an alternative implementation is not an option, then you might want to consider having the SOAP object in PowerBuilder communicate to a proxy which sends a conformant SOAP envelope to the Report Server.

|||Ok, I just double checked the XML Schema spec (http://www.w3.org/TR/xmlschema-1/) and it looks like for element declarations the default value of nillable is false. So in this case, PowerBuilder is doing the wrong thing. When it tries to send null value, and the schema component is optional (in this case it is, since minOccurs=0), then it should simply omit the element altogether.|||

Thanks again for your response. As you have suggested, I will try the other options that you have mentioned and let you know if I succeed. Can you please answer the other question I had in the earlier mail?

Are you able to see some entries in Trace when NULL is passed (from your reply - "... and it seems to send different XML than what the Visual Studio generated proxy sends.") from PowerBuilder? I am curious to know as I do not see any SOAP request passed to the trace when NULL is passed and only a SOAP exception ('Cannot invoke the Web Service') is generated.

Thanks a lot.

|||

I did not get the "Cannot invoke the Web Service" error message. I was using the EasySOAP stack, and the XML it generated for the null historyId parameter was <HistoryId xsi:nil="true"></History>. The code I was using (I don't have it in front of me right now) basically looked like this:

string historyId

SetNull(historyId)

rsproxy.LoadReport("/myreport", historyid)

|||Thanks. I will get back to you after I try the alternatives you mentioned earlier.|||I am actually trying this to use a wrapper web service to workaround a problem with using Reporting Service Web Service from PowerBuilder 10.5. But, I get the following exception when 'LoadReport' (execInfo = rs.LoadReport(reportPath, historyID); with historyID being NULL ) is executed (VS 2005 - Debug -> Start Without Debugging) from a ASP .NET Web Service (created using VS 2005 / C#). However, the same thing works when running it as a Visual Studio Console application created using C#.

The credentials are set as

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

The local website ReportSever$SQL2005's 'Directory Security' has 'Anonymous access' unchecked, the User Name is 'IUSR_USER1' and 'Integrated Windows Authenticaiton' is checked.

Please let me know what kind of additional permissions are needed USER1\ASPNET. The user 'USER1' is under 'ActiveDirectory' domain.

Thanks in advance.

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException:

The permissions granted to user 'USER1\ASPNET' are insufficient for performing this operation. &gt; Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'USER1\ASPNET' are insufficient for performing this operation.|||

I just found out that the Report itself did not have permissions for ASPNET. Now, the workaround that I am trying for PB 10.5 also seems to work for

LoadReport through a wraparound ASPNET Web Service (of course, I haven't tried many things yet).

Thanks Mr. Gallardo for all your help.

Reporting Service Web Service from PowerBuilder 10.5 ...

Has anyone implemented Reporting Service (Execution) Web Service from within Powerbuilder 10.5?

I am trying to pass NULL value to the second argument of LoadReport function (to not get the History Snapshot) and the SOAP call gives an error message "String was not recognized as a valid DateTime". I could not pass Powerbuilder NULL (SetNull(StringColl) and StringCol passed as the snapshotID) value as the second argument to LoadReport as for some reason the Web Service could not be invoked. If I pass empty string (or 'NULL' string) I get the following error message. If I pass 'or '1900-01-01T00:00:00', then Reporting Service looks for a snapshot with this date and fails.

Is there a way to send a string from PowerBuilder, which would mean 'NULL Datetime' to the SOAP call so that Reporting Service just loads the passed Report without looking for a snapshot?

Thanks in advance.

--

System.Web.Services.Protocols.SoapException: The parameter value provided for 'snapshotID' does not match the parameter type. > Microsoft.ReportingServices.Diagnostics.Utilities.ParameterTypeMismatchException: The parameter value provided for 'snapshotID' does not match the parameter type. > System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
at System.DateTime.ParseExact(String s, String format, IFormatProvider provider)
at Microsoft.ReportingServices.Diagnostics.Globals.ParseSnapshotDateParameter(String snapshotDate, Boolean nullIsValid)
End of inner exception stack trace
at Microsoft.ReportingServices.Diagnostics.Globals.ParseSnapshotDateParameter(String snapshotDate, Boolean nullIsValid)
at Microsoft.ReportingServices.WebServer.HttpClientRequest.Init(CatalogItemContext context, String userName)
at Microsoft.ReportingServices.WebServer.SessionStarterAction.CreateNew()
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)
End of inner exception stack trace
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)

Hello,

Without pretending to know what powerbuilder is I want to let you know that I came across a similar exception in VS 2005 today.

{System.Web.Services.Protocols.SoapException: The parameter value provided for 'snapshotID' does not match the parameter type. > The parameter value provided for 'snapshotID' does not match the parameter type. > String was not recognized as a valid DateTime.

I resolved this by changing by changing this code (once again, not familiar with your problem - I'm not sure if you can actually change code in powerbuilder...):

byte[] fileData = rs.Render(_reportPath, formatStr, "", deviceInfo, renderParameters, null, "", out ignoreString, out ignoreString, out ignoreValue, out ignoreWarning, out ignoreArrayString);

to this:

byte[] fileData = rs.Render(_reportPath, formatStr, null, deviceInfo, renderParameters, null, "", out ignoreString, out ignoreString, out ignoreValue, out ignoreWarning, out ignoreArrayString);

Regards,

Luc Pettett

|||

Thanks for your reply. However, when NULL is passed the web service call fails with 'Cannot invoke web service' error. The same call works if a valid datetime is passed. It seems to be something specific to PowerBuilder as I could call these methods successfully in VS 2005.

Thanks

|||Hrrm... I am checking out powerbuilder now, but it looks like it is doing "the wrong thing" when sending the null string, which is causing us to try to interpret the empty string as a history id.|||Have you tried using the .NET SOAP bindings for Powerbuilder? I just installed PowerBuilder and tried it out, and it seems to send different XML than what the Visual Studio generated proxy sends. Specifically, the History element is marked w/xs:nil=true whereas the elements is ignored completely in the Visual Studio proxy. Maybe the XML will be closer to what VS generates if you use the .NET binding?|||

Thanks for your response. In fact, I have been trying this only with .NET SOAP engine.

If I call LoadReport with a proper HistoryID, the call succeeds. However, when NULL is passed as HistoryID, a SOAP exception is generated ('Cannot invoke the Web Service') and I do not see any entries in Trace. Are you able to see some entries in Trace when NULL is passed (from your reply - "... and it seems to send different XML than what the Visual Studio generated proxy sends.") from PowerBuilder?

I could not find a way to pass NULL string values as arguments to PB Web Service calls.

The function is defined as below in the PowerBuilder 10.5 generated proxy (using .NET SOAP engine) :

loadreport ( string report, string historyid ) returns
s25executioninfo

In the WSDL for this web service, the function argument
in question is defined as

- <s:element name="LoadReport">

- <s:complexType>

- <s:sequence>

<s:element minOccurs="0" maxOccurs="1" name="Report" type="s:string" />

<s:element minOccurs="0" maxOccurs="1" name="HistoryID" type="s:string" />

</s:sequence>

</s:complexType>

</s:element>

However, I do not see the attribute nillable="true" or xs:nil=true set for HistoryID. Is this what causing the problem with NULL argument in PowerBuilder? If I try the same call from within VS 2005 (using C#) using NULL argument, it works fine.

Please let me know if I can try anything different to make this work from within PowerBuilder 10.5 (Build 5079).

|||

I am not 100% certain about this, but I believe the issue is in how PowerBuilder is constructing the SOAP to send to the reporting server. Setting xsi:nil=true is not semantically equivalent to ignoring the element altogether. Since the XSD doesn't define the element as being nillable, I don't think ASP.Net honors the xsi:nil attribute on the incoming SOAP envelope.

I'm not really certain what to tell you at this point, other than you might want to consider using an alternative SOAP implementation for PowerBuilder. I am not aware of any though (I am new to PowerBuilder as of last night).

If using an alternative implementation is not an option, then you might want to consider having the SOAP object in PowerBuilder communicate to a proxy which sends a conformant SOAP envelope to the Report Server.

|||Ok, I just double checked the XML Schema spec (http://www.w3.org/TR/xmlschema-1/) and it looks like for element declarations the default value of nillable is false. So in this case, PowerBuilder is doing the wrong thing. When it tries to send null value, and the schema component is optional (in this case it is, since minOccurs=0), then it should simply omit the element altogether.|||

Thanks again for your response. As you have suggested, I will try the other options that you have mentioned and let you know if I succeed. Can you please answer the other question I had in the earlier mail?

Are you able to see some entries in Trace when NULL is passed (from your reply - "... and it seems to send different XML than what the Visual Studio generated proxy sends.") from PowerBuilder? I am curious to know as I do not see any SOAP request passed to the trace when NULL is passed and only a SOAP exception ('Cannot invoke the Web Service') is generated.

Thanks a lot.

|||

I did not get the "Cannot invoke the Web Service" error message. I was using the EasySOAP stack, and the XML it generated for the null historyId parameter was <HistoryId xsi:nil="true"></History>. The code I was using (I don't have it in front of me right now) basically looked like this:

string historyId

SetNull(historyId)

rsproxy.LoadReport("/myreport", historyid)

|||Thanks. I will get back to you after I try the alternatives you mentioned earlier.|||I am actually trying this to use a wrapper web service to workaround a problem with using Reporting Service Web Service from PowerBuilder 10.5. But, I get the following exception when 'LoadReport' (execInfo = rs.LoadReport(reportPath, historyID); with historyID being NULL ) is executed (VS 2005 - Debug -> Start Without Debugging) from a ASP .NET Web Service (created using VS 2005 / C#). However, the same thing works when running it as a Visual Studio Console application created using C#.

The credentials are set as

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

The local website ReportSever$SQL2005's 'Directory Security' has 'Anonymous access' unchecked, the User Name is 'IUSR_USER1' and 'Integrated Windows Authenticaiton' is checked.

Please let me know what kind of additional permissions are needed USER1\ASPNET. The user 'USER1' is under 'ActiveDirectory' domain.

Thanks in advance.

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException:

The permissions granted to user 'USER1\ASPNET' are insufficient for performing this operation. &gt; Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'USER1\ASPNET' are insufficient for performing this operation.|||

I just found out that the Report itself did not have permissions for ASPNET. Now, the workaround that I am trying for PB 10.5 also seems to work for

LoadReport through a wraparound ASPNET Web Service (of course, I haven't tried many things yet).

Thanks Mr. Gallardo for all your help.