HTTP Request.
We have written a small asp page to accept an HTTP request, pass the request onto an Oracle database for processing and then return the results.
This works find when we call it using HTTP/1.0 but if we use HTTP/1.1 or above it doesn't work.
Here's the code.
<%@ LANGUAGE=JSCRIPT%>
<%
var strSQL;
var strRequest;
var dbConnection, strConnect;
strConnect = Application("ecentre_ConnStr");
dbConnection = Server.CreateObject("ADODB.Connection");
dbConnection.Open(strConnect);
var doc = new ActiveXObject("msxml2.DOMDocument.3.0");
doc.async = false;
doc.resolveExternals = false;
doc.validateOnParse = false;
// Load an XML file into the DOM instance.
doc.load(Request);
strSQL = "SELECT '<TEST>"+ doc.xml +"</TEST>' as out_xml FROM dual";
rspers = Server.CreateObject("ADODB.Recordset");
rspers.Open(strSQL, dbConnection, adOpenStatic, adLockOptimistic);
if (!rspers.EOF) {
var vout_xml = rspers("out_xml");
}
Response.ContentType="text/xml"
Response.Write(vout_xml);
%>
From what we can work out using anything other than HTTP/1.0 results in a NULL being passed into the Oracle script, so I assume its the doc.load(Request); line thats not doing what it should. As I say with HTTP/1.0 it's fine.
Were an Oracle shop so have little experince with ASP so any advice would be really appreciated.
Thanks in advance
Andrew.
|