package response import ( "encoding/xml" ) type SoapEnvelopeMensajeServicio struct { XMLName xml.Name `xml:"Envelope"` Body SoapBodyMensajeServicio `xml:"Body"` } type SoapBodyMensajeServicio struct { Response SincronizarResponseMensajeServicio `xml:"sincronizarListaMensajesServiciosResponse"` } type SincronizarResponseMensajeServicio struct { RespuestaLista RespuestaListaParametricasMensajeServicio `xml:"RespuestaListaParametricas"` } type RespuestaListaParametricasMensajeServicio struct { Transaccion bool `xml:"transaccion"` ListaCodigos []MensajeServicio `xml:"listaCodigos"` } type MensajeServicio struct { CodigoClasificador string `xml:"codigoClasificador" json:"codigo"` Descripcion string `xml:"descripcion" json:"descripcion"` } // Implementaciones para cada tipo de envelope func (e SoapEnvelopeMensajeServicio) IsTransactionSuccessful() bool { return e.Body.Response.RespuestaLista.Transaccion } func (e SoapEnvelopeMensajeServicio) GetData() []MensajeServicio { return e.Body.Response.RespuestaLista.ListaCodigos }