<?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>How do i save a XML file that is been  sent to my  web API</title><link>https://community.appian.com/discussions/f/integrations/34274/how-do-i-save-a-xml-file-that-is-been-sent-to-my-web-api</link><description>i have a post web API which receives an XML file and with this files it triggers a process model. but unfortunately when we get the file we just get the XML file content. it&amp;#39;s like we where getting just the content of the XML and this is a signed file</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How do i save a XML file that is been  sent to my  web API</title><link>https://community.appian.com/thread/130845?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 13:07:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:84ab2a52-f0f3-42ea-accb-6ba96eed9ed0</guid><dc:creator>felixr</dc:creator><description>&lt;p&gt;yes&amp;nbsp; i want to upload a&amp;nbsp; document&amp;nbsp; and with this document i want to&amp;nbsp; run a process&amp;nbsp; and also return another&amp;nbsp;&amp;nbsp; file&amp;nbsp; after the process execution ends&amp;nbsp; but i&amp;#39;m not sending a&amp;nbsp; straight forward document &amp;nbsp;&amp;nbsp; i&amp;#39;m sending it as a part of the body&amp;nbsp;&amp;nbsp; like in the following&lt;/p&gt;
&lt;p&gt;&amp;nbsp;http Request Picture&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1709816857316v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the weird part is that&amp;nbsp; even if&amp;nbsp; we are sending an xml document we are getting&amp;nbsp; the xml&amp;nbsp; content in appian.&lt;/p&gt;
&lt;div id="simple-translate" class="simple-translate-system-theme"&gt;
&lt;div&gt;
&lt;div class="simple-translate-button isShow" style="height:22px;left:66px;top:231px;width:22px;"&gt;&lt;/div&gt;
&lt;div class="simple-translate-panel " style="font-size:13px;height:200px;left:0px;top:0px;width:300px;"&gt;
&lt;div class="simple-translate-result-wrapper" style="overflow:hidden;"&gt;
&lt;div class="simple-translate-move"&gt;&lt;/div&gt;
&lt;div class="simple-translate-result-contents"&gt;
&lt;p class="simple-translate-result" dir="auto"&gt;&lt;/p&gt;
&lt;p class="simple-translate-candidate" dir="auto"&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do i save a XML file that is been  sent to my  web API</title><link>https://community.appian.com/thread/130768?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2024 23:14:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6055813-c480-405f-8512-b3a4eb72be7b</guid><dc:creator>Abhay Dalsaniya</dc:creator><description>&lt;p&gt;If you are looking for document as an attachment to the web API request, use following.&lt;/p&gt;
&lt;p&gt;- While creating a WebAPI use the &amp;quot;Document Upload&amp;quot; template as shown below. While creating the WebAPI object it will ask for a folder to save the document.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1709766745820v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(

  /*Check whether the request body contains a document*/
  local!success: not(isnull(http!request.body)),

  if(
    local!success,

    /*If a document was uploaded, return a successful response*/
    a!httpResponse(
      statusCode: 200,
      headers: {},

      /*Print the document id, name, and extension of the uploaded document*/
      body: concat(
        &amp;quot;Upload Successful: &amp;quot;,
        document(http!request.body, &amp;quot;id&amp;quot;),
        &amp;quot; - &amp;quot;,
        document(http!request.body, &amp;quot;name&amp;quot;),
        &amp;quot;.&amp;quot;,
        document(http!request.body, &amp;quot;extension&amp;quot;)
      )
    ),

    /*If no document was uploaded, return an error code*/
    a!httpResponse(
      statusCode: 400,
      headers: {},
      body: &amp;quot;400 Document Not Provided&amp;quot;
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>