Wednesday, March 7, 2012

Error with sqlxml and ServerXMLHTTP

After I installed windows 2003 sp1 in the server with iis the asp pages that
use the object "MSXML2.ServerXMLHTTP.3.0" and SQLXML 3.0 with sp1 started to
return errors:
ERROR: 400.100 Bad Request
HResult: 0x80004005
Source: Microsoft SQL isapi extension
Description: Query not specified
The code used is like this one:
<%@.language="VBScript"%>
<%
Response.Expires = 0
Response.CacheControl = "private"
Response.Buffer = True
dim objXMLDocument, vTabela
dim objSrvHTTP, sXml
dim vXMLTemplate
'this is the path of the virtual directory mangead by sqlxml 3.0
sXml = "http://s3iapps.tcontas.pt/gent"
vXMLTemplate = "<GENT xmlns:sql=""urn:schemas-microsoft-com:xml-sql""
sql:xsl=""forms/ResultadoPesqDel.xsl""><sql:query>exec usp_pesq_entidade
@.Colunas ='1010000100', @.Argumentos1 ='Design_Abrev like ''%cml%'' AND Estado
= ''A''',@.Argumentos2 ='',@.Argumentos3 ='', @.Descricao ='(sem descri??o)',
@.Funcionario =461, @.Gravar = 0,
@.vNomeTabela='0687972767815343'</sql:query></GENT>"
set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
set objXMLDocument = Server.CreateObject ("MSXML2.DOMDocument.3.0")
objXMLDocument.loadXML vXMLTemplate
objSrvHTTP.setTimeouts 0, 0, (15 * 1000000), (15 * 1000000)
objSrvHTTP.open "POST",sXml, false
objSrvHTTP.setRequestHeader "Content-Type", "application/xml"
objSrvHTTP.send objXMLDocument
Response.ContentType = "text/html"
Response.CharSet = "iso-8859-1"
Response.Write objSrvHTTP.responseText
%>
Any help is welcome,
thanks in advance
Joao Carlos
Which version of the OS did you upgrade from?
Also, you may want to check out SQLXML 3.0 SP3 - the latest and greatest
version of SQLXML 3.0 from
http://www.microsoft.com/downloads/d...displaylang=en
Thanks,
Adam Wiener [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"jcc" <jcc@.discussions.microsoft.com> wrote in message
news:DA9E6B50-EDE2-443B-9949-001CEE4C30F6@.microsoft.com...
> After I installed windows 2003 sp1 in the server with iis the asp pages
that
> use the object "MSXML2.ServerXMLHTTP.3.0" and SQLXML 3.0 with sp1 started
to
> return errors:
> ERROR: 400.100 Bad Request
> HResult: 0x80004005
> Source: Microsoft SQL isapi extension
> Description: Query not specified
>
> The code used is like this one:
> <%@.language="VBScript"%>
>
> <%
> Response.Expires = 0
> Response.CacheControl = "private"
> Response.Buffer = True
> dim objXMLDocument, vTabela
> dim objSrvHTTP, sXml
> dim vXMLTemplate
> 'this is the path of the virtual directory mangead by sqlxml 3.0
> sXml = "http://s3iapps.tcontas.pt/gent"
> vXMLTemplate = "<GENT xmlns:sql=""urn:schemas-microsoft-com:xml-sql""
> sql:xsl=""forms/ResultadoPesqDel.xsl""><sql:query>exec usp_pesq_entidade
> @.Colunas ='1010000100', @.Argumentos1 ='Design_Abrev like ''%cml%'' AND
Estado
> = ''A''',@.Argumentos2 ='',@.Argumentos3 ='', @.Descricao ='(sem descrio)',
> @.Funcionario =461, @.Gravar = 0,
> @.vNomeTabela='0687972767815343'</sql:query></GENT>"
> set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
> set objXMLDocument = Server.CreateObject ("MSXML2.DOMDocument.3.0")
> objXMLDocument.loadXML vXMLTemplate
> objSrvHTTP.setTimeouts 0, 0, (15 * 1000000), (15 * 1000000)
> objSrvHTTP.open "POST",sXml, false
> objSrvHTTP.setRequestHeader "Content-Type", "application/xml"
> objSrvHTTP.send objXMLDocument
> Response.ContentType = "text/html"
> Response.CharSet = "iso-8859-1"
> Response.Write objSrvHTTP.responseText
> %>
>
> Any help is welcome,
> thanks in advance
> Joao Carlos

No comments:

Post a Comment