Note that there are some explanatory texts on larger screens.

plurals
  1. POxmlserialization error
    text
    copied!<p><strong>I am trying to serialize an object (MCCI_IN000001TR01Message that is a class to use web service) using xml serialization, however when serializing it I am getting an error.</strong> </p> <pre><code>MCCI_IN000001TR01Message message = new MCCI_IN000001TR01Message() { id = new MCCI_IN000001TR01MessageID() { root = "2.16.840.1.113883.3.129.2.1.2", extension = _sGuid }, acceptAckCode = new MCCI_IN000001TR01MessageAcceptAckCode() { code = "AL" }, receiver = f_Receiver(), sender = f_Sender(), controlActEvent = f_ControlActEvent(dialysis) }; MCCI_IN000002TR01Message donen = service.MCCI_AR000001TR_MCCI_IN000001TR(message); </code></pre> <p><code>MCCI_IN000001TR01Message</code> is a class is not created by me. It is web service class.</p> <blockquote> <p>The type System.String may not be used in this context. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p> </blockquote> <pre><code>Exception Details: System.InvalidOperationException: **The type System.String may not be used in this context.** [InvalidOperationException: The type System.String may not be used in this context.] Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write216_StrucDocText(String n, String ns, StrucDocText o, Boolean isNullable, Boolean needType) +1823 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write403_Item(String n, String ns, POCD_MT000027TR01SocialSecurityFollowNumberSection o, Boolean isNullable, Boolean needType) +1087 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write404_POCD_MT000027TR01Component45(String n, String ns, POCD_MT000027TR01Component45 o, Boolean isNullable, Boolean needType) +942 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write434_Item(String n, String ns, POCD_MT000027TR01ReceptionDataset o, Boolean isNullable, Boolean needType) +1192 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write435_POCD_MT000027TR01Component44(String n, String ns, POCD_MT000027TR01Component44 o, Boolean isNullable, Boolean needType) +942 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write436_Item(String n, String ns, POCD_MT000027TR01StructuredBody o, Boolean isNullable, Boolean needType) +1477 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write437_POCD_MT000027TR01Component1(String n, String ns, POCD_MT000027TR01Component1 o, Boolean isNullable, Boolean needType) +942 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write438_POCD_MT000027TR01Dialysis(String n, String ns, POCD_MT000027TR01Dialysis o, Boolean isNullable, Boolean needType) +1951 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write439_MCCI_IN000001TR01Subject(String n, String ns, MCCI_IN000001TR01Subject o, Boolean isNullable, Boolean needType) +781 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write440_Item(String n, String ns, MCCI_IN000001TR01ControlActEvent o, Boolean isNullable, Boolean needType) +878 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write441_MCCI_IN000001TR01Message(String n, String ns, MCCI_IN000001TR01Message o, Boolean isNullable, Boolean needType) +1627 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMCCI_IN000001TR01Message.Write442_MCCI_IN000001TR01(Object o) +144 [InvalidOperationException: There was an error generating the XML document.] waSaglikNetUygulamasi._Default.Page_Load(Object sender, EventArgs e) in C:\Users\duygu.akmaz\Desktop\FMC-Projeler\SaglikNet\trunk\Default.aspx.cs:255 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload