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
  • Is there a reason you are casting to JSON and then from JSON to a dictionary? There is a function called torecord() that casts directly from XML to a Custom Data Type that is better because it eliminates a step and provides the type you are casting to.

    The other thing to look at - that number is too large for an integer in Appian. The max length of an integer is 2^32 - 1, which is only 11 digits. If you want to get that value, you must cast to text (which again the torecord() function will help with because you can specify the CDT fields to use).

  • What the service returns is a string (xml format) and inside there are several structures including a list which is the one that I have to map. I have created a cdt that has the fields of the list to map I have put it in the rule as input that list but it does not map anything.

    A greeting and thanks in advance.

Reply Children