Hi Satyendra, This is because client-side Restlet doesn't support multi-part yet. This is planned for Restlet 1.2 though:
"Support composite representations" http://restlet.tigris.org/issues/show_bug.cgi?id=71 For now, I would suggest to use Apache HTTP client directly: http://hc.apache.org/httpclient-3.x/methods/multipartpost.html Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Satyendra Singh [mailto:singh_satyen...@yahoo.com] Envoyé : vendredi 13 février 2009 07:28 À : discuss@restlet.tigris.org Objet : The request was rejected because no multipart boundary was found I can upload the file successfully from the browser (html) but getting the exception on server side while uploading a same file using the restlet client. org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was found The Client code is: Request request = new Request(); ChallengeResponse auth = new ChallengeResponse(ChallengeScheme.HTTP_BASIC,"16512002000",""); request.setChallengeResponse(auth); request.setReferrerRef("http://127.0.0.1/"); Reference reference = new Reference("http://localhost:8080/cas/subscriber/phone/1.651.2001000/familysubmailbox/2/upload/greeting/1/en-us/"); request.setResourceRef(reference); // Action: POST request.setMethod(Method.POST); FileRepresentation oFileRepresentation = new FileRepresentation("C:\\AA.pdf", MediaType.MULTIPART_ALL, 10); request.setEntity(oFileRepresentation); Client client = new Client(Protocol.HTTP); Response response = client.handle(request); System.out.println(response.getStatus()); Kindly help me out from this issue. Thanks, Satyendra ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1149253 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1186223