<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'content not allowed in prolog exception' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'content not allowed in prolog exception' posted on the 'WEB-Services / SOAP' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Thu, 20 Jun 2013 04:53:50 -0700</pubDate>
    <lastBuildDate>Thu, 20 Jun 2013 04:53:50 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>content not allowed in prolog exception</title>
      <link>http://www.programmersheaven.com/mb/web-services/387485/387485/content-not-allowed-in-prolog-exception/</link>
      <description>I am trying to send xml to a java-based web service given to me by a thrid party via a c#.NET application, and I get the "org.xml.sax.SAXParseException: Content is not allowed in prolog" error. &lt;br /&gt;
&lt;br /&gt;
I have verified the xml against the schema, and I passed the memorystream I am using to hold the xml to an .xml file, then opened the file with a hex editor to make sure that there were no undesired characters in the prolog, and there are none. When opened, the first characters in the file are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class I was given to use to send the xml data to the web service accepts a byte array. I figure that creating the xml using an XmlTextWriter to a utf-8 encoded memorystream, then sending the contents of the stream to a byte array is the most direct method.&lt;br /&gt;
&lt;br /&gt;
I have done a lot of research and tried all the possbilities around this issue that I could find, but nothing works. Could someone please help? Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
By the way, here is a portion of what the web service returns to me. In the payload of the SOAP message, should the data after the &amp;lt;submissionData&amp;gt; element look like that, or be readable xml like the content before it?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Messages:&lt;br /&gt;
Message:&lt;br /&gt;
&lt;br /&gt;
Payload: &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema&lt;br /&gt;
-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;&amp;lt;soap:Body&amp;gt;&amp;lt;postSubmissi&lt;br /&gt;
on xmlns="http://service.arm.hud.gov/"&amp;gt;&amp;lt;submissionHeader&amp;gt;&amp;lt;agcHcsId&amp;gt;1&amp;lt;/ag
cHcsId&amp;gt;&amp;lt;agcName&amp;gt;test&amp;lt;/agcName&amp;gt;&amp;lt;systemName&amp;gt;123&amp;lt;/sys
temName&amp;gt;&amp;lt;cmsSubId&amp;gt;123456&amp;lt;/cmsSubId&amp;gt;&amp;lt;subFlag&amp;gt;0&amp;lt;/sub
Flag&amp;gt;&amp;lt;/submissionHeader&amp;gt;&amp;lt;agcType&amp;gt;test&amp;lt;/agcType&amp;gt;&amp;lt;su
bmissionData&amp;gt;PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZ
z0idXRmLTgiPz48dG5zOlN1Ym1pc3Npb25EYXRhIHhzaTpzY2h
lbWFMb2NhdGlvbj0iaHR0cDovL2dvdi5odWQuYXJtL2FybV9kY
XRhYmFnXzNfMS54c2QiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy5
3My5vcmcvMjAwMS9YTUxT......etc....................
........&amp;lt;/submissionData&amp;gt;&amp;lt;/postSubmission&amp;gt;&amp;lt;/soap:B
ody&amp;gt;&amp;lt;/soap:Envelope&amp;gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/web-services/387485/387485/content-not-allowed-in-prolog-exception/</guid>
      <pubDate>Mon, 16 Mar 2009 17:22:02 -0700</pubDate>
      <category>WEB-Services / SOAP</category>
    </item>
    <item>
      <title>Re: content not allowed in prolog exception</title>
      <link>http://www.programmersheaven.com/mb/web-services/387485/395965/re-content-not-allowed-in-prolog-exception/#395965</link>
      <description>Have you found the solution to this issue?  I'm getting this error as well and judging by the XML you're using, sending to the same server as you are.  (ARM data for HUD).&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/web-services/387485/395965/re-content-not-allowed-in-prolog-exception/#395965</guid>
      <pubDate>Thu, 27 Aug 2009 14:07:58 -0700</pubDate>
      <category>WEB-Services / SOAP</category>
    </item>
    <item>
      <title>Re: content not allowed in prolog exception</title>
      <link>http://www.programmersheaven.com/mb/web-services/387485/421580/re-content-not-allowed-in-prolog-exception/#421580</link>
      <description>yes, i think we are trying to send the same data...i got it to work, but then they changed the schema on me and i created the project in vs 2008, so now i am getting that error again. did you have any luck?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/web-services/387485/421580/re-content-not-allowed-in-prolog-exception/#421580</guid>
      <pubDate>Mon, 07 Feb 2011 18:41:58 -0700</pubDate>
      <category>WEB-Services / SOAP</category>
    </item>
  </channel>
</rss>