07-10-2020 07:49 AM
Hi there ,
I have an ESB webservice client which upload document to Alfresco using following RestAPI .
http://<xxx>:8080/alfresco/service/api/upload
I understand , API to be called as multipart / form data , with file and mandatory fields . When i executed , i got the following error ersponse back .
07-10-2020 09:36 AM
Did you verify that your alfresco version supports the above webservice ?
07-10-2020 10:11 AM
Hi ,
Yes i can call the same API from other clients . POSTMAN and SOAPUI client works and gives success message.
When i called using WSO2( ESB) client its rejecting with error messages mentioned above . for debugging , I captured wirelog using wireshack ( attached in original message above) , I dont see anything anwrong in that too . Hence i suspect something wrong in server . Where exactly i can see incoming API messages or more debugging logs for Rest API service
07-10-2020 09:45 AM
Hi @brijeshnk,
As @malekgn says, check the supported API version - take a look at this thread for a similar issue.
HTH
07-14-2020 11:18 PM
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 api.
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 true while sending your soap request with filedata?
I remember this is one of the requirement for passing binary data to soap webservice. An example of enabling MTOM can be seen here for soapui client, likewise your client may have option to enable mtom. May be give it a try.
01-26-2021 12:34 AM
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 400 Bad Request 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.
01-27-2021 12:55 AM
Thanks for the step by step tutorial. Works like a charm!
Explore our Alfresco products with the links below. Use labels to filter content by product module.