Re: Assertion: SQL Server 2000 can't issue a SOAP call
From: Stefan Delmarco [MSFT] (StefanDe_at_online.microsoft.com)
Date: 03/23/04
- Next message: Billy Yao [MSFT]: "Re: SQL 2000 adOpenForwardOnly block"
- Previous message: Paul Ibison: "Re: Case Sensitive"
- In reply to: Stefan Delmarco [MSFT]: "Re: Assertion: SQL Server 2000 can't issue a SOAP call"
- Next in thread: Rob Hindman: "Re: Assertion: SQL Server 2000 can't issue a SOAP call"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 23 Mar 2004 10:01:45 -0000
<ShamelessPlug>With Yukon this will be a cake-walk as the CLR will be hosted
Cheers,
natively within SQL Server.
http://msdn.microsoft.com/library/default.asp?url=/msdnmag/issues/04/02/YukonBasics/toc.asp>
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Stefan Delmarco [MSFT]" <StefanDe@online.microsoft.com> wrote in message
news:OrKpbvLEEHA.3804@TK2MSFTNGP09.phx.gbl...
> Hi Rob, calling SOAP methods really belong in the application layer (in
the
> middle tier) and not in SQL Server (Stored Procedures or other). You can
do
> it but you really need to make sure you want to and understand the
> implications. The side effects you will probably see is increased
> contention, blocking and / or deadlocking as the most significant portion
of
> you transaction times will be the responsiveness of the web server hosting
> the SOAP endpoint.
>
> To call SOAP methods you'll need to write or use the existing
> MSSOAP.SoapClient30 (from the SOAP Toolkit:
>
http://www.microsoft.com/downloads/details.aspx?FamilyId=C943C0DD-CEEC-4088-9753-86F052EC8450&displaylang=en)
> COM component to perform the actual invocation. You'll then need to use
the
> sp_OA* family of system stored procedures to invoke this COM component.
> Note that you have to be a member of sysadmin to call sp_OA SPs. If you
> have the SOAP toolkit installed, you can do the following:
>
> DECLARE @object INT
> DECLARE @hr INT
> DECLARE @src VARCHAR(500)
> DECLARE @desc VARCHAR(500)
>
> EXEC @hr = sp_OACreate 'MSSOAP.SoapClient30', @object out, 5
> IF @hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT
> SELECT CONVERT(VARBINARY(4), @HR) AS "HR",
> @src AS "Source",
> @desc AS "Description"
> RETURN
> END
>
> DECLARE @bstrWSDLFile VARCHAR(100)
> SET @bstrWSDLFile = 'http://www.webservicex.com/StockQuote.asmx?WSDL'
> DECLARE @bstrServiceName VARCHAR(100)
> SET @bstrServiceName = 'StockQuote'
> DECLARE @bstrPort VARCHAR(100)
> SET @bstrPort = 'StockQuoteSoap'
>
> EXEC @hr = sp_OAMethod @object, 'mssoapinit', NULL, @bstrWSDLFile,
> @bstrServiceName, @bstrPort
> IF @hr <> 0
> BEGIN
> GOTO CLEANUP
> END
>
> DECLARE @StockQuote AS VARCHAR(4000)
>
> EXEC @hr = sp_OAMethod @object, 'GetQuote', @StockQuote OUTPUT, "MSFT"
> IF @hr <> 0
> BEGIN
> GOTO CLEANUP
> END
>
> SELECT @StockQuote AS "StockQuote"
> GOTO END_ROUTINE
>
> CLEANUP:
>
> IF @hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT
> SELECT CONVERT(VARBINARY(4), @HR) AS "HR",
> @src AS "Source",
> @desc AS "Description"
> END
>
> EXEC @hr = sp_OADestroy @object
> IF @hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT
> SELECT CONVERT(VARBINARY(4), @HR) AS "HR",
> @src AS "Source",
> @desc AS "Description"
> END
>
> END_ROUTINE:
> RETURN
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Rob Hindman" <robhindman@hotmail.com> wrote in message
> news:d4199cf5.0403222205.211db103@posting.google.com...
> > (I originally posted this on comp.databases.ms-sqlserver, but I have
> > been asked to re-post to this group... Thanks!)
> >
> > I really hope I'm wrong about this - I can't find any way to issue a
> > SOAP call from SQL Server 2000. I've looked at the BOL, Google, MSDN,
> > and the SQLXML documentation and samples...
> >
> > There is quite a bit of discussion about how to EXPOSE SQL Server 2000
> > as a SOAP service, or even exposing stored procedures as web service
> > calls.
> >
> > But I can find absolutely NO mention of calling a separate SOAP
> > service from SQL Server 2000, and therefore I would like to assert to
> > this group that it can't be done - with the hope of finding out with
> > certainty...
> >
> > For example, I have the following wsdl target:
> > http://mssoapinterop.org/stk/Interop.wsdl, and I would like to call
> > the Interop/SoapPort/echoString method. (It takes any string for the
> > inputString parameter, and just echoes it back.)
> >
> > I'd love to do this from a stored procedure, or from an extended
> > stored procedure, but I don't think that it can be done AT ALL - which
> > makes me curious - if SQL Server 2000 with SQLXML can expose
> > functionality as SOAP methods, surely it would be possible to issue a
> > SOAP call as well?
> >
> > Many Thanks to anyone who can confim this assertion or show it to be
> > false.
> > -Rob.
> >
> > PS - Also, I have called MSDN support, and I will let both groups know
> > if there is a solution or work-around.
> > -R.
>
>
Relevant Pages
|