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 .
Did you verify that your alfresco version supports the above webservice ?
Hi @brijeshnk,
As @malekgn says, check the supported API version - take a look at this thread for a similar issue.
HTH
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
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.
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.
Thanks for the step by step tutorial. Works like a charm!
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.