Question
· Jul 6, 2016

White Space between http header and text

I am writing a static SOAP response to simply test connectivity. The end users is getting an error "Message: The processing instruction target matching [xX][mM][lL] is not allowed.", which I believe is related to white space. if I observe the response, it looks like there are two blank lines between the header and the body, which I'm guessing is the white space problem. But I can't seem to get rid of it.

Any ideas?

Code:

<script language="Cache" method="OnPreHTTP" arguments="" returntype="%Boolean">
     Set %response.ContentType = "text/xml"
    Quit 1</script>
<?xml version="1.0" encoding="UTF-8" ?>

 

Result:

HTTP/1.1 200 OK
Date: Wed, 06 Jul 2016 19:54:27 GMT
Server: Apache/2.2.15 (CentOS)
SET-COOKIE:  httpOnly;
CACHE-CONTROL: no-cache
EXPIRES: Thu, 29 Oct 1998 17:04:19 GMT
PRAGMA: no-cache
SET-COOKIE: 
CONTENT-LENGTH: 509
Connection: close
Content-Type: text/xml; charset=utf-8


<?xml version="1.0" encoding="UTF-8" ?>

Discussion (3)0
Log in or sign up to continue