i am getting multipart entity from android client as shown below.
HttpClient httpClient = new DefaultHttpClient();
HttpPost postRequest = new HttpPost(
"http://localhost:9090/MBC_WS/rest/network/mobileUserPictureInsert1");
MultipartEntity reqEntity = new MultipartEntity(
HttpMultipartMode.BROWSER_COMPATIBLE);
reqEntity.addPart("message", new StringBody("hi moni"));
postRequest.setEntity(reqEntity);
HttpResponse response = httpClient.execute(postRequest);
In jersey i am trying to retrieve message but getting only object.the code is:
@Path("/mobileUserPictureInsert1")
@POST
@Consumes("multipart/*")
public String create(MultiPart multiPart){
BodyPartEntity bpe = (BodyPartEntity) multiPart.getBodyParts().get(0).getEntity();
String message = bpe.toString();
here i AM getting some object ony not message value. what mistake i made.pl help me.