This is what I'm trying to achieve. I want to call into my custom
assembly from the reports, and that assembly in turn calls a web
service. The reason I have to do that is because I think we can't
directly call a web service from the reports. To complicate the things
further I also have Forms Authentication enabled on Reporting
services.
Forms authentication enables me to use User!UserID which I pass on to
my custom assembly. The assembly in turn passes the parameter to web
service. To test the functionality I was trying to return simply
"Hello " + parameter value from the web service.
I have copied the custom assembly code to report manager's bin and
report server's bin directories. I have also added CodeGroup to
rssvrpolicy.config file to give a "FullTrust" permission on my custom
assembly.
The reports works as expected in Preview tab in VS.NET designer, but
when accessed from report manager or from the report server via URL,
the expression in text box shows #Error.
Please help to explain how to debug and fix the problem. Thanks much.
YogeshI have finally managed to get web service call working. I was able to
do this by asserting System.Net.WebPermission. Here's code snippet:
//Add following at the top of the class file
using System.Net;
using System.Security.Permissions;
//Add these lines just before instantiating web service proxy class
WebPermission webPerm = new
WebPermission(PermissionState.Unrestricted);
webPerm.Assert();
Remember to add exception handling code otherwise when functions in
custom code fails you will get "#Error" in the textbox in the report
without explaining what went wrong. If your methods return strings
then for debugging purposes you can return ex.ToString() which will at
least let you know what went wrong.
Yogesh|||Hi Yogesh,
Help..
Tried all of the above and still getting the #error on my report - I can
call a different function in the dll (not using a web service) and that is
fine..
Do I need to set up any policies in the rssvrpolicy.config file ?
I have added the reference in my code Web.Assert code - so it looks like I
still have problems with the config files ..
"Yogesh" wrote:
> This is what I'm trying to achieve. I want to call into my custom
> assembly from the reports, and that assembly in turn calls a web
> service. The reason I have to do that is because I think we can't
> directly call a web service from the reports. To complicate the things
> further I also have Forms Authentication enabled on Reporting
> services.
> Forms authentication enables me to use User!UserID which I pass on to
> my custom assembly. The assembly in turn passes the parameter to web
> service. To test the functionality I was trying to return simply
> "Hello " + parameter value from the web service.
> I have copied the custom assembly code to report manager's bin and
> report server's bin directories. I have also added CodeGroup to
> rssvrpolicy.config file to give a "FullTrust" permission on my custom
> assembly.
> The reports works as expected in Preview tab in VS.NET designer, but
> when accessed from report manager or from the report server via URL,
> the expression in text box shows #Error.
> Please help to explain how to debug and fix the problem. Thanks much.
> Yogesh
>
Showing posts with label failing. Show all posts
Showing posts with label failing. Show all posts
Thursday, March 22, 2012
Thursday, March 8, 2012
Called Web Services from a stored prcedure
Hello,
Does anyone know if it is possible to call a web service from a stored
procedure? Failing that is it possible to use exterbal object? I'm thinking
along the lines of:
@.obj = CreateObject("xyzzy.f")
@.obj.j = 1
call @.obj
Is this wishful thinking ?
Many thanks...
MartinI'm certain there are multiple methods of doing exactly what you ask, and
each method will impact the performance and reliability of your database to
one degree or another. The best option would be to make the procedure call
and web service call in tandem from the application or a DTS package.
"Martin Waller" <martinwaller@.beeb.net> wrote in message
news:eDWb629MGHA.1716@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Does anyone know if it is possible to call a web service from a stored
> procedure? Failing that is it possible to use exterbal object? I'm
> thinking along the lines of:
> @.obj = CreateObject("xyzzy.f")
> @.obj.j = 1
> call @.obj
> Is this wishful thinking ?
> Many thanks...
> Martin
>|||Thanks for the reply. Performance is not an issue for me. I need to unit
test some web services that directly effect database tables and I was
thinking of a simple .SQL file that does something like:
set-up precondition
call web service
test data is in the expected state
exit
Then I could log the output to a file and, once happy, use it to compare
against in further tests as and when the web serices are tested.
Martin
"JT" <someone@.microsoft.com> wrote in message
news:O$O3O$9MGHA.3932@.TK2MSFTNGP09.phx.gbl...
> I'm certain there are multiple methods of doing exactly what you ask, and
> each method will impact the performance and reliability of your database
> to one degree or another. The best option would be to make the procedure
> call and web service call in tandem from the application or a DTS package.
> "Martin Waller" <martinwaller@.beeb.net> wrote in message
> news:eDWb629MGHA.1716@.TK2MSFTNGP10.phx.gbl...
>|||i recommend you use a sql statement to call a dts, (plenty of examples how t
o
do this). Let the dts call the web service and log whatever it needs to log
Does anyone know if it is possible to call a web service from a stored
procedure? Failing that is it possible to use exterbal object? I'm thinking
along the lines of:
@.obj = CreateObject("xyzzy.f")
@.obj.j = 1
call @.obj
Is this wishful thinking ?
Many thanks...
MartinI'm certain there are multiple methods of doing exactly what you ask, and
each method will impact the performance and reliability of your database to
one degree or another. The best option would be to make the procedure call
and web service call in tandem from the application or a DTS package.
"Martin Waller" <martinwaller@.beeb.net> wrote in message
news:eDWb629MGHA.1716@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Does anyone know if it is possible to call a web service from a stored
> procedure? Failing that is it possible to use exterbal object? I'm
> thinking along the lines of:
> @.obj = CreateObject("xyzzy.f")
> @.obj.j = 1
> call @.obj
> Is this wishful thinking ?
> Many thanks...
> Martin
>|||Thanks for the reply. Performance is not an issue for me. I need to unit
test some web services that directly effect database tables and I was
thinking of a simple .SQL file that does something like:
set-up precondition
call web service
test data is in the expected state
exit
Then I could log the output to a file and, once happy, use it to compare
against in further tests as and when the web serices are tested.
Martin
"JT" <someone@.microsoft.com> wrote in message
news:O$O3O$9MGHA.3932@.TK2MSFTNGP09.phx.gbl...
> I'm certain there are multiple methods of doing exactly what you ask, and
> each method will impact the performance and reliability of your database
> to one degree or another. The best option would be to make the procedure
> call and web service call in tandem from the application or a DTS package.
> "Martin Waller" <martinwaller@.beeb.net> wrote in message
> news:eDWb629MGHA.1716@.TK2MSFTNGP10.phx.gbl...
>|||i recommend you use a sql statement to call a dts, (plenty of examples how t
o
do this). Let the dts call the web service and log whatever it needs to log
Subscribe to:
Posts (Atom)