There was an error reflecting type 'Bpe.Wdo.Process.Package'


Can anyone tell me what this is all about and why does it happends
The code that throws this is:

XmlSerializer serializer = new XmlSerializer(typeof(Package));

and the stack trace:

at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel)
at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel model, XmlRootAttribute root, String defaultNamespace)
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
at Bpe.Wcc.GlobalData.DataHelper.GetAllFactories() in D:\SourceCtrl\Workflow Control Center\GlobalData\DataHelper.cs:line 417

Something more to add - inner exception: {"There was an error reflecting property 'WorkflowProcesses'."}

the property inside Package class is straightforward:
public WorkflowProcess[] WorkflowProcesses
        {
            get
            {
                return this.workflowProcessesField;
            }
            set
            {
                this.workflowProcessesField = value;
            }
        }

and the WorkflowProcess class is decorated with the following attributes:
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.wfmc.org/2004/XPDL2.0alpha")]
    [System.Xml.Serialization.XmlRootAttribute(ElementName="WorkflowProcess", Namespace = "http://www.wfmc.org/2004/XPDL2.0alpha", IsNullable = false)]

The classes above have been generated using xsd.exe !
Hope someone here can give me a hand !



Answer this question

There was an error reflecting type 'Bpe.Wdo.Process.Package'

  • Eric Wellnitz

    Me again - got it:
    Inside the WorkflowProcess there's another member item that was generated by a choice tag in the original XSD that was overriding a specific propery of the same type !

  • There was an error reflecting type 'Bpe.Wdo.Process.Package'