<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Well…..as it turned out, this was an INCREADIBLY simple fix !<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I forgot to set the Request.ContentType to being text/xml </span><span
style='font-size:11.0pt;font-family:Wingdings;color:#1F497D'>J</span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I spotted it when I was Googling something else and knew
straight away what I hadn’t done……hangs head in shame ;-)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> delphi-bounces@listserver.123.net.nz
[mailto:delphi-bounces@listserver.123.net.nz] <b>On Behalf Of </b>Jolyon Smith<br>
<b>Sent:</b> Friday, 5 October 2012 09:47<br>
<b>To:</b> NZ Borland Developers Group - Delphi List<br>
<b>Subject:</b> Re: [DUG] Can anyone explain this one?<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>OK, then I suppose another possibility is that whatever is
getting the text representation of your xml document to include in your request
content is doing it by grabbing the root node of the document "as
text/string" rather than the complete xml document. In pseudo code:<o:p></o:p></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
httpRequest.Content.AsString := xmldoc.RootNode.AsString;<br>
<br>
vs<br>
<br>
httpRequest.Content.AsString := xmldoc.AsString;<o:p></o:p></p>
</div>
<div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'>i.e. It may not be your HTTP
code or whatever components you are using per se (it is highly unlikely that
the HTTP component is deliberately and selectively checking for xml content and
then doing a surgical strike to cleanly remove the prolog from that xml), but
rather the code that assembles the request to send via that HTTP component is
not getting the xml in quite the correct fashion, despite the actual source xml
"dom" itself being correct and complete.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>I hope that makes sense. :)<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal>On 5 October 2012 09:39, Jeremy Coulter <<a
href="mailto:jscoulter@gmail.com" target="_blank">jscoulter@gmail.com</a>>
wrote:<o:p></o:p></p>
<p class=MsoNormal>Yip, its definitly there. I build the XML up, and I am
checking it before it leaves so I know that at the point of calling the
"Post" its definitly there.<o:p></o:p></p>
<div>
<p class=MsoNormal>the one thing I havent done is run up wireshark.....this
will tell me if its leaving my machine in tact I guess.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'>Jeremy<o:p></o:p></p>
<div>
<div>
<div>
<p class=MsoNormal>On Fri, Oct 5, 2012 at 8:41 AM, Jolyon Smith <<a
href="mailto:jsmith@deltics.co.nz" target="_blank">jsmith@deltics.co.nz</a>>
wrote:<o:p></o:p></p>
</div>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>
<div>
<div>
<p class=MsoNormal>If adding an "extra" prolog fixes it then I would
ask if the prolog is really there in the original xml to start with ?<br>
<br>
Some XML viewers will add a default prolog when viewing xml that doesn't
contain any prolog. When viewing this xml in IE for example:<o:p></o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal><root><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <child /><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal></root><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>What IE actually shows is:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal><?xml version="1.0"?><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>-<root><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <child/><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> </root><o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>I am sure I have seen similar behaviour in other xml
viewers. I find this an increasingly prevalent problem, with computer
software trying to be too "helpful"; especially irksome in data
viewers that introduce artefacts in the data being viewed that aren't actually
present.<o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
<p class=MsoNormal>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz" target="_blank">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a
href="mailto:delphi-request@listserver.123.net.nz" target="_blank">delphi-request@listserver.123.net.nz</a>
with Subject: unsubscribe<o:p></o:p></p>
</blockquote>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<p class=MsoNormal><br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a
href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a>
with Subject: unsubscribe<o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</body>
</html>