Ver Mensaje Individual
  #2119  
Antiguo 07-07-2017
dgcapel dgcapel is offline
Registrado
NULL
 
Registrado: may 2017
Posts: 4
Reputación: 0
dgcapel Va por buen camino
Cita:
Empezado por jcapilla Ver Mensaje
Si cambias en el xml de respuesta RespuestaLRFacturasRecibidas por RespuestaLRFRecibidasType y quitas los tags de env: debe funcionar.
Hola jcapilla, tal como me informaste, he tratado de limpiar el XML quitando las etiquetas ENV, sii y siiR.
Me devuelve el fichero de vuelta RespuestaLRFEmitidasType ... VACIO. Ya es algo, no me falla la deserialización.

Por ejemplo:
Código Delphi [-]
            String text = File.ReadAllText(xmlReponseUri);
            String limpio = text.Replace("siiR:", String.Empty).Replace("sii:", String.Empty);
            limpio = limpio.Replace("RespuestaLRFacturasEmitidas", "RespuestaLRFEmitidasType");
            limpio = limpio.Replace("//schemas.xmlsoap.org/soap/envelope/\">", String.Empty).Replace("", String.Empty);
            limpio = limpio.Replace("", String.Empty);
            limpio = limpio.Replace("", String.Empty).Replace("",String.Empty);
            //respuesta = respuesta.Replace("xmlns:siiR=\"//www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/ssii/fact/ws/RespuestaSuministro.xsd\"", String.Empty);
            //respuesta = respuesta.Replace("xmlns:sii=\"//www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/ssii/fact/ws/SuministroInformacion.xsd\"", String.Empty);
            Console.WriteLine(limpio);

            // File : Open
            XmlSerializer serializer = new XmlSerializer(typeof(RespuestaLRFEmitidasType));

            RespuestaLRFEmitidasType facturaEmitida;
            using (XmlReader reader = XmlReader.Create(new StringReader(limpio)))
            {
                // Deserialize
                facturaEmitida = (RespuestaLRFEmitidasType)serializer.Deserialize(reader);
            }

Para más información, generé los ficheros WDSL mediante el wsdl.exe para todas siiServices. Luego he visto que los XSD me subreescriben las estructuras de datos, por lo que no los he añadido.
He visto que también mucha gente toca el App.config, para temas de los END POINT, pero yo no le he visto el fuste.
¿Se me escapa algo?

Muchas gracias
Responder Con Cita