<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Service departure parsing</title><link>https://community.appian.com/discussions/f/general/18827/service-departure-parsing</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Service departure parsing</title><link>https://community.appian.com/thread/74130?ContentTypeID=1</link><pubDate>Fri, 15 May 2020 12:39:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:03c112ac-94f1-4923-b43e-b5ae474067d5</guid><dc:creator>sandrap845</dc:creator><description>&lt;p&gt;Try what you tell me but it doesn&amp;#39;t work for me:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1589546242722v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Try this too and nothing&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1589546299121v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I keep testing.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service departure parsing</title><link>https://community.appian.com/thread/74122?ContentTypeID=1</link><pubDate>Fri, 15 May 2020 09:51:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:30627b1f-6d1f-4ce6-9881-1b462b56d2dd</guid><dc:creator>ManuelHTG</dc:creator><description>&lt;p&gt;Have you tried just with index()?&lt;/p&gt;
&lt;p&gt;For example: index(a!fromJson(local!a.body),&amp;quot;NIF&amp;quot;,null)&lt;/p&gt;
&lt;p&gt;I use something similar for my API, works well and it easy to read&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service departure parsing</title><link>https://community.appian.com/thread/74117?ContentTypeID=1</link><pubDate>Fri, 15 May 2020 08:06:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:90a7950b-1582-4770-9e94-e5eb003756e6</guid><dc:creator>sandrap845</dc:creator><description>&lt;p&gt;Good morning Peter,&lt;/p&gt;
&lt;p&gt;I need to map the address part.&lt;/p&gt;
&lt;p&gt;This is the CDT:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1589529703372v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The code and the output:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1589529786735v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;XML:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span class="hljs-meta"&gt;&amp;lt;?&lt;/span&gt;xml version=&lt;span class="hljs-string"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt; encoding=&lt;span class="hljs-string"&gt;&amp;quot;UTF-8&amp;quot;&lt;/span&gt;&lt;span class="hljs-meta"&gt;?&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="content-inner"&gt;
&lt;div id="output"&gt;
&lt;div id="xmlOutputWrapper"&gt;
&lt;pre class="xml" id="xmlOutput"&gt;&lt;code class="hljs"&gt;&lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;SOAP-ENV:Envelope&lt;/span&gt; &lt;span class="hljs-attr"&gt;xmlns:SOAP-ENV&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;quot;&lt;a href="http://schemas.xmlsoap.org/soap/envelope/" /&gt;&amp;quot;&amp;gt;schemas.xmlsoap.org/.../&amp;quot;&lt;/span&gt; &lt;span class="hljs-attr"&gt;xmlns:SOAP-ENC&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;quot;&lt;a href="http://schemas.xmlsoap.org/soap/encoding/" /&gt;&amp;quot;&amp;gt;schemas.xmlsoap.org/.../&amp;quot;&lt;/span&gt; &lt;span class="hljs-attr"&gt;xmlns:xsd&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema"&gt;&amp;quot;&amp;gt;www.w3.org/.../XMLSchema&amp;quot;&lt;/a&gt;&lt;/span&gt; &lt;span class="hljs-attr"&gt;xmlns:xsi&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema-instance"&gt;&amp;quot;&amp;gt;www.w3.org/.../XMLSchema-instance&amp;quot;&lt;/a&gt;&lt;/span&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;SOAP-ENV:Body&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Prueba_General.PruebaConsultaResponse&lt;/span&gt; &lt;span class="hljs-attr"&gt;xmlns&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;quot;pru15052019&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;persona&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;numeroDocumento&lt;/span&gt;&amp;gt;&lt;/span&gt;1&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;numeroDocumento&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;nombre&lt;/span&gt;&amp;gt;&lt;/span&gt;Juan&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;nombre&lt;/span&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;persona&lt;/span&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;datosDomicilio&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Domicilio.DomicilioItem&lt;/span&gt; &lt;span class="hljs-attr"&gt;xmlns&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;quot;pra15052019&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Calle&lt;/span&gt;&amp;gt;&lt;/span&gt;calle1&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Calle&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Numero&lt;/span&gt;&amp;gt;&lt;/span&gt;3&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Numero&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Pais&lt;/span&gt;&amp;gt;&lt;/span&gt;1111&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Pais&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;PaisDescripcion&lt;/span&gt;&amp;gt;&lt;/span&gt;FRANCIA&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;PaisDescripcion&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;NIF&lt;/span&gt;&amp;gt;&lt;/span&gt;111111111111&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;NIF&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;apellido&lt;/span&gt;&amp;gt;&lt;/span&gt;GOMEZ&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;apellido&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;nombre&lt;/span&gt;&amp;gt;&lt;/span&gt;JUAN&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;nombre&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Domicilio.DomicilioItem&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Domicilio.DomicilioItem&lt;/span&gt; &lt;span class="hljs-attr"&gt;xmlns&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;quot;pra15052019&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Calle&lt;/span&gt;&amp;gt;&lt;/span&gt;calle2&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Calle&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Numero&lt;/span&gt;&amp;gt;&lt;/span&gt;2&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Numero&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Pais&lt;/span&gt;&amp;gt;&lt;/span&gt;1222&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Pais&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;PaisDescripcion&lt;/span&gt;&amp;gt;&lt;/span&gt;ESPA&amp;Ntilde;A&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;PaisDescripcion&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;NIF&lt;/span&gt;&amp;gt;&lt;/span&gt;222222222222&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;NIF&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;apellido&lt;/span&gt;&amp;gt;&lt;/span&gt;SAEZ&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;apellido&lt;/span&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;nombre&lt;/span&gt;&amp;gt;&lt;/span&gt;PEPE&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;nombre&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Domicilio.DomicilioItem&lt;/span&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;datosDomicilio&lt;/span&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;Error&lt;/span&gt;&amp;gt;&lt;/span&gt;0&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Error&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;Prueba_General.PruebaConsultaResponse&lt;/span&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;SOAP-ENV:Body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-name"&gt;SOAP-ENV:Envelope&lt;/span&gt;&amp;gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="buttons"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A greeting and thanks in advance.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service departure parsing</title><link>https://community.appian.com/thread/74053?ContentTypeID=1</link><pubDate>Wed, 13 May 2020 23:32:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5835d3ea-9864-4cbe-b514-4de2bbad7064</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;I would expect it to look something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;torecord(
  local!response,
  type!YourType()
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also if the response contains a lot of nested XML, you might have to use &lt;a href="https://docs.appian.com/suite/help/latest/fnc_scripting_xpathsnippet.html"&gt;xpathsnippet()&lt;/a&gt;&amp;nbsp;to get to the part you need. Can you provide some sample XML and the code you used to try and do the conversion?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service departure parsing</title><link>https://community.appian.com/thread/74006?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 13:44:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a2bc1699-e09f-4b7c-baa5-3e36f91d87cf</guid><dc:creator>sandrap845</dc:creator><description>&lt;p&gt;&lt;span&gt;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.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1589291096286v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A greeting and thanks in advance.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service departure parsing</title><link>https://community.appian.com/thread/73998?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 12:52:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aa342363-e797-4cfa-b243-82588ddf3b1f</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Is there a reason you are casting to JSON and then from JSON to a dictionary? There is a function called &lt;a href="https://docs.appian.com/suite/help/latest/fnc_scripting_torecord.html"&gt;torecord()&lt;/a&gt;&amp;nbsp;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.&lt;/p&gt;
&lt;p&gt;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.&amp;nbsp;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).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>