none
erro ao gerar xml document RRS feed

  • Pergunta

  • Olá, estou tentando comunicar com um Webservice e obtive a mensagem de erro:

    "There was an error generating the XML document"

    alguém sabe o que pode ter gerado esse erro atraves dos detalhes abaixo?

    System.InvalidOperationException was unhandled
      Message="There was an error generating the XML document."
      Source="System.Xml"
      StackTrace:
           at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
           at System.Web.Services.Protocols.SoapHeaderHandling.WriteHeaders(XmlWriter writer, XmlSerializer serializer, SoapHeaderCollection headers, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean isEncoded, String defaultNS, Boolean serviceDefaultIsEncoded, String envelopeNS)
           at System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage message)
           at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
           at NFeStatusServico.NfeStatusServico2.nfeStatusServicoNF2(XmlNode nfeDadosMsg) in D:\mstidotnova\Web References\NFeStatusServico\Reference.vb:line 93
           at MSTIDOT.Sefaz.NFE.ConsStatServ(XmlDocument XML, String URLWebService, X509Certificate2 Certificate) in D:\mstidotnova\Sefaz\NFE.vb:line 643
           at MSTIDOT.Sefaz.NFE.CONSULTASTATUSSERVICO(String cUF) in D:\mstidotnova\Sefaz\NFE.vb:line 699
           at Form1.Button1_Click(Object sender, EventArgs e) in D:\mstidotnova\Form1.vb:line 10
           at System.Windows.Forms.Control.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ButtonBase.WndProc(Message& m)
           at System.Windows.Forms.Button.WndProc(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.Run(Form mainForm)
           at Form1.Main() in D:\mstidotnova\Form1.Designer.vb:line 2
           at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()

    sexta-feira, 23 de julho de 2010 18:40

Respostas

  • Olá, estou tentando comunicar com um Webservice e obtive a mensagem de erro:

    "There was an error generating the XML document"

    alguém sabe o que pode ter gerado esse erro atraves dos detalhes abaixo?

    System.InvalidOperationException was unhandled
      Message="There was an error generating the XML document."
      Source="System.Xml"
      StackTrace:
           at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
           at System.Web.Services.Protocols.SoapHeaderHandling.WriteHeaders(XmlWriter writer, XmlSerializer serializer, SoapHeaderCollection headers, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean isEncoded, String defaultNS, Boolean serviceDefaultIsEncoded, String envelopeNS)
           at System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage message)
           at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
           at NFeStatusServico.NfeStatusServico2.nfeStatusServicoNF2(XmlNode nfeDadosMsg) in D:\mstidotnova\Web References\NFeStatusServico\Reference.vb:line 93
           at MSTIDOT.Sefaz.NFE.ConsStatServ(XmlDocument XML, String URLWebService, X509Certificate2 Certificate) in D:\mstidotnova\Sefaz\NFE.vb:line 643
           at MSTIDOT.Sefaz.NFE.CONSULTASTATUSSERVICO(String cUF) in D:\mstidotnova\Sefaz\NFE.vb:line 699
           at Form1.Button1_Click(Object sender, EventArgs e) in D:\mstidotnova\Form1.vb:line 10
           at System.Windows.Forms.Control.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ButtonBase.WndProc(Message& m)
           at System.Windows.Forms.Button.WndProc(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.Run(Form mainForm)
           at Form1.Main() in D:\mstidotnova\Form1.Designer.vb:line 2
           at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()


    http://msdn.microsoft.com/en-us/library/aa302290.aspx
    Just Be Humble Malange!
    sexta-feira, 23 de julho de 2010 20:30
    Moderador