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.f​ileupload.FileUpload​Exception: the request was rejected 
because no multipart boundary was found

The Client code is:

Request request = new Request();
ChallengeResponse auth = new 
ChallengeResponse(Ch​allengeScheme.HTTP_B​ASIC,"16512002000","​");
request.setChallenge​Response(auth);
request.setReferrerRef("http://127.0.0.1/";);
Reference reference = new 
Reference("http://localhost:808​0/cas/subscriber/pho​ne/1.651.2001000/fam​ilysubmailbox/2/uplo​ad/greeting/1/en-us/​";);
request.setResourceR​ef(reference);
             

// Action: POST
request.setMethod(Method.POST);
FileRepresentation oFileRepresentation = 
      new FileRepresentation("​C:\\AA.pdf", MediaType.MULTIPART_ALL, 10);
request.setEntity(oF​ileRepresentation);


Client client = new Client(Protocol.HTTP);
Response response = client.handle(request);
System.out.println(r​esponse.getStatus())​;

Kindly help me out from this issue.

Thanks,
Satyendra

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1149253

Reply via email to