Issue with attaching an existing file while creating node using RESTWS
I tested the following code it works fine. Replace your field machine names and bundle name accordingly. Hope it helps

Here is the XML format to send data

&lt;result&gt;
&lt;title&gt;title_of_node&lt;/title&gt;
&lt;type&gt;sampleimage&lt;/type&gt;
&lt;field_samplefile&gt;
&lt;und is_array="true"&gt;
&lt;item&gt;
&lt;fid&gt;18&lt;/fid&gt;
&lt;uid&gt;1&lt;/uid&gt;
&lt;filename&gt;Drupal.txt&lt;/filename&gt;
&lt;uri&gt;public://Drupal.txt&lt;/uri&gt;
&lt;filemime&gt;text/plain&lt;/filemime&gt;
&lt;/item&gt;
&lt;/und&gt;
&lt;/field_samplefile&gt;
&lt;/result&gt;


Here is the JSON format

{
    "title": "title_of_node",
    "type": "bundle_name",
    "field_samplefile": {
        "und": [{
            "fid": "17",
            "filename": "changes.txt",
            "uri": "public://changes.txt",
            "filemime": "text/plain"
        }]
    } 
}