Home All Groups Group Topic Archive Search About

Calling webservice from CLR Stored Procedure

Author
20 Jan 2006 11:01 AM
.LP
I would like to be able to call an webservice from a SP, I'm able to add a
webreference to the webservice in the database project, but how to call it in
code, and how to set up the code access illudes me?

any suggestions?

..LP

Author
20 Jan 2006 11:51 AM
Tony Rogerson
Hi LP,

What version of SQL Server are you using?

In SQL Server 2005 you can write a CLR to consume the webservice, check out
my article and samples here: http://sqlserverfaq.com?eid=58 there are
samples and even a blogcast of me showing exactly how to do it.

Tony.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


Show quote
".LP" <.**@discussions.microsoft.com> wrote in message
news:3DF46544-C919-4C90-B101-2CC906A248E8@microsoft.com...
>I would like to be able to call an webservice from a SP, I'm able to add a
> webreference to the webservice in the database project, but how to call it
> in
> code, and how to set up the code access illudes me?
>
> any suggestions?
>
> .LP
Author
20 Jan 2006 12:58 PM
.LP
I am using Sql Server 2005, but want to call an extarnal webservice (asmx)
from the clr-code Sp.

The purpose beeing; to send an notification from the database, from an
trigger with the ID of the Inserted/updated record

and the code I'm looking for is to call an webservice, not just consume xml.

..LP

Show quote
"Tony Rogerson" wrote:

> Hi LP,
>
> What version of SQL Server are you using?
>
> In SQL Server 2005 you can write a CLR to consume the webservice, check out
> my article and samples here: http://sqlserverfaq.com?eid=58 there are
> samples and even a blogcast of me showing exactly how to do it.
>
> Tony.
>
> --
> Tony Rogerson
> SQL Server MVP
> http://sqlserverfaq.com - free video tutorials
>
>
> ".LP" <.**@discussions.microsoft.com> wrote in message
> news:3DF46544-C919-4C90-B101-2CC906A248E8@microsoft.com...
> >I would like to be able to call an webservice from a SP, I'm able to add a
> > webreference to the webservice in the database project, but how to call it
> > in
> > code, and how to set up the code access illudes me?
> >
> > any suggestions?
> >
> > .LP
>
>
>
Author
20 Jan 2006 1:16 PM
Tony Rogerson
The code samples does call a webservice - the msn search webservice for one.

Basically, you need to use CLR to encapsulate the web service call.

Tony
--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


Show quote
".LP" <L*@discussions.microsoft.com> wrote in message
news:8FAC07F5-81CE-468F-B1BC-DE91C9F8BDF8@microsoft.com...
>I am using Sql Server 2005, but want to call an extarnal webservice (asmx)
> from the clr-code Sp.
>
> The purpose beeing; to send an notification from the database, from an
> trigger with the ID of the Inserted/updated record
>
> and the code I'm looking for is to call an webservice, not just consume
> xml.
>
> .LP
>
> "Tony Rogerson" wrote:
>
>> Hi LP,
>>
>> What version of SQL Server are you using?
>>
>> In SQL Server 2005 you can write a CLR to consume the webservice, check
>> out
>> my article and samples here: http://sqlserverfaq.com?eid=58 there are
>> samples and even a blogcast of me showing exactly how to do it.
>>
>> Tony.
>>
>> --
>> Tony Rogerson
>> SQL Server MVP
>> http://sqlserverfaq.com - free video tutorials
>>
>>
>> ".LP" <.**@discussions.microsoft.com> wrote in message
>> news:3DF46544-C919-4C90-B101-2CC906A248E8@microsoft.com...
>> >I would like to be able to call an webservice from a SP, I'm able to add
>> >a
>> > webreference to the webservice in the database project, but how to call
>> > it
>> > in
>> > code, and how to set up the code access illudes me?
>> >
>> > any suggestions?
>> >
>> > .LP
>>
>>
>>

AddThis Social Bookmark Button