<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Upload REST API shows 400 bad request in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115101#M31957</link>
    <description>&lt;P&gt;Returning 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules. The client SHOULD NOT repeat the request without modifications. It means that the request itself has somehow incorrect or corrupted and the server couldn't understand it. The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method . Therefore, it prevents the website from being properly displayed. To fix a &lt;A href="http://net-informations.com/q/mis/400.html" target="_self" rel="nofollow noopener noreferrer"&gt;400 Bad Request&lt;/A&gt; error, it is best to start diagnosing the issue from the client side itself. Complete the steps outlined in this section to help diagnose and correct the error.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Check for errors in the URL.&lt;/LI&gt;&lt;LI&gt;Clear Browser Cache and cookies.&lt;/LI&gt;&lt;LI&gt;Clear DNS Cache.&lt;/LI&gt;&lt;LI&gt;Check your File upload Size.&lt;/LI&gt;&lt;LI&gt;Deactivate Browser Extensions.&lt;/LI&gt;&lt;LI&gt;Contact the site owner to report the 404 error.&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Tue, 26 Jan 2021 05:34:23 GMT</pubDate>
    <dc:creator>warrensacko</dc:creator>
    <dc:date>2021-01-26T05:34:23Z</dc:date>
    <item>
      <title>Upload REST API shows 400 bad request</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115096#M31952</link>
      <description>&lt;P&gt;Hi there ,&lt;/P&gt;&lt;P&gt;I have an ESB webservice client which upload document to Alfresco&amp;nbsp; using following RestAPI .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;http://&amp;lt;xxx&amp;gt;:8080/alfresco/service/api/upload&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I understand&amp;nbsp; ,&amp;nbsp; API&amp;nbsp; to be&amp;nbsp; called as &lt;STRONG&gt;multipart / form data&lt;/STRONG&gt;&amp;nbsp; , with file and mandatory fields . &amp;nbsp;&amp;nbsp; When i executed&amp;nbsp; , i got the following error ersponse back&amp;nbsp; .&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"status"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"code"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;400&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Bad&amp;nbsp;Request"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"description"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Request&amp;nbsp;sent&amp;nbsp;by&amp;nbsp;the&amp;nbsp;client&amp;nbsp;was&amp;nbsp;syntactically&amp;nbsp;incorrect."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"message"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Required&amp;nbsp;parameters&amp;nbsp;are&amp;nbsp;missing"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"exception"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"callstack"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;[],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"server"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Enterprise&amp;nbsp;v5.2.3&amp;nbsp;(r852994b1-b12)&amp;nbsp;schema&amp;nbsp;10,065"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"time"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"10-Jul-2020&amp;nbsp;12:26:47"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I use WSO2 ESB client , ESB code looks all good . The only place where i can debug is through wirelog .&lt;/DIV&gt;&lt;DIV&gt;wirelog shows alll good( please scee screen shot below) . Error message has confilicting information like&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"description"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Request&amp;nbsp;sent&amp;nbsp;by&amp;nbsp;the&amp;nbsp;client&amp;nbsp;was&amp;nbsp;syntactically&amp;nbsp;incorrect."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"message"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Required&amp;nbsp;parameters&amp;nbsp;are&amp;nbsp;missing"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is there a log i can get from Alfresco server side to identify what actually is the issue , which syntax is incorrect ? &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;what parameter is missing ? &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Screen shot for wire log as below &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FileUploadDire.jpg" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/741iA5DADDC054FC786E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 10 Jul 2020 11:49:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115096#M31952</guid>
      <dc:creator>brijeshnk</dc:creator>
      <dc:date>2020-07-10T11:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Upload REST API shows 400 bad request</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115097#M31953</link>
      <description>&lt;P&gt;Did you verify that your alfresco version supports the above webservice ?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 13:36:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115097#M31953</guid>
      <dc:creator>malekgn</dc:creator>
      <dc:date>2020-07-10T13:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Upload REST API shows 400 bad request</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115098#M31954</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/16965"&gt;@brijeshnk&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/56981"&gt;@malekgn&lt;/A&gt;&amp;nbsp;says, check the supported API version - take a look at this &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/why-do-i-get-quot-400-client-error-bad-request-for-url-quot-when/td-p/133576#M7599" target="_self" rel="nofollow noopener noreferrer"&gt;thread&lt;/A&gt; for a similar issue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 13:45:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115098#M31954</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-07-10T13:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Upload REST API shows 400 bad request</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115099#M31955</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Yes&amp;nbsp; i can call the same API from other clients&amp;nbsp; . POSTMAN and SOAPUI&amp;nbsp; client works and gives success message.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i called using WSO2( ESB)&amp;nbsp; client its rejecting&amp;nbsp; with error messages mentioned above .&amp;nbsp; for&amp;nbsp; debugging ,&amp;nbsp; I captured&amp;nbsp; wirelog using wireshack&amp;nbsp; ( attached in original message above) ,&amp;nbsp; I dont see anything&amp;nbsp; anwrong in that too . Hence i suspect something wrong&amp;nbsp; in server .&amp;nbsp;&amp;nbsp;&amp;nbsp; Where exactly i can see incoming API messages or more debugging logs for Rest API service&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 14:11:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115099#M31955</guid>
      <dc:creator>brijeshnk</dc:creator>
      <dc:date>2020-07-10T14:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Upload REST API shows 400 bad request</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115100#M31956</link>
      <description>&lt;P&gt;if i understand correctly, you are sending upload requesy to a SOAP webservice and from within the webservice you are calling alfresco file-upload rest &lt;A href="https://docs.alfresco.com/5.0/references/RESTful-UploadUploadPost.html" target="_self" rel="nofollow noopener noreferrer"&gt;api.&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Did you checked the webervice code whether it is able to get the input stream from the request for further passing it to alfresco file-upload rest api? Did you tried setting MTOM property to &lt;EM&gt;true&lt;/EM&gt; while sending your soap request with filedata?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I remember this is one of the requirement for passing binary data to soap webservice. An example of enabling MTOM can be seen &lt;A href="https://www.soapui.org/docs/soap-and-wsdl/attachments/" target="_self" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt; for soapui client, likewise your client may have option to enable mtom. May be give it a try.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 03:18:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115100#M31956</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-07-15T03:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Upload REST API shows 400 bad request</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115101#M31957</link>
      <description>&lt;P&gt;Returning 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules. The client SHOULD NOT repeat the request without modifications. It means that the request itself has somehow incorrect or corrupted and the server couldn't understand it. The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method . Therefore, it prevents the website from being properly displayed. To fix a &lt;A href="http://net-informations.com/q/mis/400.html" target="_self" rel="nofollow noopener noreferrer"&gt;400 Bad Request&lt;/A&gt; error, it is best to start diagnosing the issue from the client side itself. Complete the steps outlined in this section to help diagnose and correct the error.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Check for errors in the URL.&lt;/LI&gt;&lt;LI&gt;Clear Browser Cache and cookies.&lt;/LI&gt;&lt;LI&gt;Clear DNS Cache.&lt;/LI&gt;&lt;LI&gt;Check your File upload Size.&lt;/LI&gt;&lt;LI&gt;Deactivate Browser Extensions.&lt;/LI&gt;&lt;LI&gt;Contact the site owner to report the 404 error.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 26 Jan 2021 05:34:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115101#M31957</guid>
      <dc:creator>warrensacko</dc:creator>
      <dc:date>2021-01-26T05:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Upload REST API shows 400 bad request</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115102#M31958</link>
      <description>&lt;P&gt;Thanks for the step by step tutorial. Works like a charm!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 05:55:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-rest-api-shows-400-bad-request/m-p/115102#M31958</guid>
      <dc:creator>McEvoy1</dc:creator>
      <dc:date>2021-01-27T05:55:06Z</dc:date>
    </item>
  </channel>
</rss>

