Service departure parsing

Good afternoon,

I am having a problem parsing a soap service output, i am trying to apply

a! fromJson (
xmltojson (
local!result
)
)

Until applying the xmltojson I have the data that does it to me:

But when I apply the a! FromToJson the value is no longer mapped

I have tried to do this since I really need to map not only this data but all that the service returns to me it would return:

a!fromJson(
xmltojson(
substitute(local!a.body,"<NIF>","<NIF>@")
)
)

Although then I would have to delete that @

Do you know if it could be done in a cleaner way?

A greeting and thanks in advance.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Good morning Peter,

    I need to map the address part.

    This is the CDT:

    The code and the output:

    XML:

    "<?xml version="1.0" encoding="UTF-8"?>

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../" xmlns:SOAP-ENC="">schemas.xmlsoap.org/.../" xmlns:xsd="">www.w3.org/.../XMLSchema" xmlns:xsi="">www.w3.org/.../XMLSchema-instance">
       <SOAP-ENV:Body>
          <Prueba_General.PruebaConsultaResponse xmlns="pru15052019">
             <persona>
                <numeroDocumento>1</numeroDocumento>
                <nombre>Juan</nombre>
             </persona>
             <datosDomicilio>
                <Domicilio.DomicilioItem xmlns="pra15052019">
                   <Calle>calle1</Calle>
                   <Numero>3</Numero>
                   <Pais>1111</Pais>
                   <PaisDescripcion>FRANCIA</PaisDescripcion>
                   <NIF>111111111111</NIF>
                   <apellido>GOMEZ</apellido>
                   <nombre>JUAN</nombre>
                </Domicilio.DomicilioItem>
                <Domicilio.DomicilioItem xmlns="pra15052019">
                   <Calle>calle2</Calle>
                   <Numero>2</Numero>
                   <Pais>1222</Pais>
                   <PaisDescripcion>ESPAÑA</PaisDescripcion>
                   <NIF>222222222222</NIF>
                   <apellido>SAEZ</apellido>
                   <nombre>PEPE</nombre>
                </Domicilio.DomicilioItem>
             </datosDomicilio>
             <Error>0</Error>
          </Prueba_General.PruebaConsultaResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>"
    

    A greeting and thanks in advance.