Professional Web Applications Themes

HTTP access *FROM* SQL sp - Microsoft SQL / MS SQL Server

Hi, I have a remote Web server from which I want to retrieve data - from inside a SQL 2K stored procedure. I can do it with: sp_OACreate 'MSXML2.ServerXMLHTTP', objHTTP OUTPUT sp_OAMethod objHTTP, 'open', NULL, 'GET', URL sp_OAMethod objHTTP, 'send', NULL etc. However, I'm not sure how safe this is - for example in KB 303114, MS explicitly discourages this... Any idea how to do this safely? Thanks, Oded Rotem...

  1. #1

    Default HTTP access *FROM* SQL sp

    Hi,

    I have a remote Web server from which I want to retrieve
    data - from inside a SQL 2K stored procedure. I can do it
    with:

    sp_OACreate 'MSXML2.ServerXMLHTTP', objHTTP OUTPUT
    sp_OAMethod objHTTP, 'open', NULL, 'GET', URL
    sp_OAMethod objHTTP, 'send', NULL

    etc.

    However, I'm not sure how safe this is - for example in KB
    303114, MS explicitly discourages this...

    Any idea how to do this safely?

    Thanks,
    Oded Rotem

    Oded Rotem Guest

  2. #2

    Default Re: HTTP access *FROM* SQL sp


    "Oded Rotem" <odedrandom-logic.com> wrote in message
    news:086b01c3479f$92ee78a0$a501280aphx.gbl...
    > Hi,
    >
    > I have a remote Web server from which I want to retrieve
    > data - from inside a SQL 2K stored procedure. I can do it
    > with:
    >
    > sp_OACreate 'MSXML2.ServerXMLHTTP', objHTTP OUTPUT
    > sp_OAMethod objHTTP, 'open', NULL, 'GET', URL
    > sp_OAMethod objHTTP, 'send', NULL
    >
    > etc.
    >
    > However, I'm not sure how safe this is - for example in KB
    > 303114, MS explicitly discourages this...
    >
    303114 discourages using the XML functionality (DOM, SAX, XSLT) that is also
    shipped in the MSXML2 component.

    MSXML2.ServerXMLHTTP is a standalone HTTP library, and is really only in the
    MSXML2 component for convenience. Because people who use XML often use HTTP
    too.

    MSXML2.ServerXMLHTTP was added to the component because MSXML2.XMLHTTP is
    _not_ safe to run from servers. People needed a server-side HTTP library,
    and so MS added MSXML2.ServerXMLHTTP in v3 of the XML pr.

    It is designed to be used from server applications, it has been in wide use
    (ASP mostly), for a couple of years, and I would consider it a "safe"
    component.

    David


    David Browne Guest

Similar Threads

  1. The Request Failed with HTTP Status 401: Access Denied
    By James in forum ASP.NET Web Services
    Replies: 3
    Last Post: March 22nd, 10:28 PM
  2. How do I access HTTP Request Object Header variables?
    By joslateriii in forum Macromedia Flex General Discussion
    Replies: 4
    Last Post: September 25th, 08:46 PM
  3. Http Request and Session Object Access
    By Pradeep_ch in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: May 5th, 01:33 PM
  4. The request failed with HTTP status 403: Access Forbidden
    By Baohua Li in forum ASP.NET Web Services
    Replies: 0
    Last Post: February 6th, 07:05 PM
  5. http-access-2_0_1
    By Ernie in forum Ruby
    Replies: 0
    Last Post: October 13th, 06:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139