Using XmlSerializer deserialize complex type elements are null?

Well, I think you might just be ignoring the XML namespace and that might be your problem. In your XSD, you define a default XML namespace.

Well, I think you might just be ignoring the XML namespace and that might be your problem. In your XSD, you define a default XML namespace: See the xmlns="ginfes.com.br/servico_consultar_situacao... attribute? That defines a default XML namespace.So when you go to deserialize your data, you should also supply that default XML namespace to the deserializer: XmlSerializer respSerializer = new XmlSerializer(typeof(ConsultarSituacaoLoteRpsResposta), "ginfes.com.br/servico_consultar_situacao...); StringReader reader = new StringReader(resp); ConsultarSituacaoLoteRpsResposta respModel = (ConsultarSituacaoLoteRpsResposta)respSerializer.

Deserialize(reader); Does that work with the inclusion of the XML default namespace?

I have dominion over the schema, the XML only receive and process, I will try to remove the namespaces to see if it works. Thanks – Jean Dec 28 '10 at 13:25 ok, works without namespace in class, tks – Jean Jan 26 at 18:53.

ConsultarSituacaoLoteRpsResposta! = ConsultarSituacaoLoteRpsEnvio You could have used easier names, it was hard to spot :) You should also use XML validation (XmlReaderSettings supports setting it up) to instantly identify the problems. And at least make sure that the code was generated from the XSD directly, because there are mismatches here.

– marc_s Dec 27 '10 at 18:20 1 Hmm, you might be right. Anyway, it's a complete mess because he posted the schema for something else. – fejesjoco Dec 27 '10 at 18:23.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions