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=1143314

Reply via email to