An unexpected end of file parsing P1 has occurred

Asked By 0 points N/A Posted on -
qa-featured

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)

SHARE
Answered By 0 points N/A #195040

An unexpected end of file parsing P1 has occurred

qa-featured

Hi,

I think it could be the problem of the internet.

You can save the xml data into disk and read it using xmlTextReader to see if it is the problem of the content.

If that is not the problem of xml data please check the firewall,proxy…all related to internet access.

Another solution is to use this application-Metering 6.1 Service Pack 2 (build 6.1.32).

Hope your problem will be solved.

Thanking you

Franke Mary

Login/Register to Answer

Related Questions