June 8, 2009 at 9:15 pm
HI,
I am trying to invoke a web service in TSQL procedure, and I was trying to find the best option.
CLR Procedure or MSXML2.XMLHTTP
1. Which one is the best option?
2. Can anyone tell me advantages and disadvantages of two methods?
Thanks
June 9, 2009 at 2:40 am
Take a look at this article:
It was linked from last week's newsletter.
MSXML2.XMLHTTP, as far as I know, is not thread safe, so I would not recommend it.
Hope this helps.
Gianluca
-- Gianluca Sartori
June 9, 2009 at 7:09 am
MSXML2.XMLHTTP, as far as I know, is not thread safe, so I would not recommend it.
Thanks. Can you please explain this more and why? and how this problem solved in CLR procedure?
June 9, 2009 at 7:19 am
XMLHTTP, a COM-wrapper around the classing WinInet library is designed to be used on the client-side to send HTTP requests to the server. Whereas, ServerXMLHTTP was introduced in MSXML 3.0 to support server-safe HTTP access. ServerXMLHTTP is based on WinHTTP, a new HTTP protocol stack, designed to be used on the server-side to send HTTP requests.
This means that the XMLHTTP object is not coded to ensure it can handle multiple resquests at a time, because it relies on a non thread safe implementation of the TCP/IP stack. XMLHTTP is coded to be used in the browser to handle one request at time.
Regards
Gianluca
-- Gianluca Sartori
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply