J
Joe Monnin
I can find very little mention of this problem anywhere on the Internet and
am wondering if it is a known bug in .net 1.1. Is there a workaround?
I have a web service that has a paramater of type System.Xml.XmlDocument. I
pass to it an XML document that has the following content (I've escaped all
characters so you can get an exact copy of my file. Adding/removing anything
- even white-space - stops the error from occuring):
"<module id=\"x1482\"
xmlns=\"\">\r\n<step>\r\n<title>xxxxxxxxx</title>\r\n<warning>\r\n<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>\r\n<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>\r\n<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>\r\n<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>\r\n<para>The xxxxxxxxxx serial number code is on the
xxxxxxxxx. The serial number code is also stamped on the xxxxxxxxxx
xxxx.</para>\r\n<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?>\r\n<figure id=\"x1482.632434613431144957\"
style=\"column\">\r\n<figtitle>xxxxxxxxx and Labels</figtitle>\r\n<graphic
boardno=\"HO190385\" effectivity=\"f187\" resolution=\"600\"
/>\r\n<figinfo>\r\n<a-legend>\r\n<legend-item>xxxxxxxxx</legend-item>\r\n<legend-item>Notice
Label</legend-item>\r\n<legend-item>Incomplete
Label</legend-item>\r\n</a-legend>\r\n</figinfo>\r\n</figure>\r\n</step>\r\n</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.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.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(EventArgs e)
at Infragistics.Win.Misc.UltraButton.OnMouseUp(MouseEventArgs 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(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Has anybody else seen this? Is there a workaround short of converting the
XML to a string and passing the string instead of the XmlDocument itself?
am wondering if it is a known bug in .net 1.1. Is there a workaround?
I have a web service that has a paramater of type System.Xml.XmlDocument. I
pass to it an XML document that has the following content (I've escaped all
characters so you can get an exact copy of my file. Adding/removing anything
- even white-space - stops the error from occuring):
"<module id=\"x1482\"
xmlns=\"\">\r\n<step>\r\n<title>xxxxxxxxx</title>\r\n<warning>\r\n<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>\r\n<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>\r\n<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>\r\n<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>\r\n<para>The xxxxxxxxxx serial number code is on the
xxxxxxxxx. The serial number code is also stamped on the xxxxxxxxxx
xxxx.</para>\r\n<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?>\r\n<figure id=\"x1482.632434613431144957\"
style=\"column\">\r\n<figtitle>xxxxxxxxx and Labels</figtitle>\r\n<graphic
boardno=\"HO190385\" effectivity=\"f187\" resolution=\"600\"
/>\r\n<figinfo>\r\n<a-legend>\r\n<legend-item>xxxxxxxxx</legend-item>\r\n<legend-item>Notice
Label</legend-item>\r\n<legend-item>Incomplete
Label</legend-item>\r\n</a-legend>\r\n</figinfo>\r\n</figure>\r\n</step>\r\n</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.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.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(EventArgs e)
at Infragistics.Win.Misc.UltraButton.OnMouseUp(MouseEventArgs 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(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Has anybody else seen this? Is there a workaround short of converting the
XML to a string and passing the string instead of the XmlDocument itself?