AnsweredAssumed Answered

Problem while Creating CMIS document

Question asked by himanshu412 on Apr 20, 2009
I am trying to create  new document through Http REST client using alfresco 3.1 webscipt. Here is my sample code snippet:

====================================================================
            NameValuePair pair1 = new NameValuePair("title", "sample_title");
       NameValuePair pair2 = new NameValuePair("summary", "test file");
       NameValuePair pair3 = new NameValuePair("ObjectTypeId", "document");
           String url = "http://localhost:8080/alfresco/service/api/path/workspace/SpacesStore/Company%20Home/children'?alf_ticket =TICKET_Id#});
           
            PostMethod postMethod = new PostMethod(url);
           postMethod.addParameters(pair1, pair2, pair3);
           int status = httpClient.executeMethod(postMethod);
====================================================================
I am getting the following error. Any one having any idea??
Thanks…
Himanshu
===================================================================
  <table>
            <tr><td>The Web Script <a href="/alfresco/service/api/path/workspace/SpacesStore/Company Home/children?alf_ticket=TICKET_97a592914143427bc04d213c81f29418db09bc74">/alfresco/service/api/path/workspace/SpacesStore/Company Home/children</a> has responded with a status of 400 - Bad Request.</td></tr>
         </table>
         <br/>
         <table>
            <tr><td><b>400 Description:</b></td><td> Request sent by the client was syntactically incorrect.</td></tr>
            <tr><td> </td></tr>
            <tr><td><b>Message:</b></td><td>Posting of media resource not supported</td></tr>
            <tr><td><b>Server</b>:</td><td>Alfresco Labs v3.0.0 (Stable 1526) schema 1,002</td></tr>
            <tr><td><b>Time</b>:</td><td>Apr 20, 2009 1:45:31 PM</td></tr>
            <tr><td></td><td> </td></tr>
            <tr><td><b>Diagnostics</b>:</td><td><a href="/alfresco/service/script/org/alfresco/repository/store/children.post">Inspect Web Script (org/alfresco/repository/store/children.post)</a></td></tr>
         </table>
===================================================================

Outcomes