Web Connection
Issue with wwHTTPSQL
Gravatar is a globally recognized avatar based on your email address. Issue with wwHTTPSQL
  Stein Goering
  All
  Sep 5, 2017 @ 01:46pm

I've been using the following code to query one of our internal servers:

o = CREATEOBJECT('wwhttpsql')
o.cserverurl = [http://servername.com/wconnect/ace/httpsql.awp]
o.csqlcursor = [tResult]
lncount = o.execute([SELECT * FROM awhistory WHERE stamp >{]+ TRANSFORM(tlaststamp)+[} AND !(category = "License")])
This was working fine until recently when I started getting this error: Invalid XML input provided. But here's what shows in o.cRequestXML:
<wwhttpsql>
	<sql>SELECT * FROM awhistory WHERE  !(category = "License")</sql>
	<sqlcursor>tResult</sqlcursor>
	<transportmode>1</transportmode>
</wwhttpsql>
But that XML passes validation, plus it's the same input I was using before. I haven't changed the code on either end - except to recompile under WC 6.12.

Any idea what's going on here?

--stein

Gravatar is a globally recognized avatar based on your email address. re: Issue with wwHTTPSQL
  Rick Strahl
  Stein Goering
  Sep 5, 2017 @ 02:53pm

I would check to see if the XML is actually reaching the server and coming in properly. There could be something happen with IIS or something else going on that's causing the request to not get there as XML.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Issue with wwHTTPSQL
  Stein Goering
  Rick Strahl
  Sep 6, 2017 @ 08:46pm

Indeed. My server-side method calls Request.FormXML() to retrieve the XML - but it's returning an empty string.

As noted, all this code worked fine when I last tried it a few weeks ago. What would cause it to stop working?

--stein

Gravatar is a globally recognized avatar based on your email address. re: Issue with wwHTTPSQL
  Rick Strahl
  Stein Goering
  Sep 8, 2017 @ 02:53pm

I would try to trace the request and make sure the xml is even getting sent to the server. If fromxml() is returning nothing it means that nothing actually gets sent most likely.

Rick

© 1996-2017