I am using Jersey client to hit a PHP web service for image uploading functionality. I am getting the following exception:
Caused by: com.sun.jersey.api.clie
Register the MultiPartWriter provider when creating the Client:
ClientConfig cc = new DefaultClientConfig();
Client client;
cc.getClasses().add(MultiPartWriter.class);
client = Client.create(cc);
If using Maven, these are the dependencies you need in your pom.xml:
com.sun.jersey
jersey-client
1.17.1
com.sun.jersey.contribs
jersey-multipart
1.17.1