W3C home > Mailing lists > Public > www-validator@w3.org > July 2007

web service API returning HTML rather than SOAP 1.2

From: Lori Hylan-Cho <lorihc@adobe.com>
Date: Mon, 9 Jul 2007 10:08:03 -0700
Message-ID: <30B7B14B6B558243AA3D7CD7F98D5E7B018C85C4@namail2.corp.adobe.com>
To: <www-validator@w3.org>

hello

I am experimenting with the validator's web service API, and I've
noticed that while I can get a SOAP 1.2 reply for HTML fragments, if I
validate by URI I always get an HTML reply.

I'm doing an HTTP post from JavaScript. The function I'm using takes two
arguments: the URL of the server, and the text to post. For example:

var docContents = document.documentElement.outerHTML; /* gets entire
document source, including !DOCTYPE statement */
var result = httpPostText("http://validator.w3.org/check", "fragment=" +
encodeURIComponent(docContents) +"&output=soap12");

In the above case, I get a SOAP reply. However, if I substitute a URL
instead of raw HTML, as shown below...

var docContents = "http://www.avocado8.com/index.shtml";
var result = httpPostText("http://validator.w3.org/check", "uri=" +
encodeURIComponent(docContents) +"&output=soap12");

I always get an HTML reply. I've tried encoding the & in front of the
output argument, but the results are the same. Is there something else I
should be doing? Have I misunderstood something major?

Thanks in advance for any assistance.

best,
Lori
Received on Monday, 9 July 2007 20:31:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:25 GMT