An unexpected end of file parsing P1 has occurred
Hi TechyV,
I need some advice on my code. I’m using .Net 1.1, I’m passing a parameter type System.Xml.XmlDocument on a web service. However, I’m getting “An unexpected end of file parsing P1 has occurred”.
I’ve already escaped the XML document, and I’ve also tried adding or removing white spaces and still the error persists. Is there a workaround for converting the XML to a string and passing the string instead of using XMLDocument.
Please help.
"<module id="x1482"
xmlns="">rn<step>rn<title>xxxxxxxxx</title>rn<warning>rn<para>DO
NOT add to or modify the xxxxxxxxxx. Any modification that affects the safe
operation of the xxxxx cannot be undertaken without the written authorization
of <phrase effectivity="H000">HHHHHH Company</phrase><phrase
effectivity="Y000">YYYY Corporation</phrase>.</para>rn<para>Any change to
the xxxxxxxxxx, the xxxxx or its xxxxxxxxx can change the xxxxxxx xxxxxxxx.
The xxxxxxxxxx must be rated as equipped and the xxxxxxxxx must show the new
xxxxxxxx xxxxxx.</para></warning>rn<para>The xxxxxxxx is specified in
kilograms (kg) and pounds (lb). The xxxxxxxx is the maximum xxxx that the
xxxxxxxxxx can handle for the xxxx xxxxxxxxx shown on the
xxxxxxxxx.</para>rn<para>The maximum xxxxxxxx for the xxxxxxxxxx, at full
xxxx xxxxxx, must be shown on the xxxxxxxxx. Special xxxxxxxxxx with the xxxx
xxxxxx reduced or with optional xxxx centers, may also be shown on the
xxxxxxxxx.</para>rn<para>The xxxxxxxxxx serial number code is on the
xxxxxxxxx. The serial number code is also stamped on the xxxxxxxxxx
xxxx.</para>rn<para>When a xxxxxxxxxx is shipped incomplete from the
factory, the xxxxxxxxx is covered by an INCOMPLETE label as shown in
<internalref refid="x1482.632434613431144957" />. If the equipment on the
xxxxx is changed, the xxxxxxxxx is covered by a NOTICE label as shown in
<internalref refid="x1482.632434613431144957" />. If your xxxxxxxxxx has
either of these labels, do not operate the xxxxxxxxxx. Contact your dealer
for <phrase effectivity="H000">HHHHHH</phrase><phrase
effectivity="Y000">YYYY</phrase> xxxxxxxxxxx to obtain a complete correct
xxxxxxxxx.</para><?Pub Caret?>rn<figure id="x1482.632434613431144957"
style="column">rn<figtitle>xxxxxxxxx and Labels</figtitle>rn<graphic
boardno="HO190385" effectivity="f187" resolution="600"
/>rn<figinfo>rn<a-legend>rn<legend-item>xxxxxxxxx</legend-item>rn<legend-item>Notice
Label</legend-item>rn<legend-item>Incomplete
Label</legend-item>rn</a-legend>rn</figinfo>rn</figure>rn</step>rn</module>"
When this XmlDocument object is passed to my web service, the following
exception is thrown:
System.Web.Services.Protocols.SoapException: Server was unable to read
request. –> There is an error in XML document (10, 560). –> An unexpected
end of file parsing PI has occurred. Line 23, position 54.
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at NMHGOpsWSModules.CheckIn(Int32 moduleID, XmlNode XML)
at NMHGOps.frmMain.CheckInXML(treeNode node)
at NMHGOps.frmMain.CheckInSelectedNode()
at NMHGOps.frmMain.btnCheckinXMLModules_Click(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at Infragistics.Win.Misc.UltraButtonBase.OnClick(Even tArgs e)
at Infragistics.Win.Misc.UltraButton.OnMouseUp(MouseE ventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)