System.InvalidOperationException: There was an error reflecting type Android App

BrunoGomes_PT

Power Member
Boas,

estou a desenvolver uma APP através do Xamarin Cross Platform e ao executar em Windows funciona perfeitamente mas em Android obtenho o erro "System.InvalidOperationException: There was an error reflecting type". A app liga a uns webservices e é no momento que vou fazer download de uma datatable que o erro é despoletado (wsProducao.GetSeccoes):

C#:
void CarregaSeccoes()
    {

        List<SeccaoCentro> Seccoes = new List<SeccaoCentro>();

        [B]var a = wsProducao.GetSeccoes(Application.Current.Properties["TipoPlataforma"] as string, Application.Current.Properties["Empresa"] as string, Application.Current.Properties["Utilizador"] as string, Application.Current.Properties["Password"] as string);[/B]

        if (a.Any1.HasChildNodes != false)
        {
            XmlDocument xml = new XmlDocument();
            xml.LoadXml(a.Any1.InnerXml);

            XmlNodeList xNodeList = xml.SelectNodes("/DocumentElement /Seccoes");
            foreach (XmlNode xNode in xNodeList)
            {

                Seccoes.Add(new SeccaoCentro()
                {

                    IDSeccao = Convert.ToInt32(xNode["IDSeccao"].InnerText),
                    Seccao = xNode["Seccao"].InnerText,
                    Descricao = xNode["Seccao"].InnerText.ToUpper() +  " - " + xNode["Descricao"].InnerText.ToUpper()

                });

            }

            cvSeccoes.ItemsSource = Seccoes;

        }

        else
        {
            cvSeccoes.ItemsSource = null;
        }
    }

Conseguem-me ajudar? Obrigado :)
 
Back
Topo