I have the following handler: 
{Code}
@POST
@Produces(MediaType.TEXT_PLAIN)
@Consumes(MediaTypeUtils.MULTIPART_FORM_DATA)
public String uploadFiles(@Context HttpServletRequest request,  InMultiPart
inMP) {
...
}

I have created REST Client using JacksonJaxbJsonProvider.class
{Code}
protected RestClient getClient() {
        BasicAuthSecurityHandler handler = new BasicAuthSecurityHandler();
        handler.setUserName(username);
        handler.setPassword(password);
        ClientConfig config = new ClientConfig();
        config.handlers(handler);
        config.applications(new Application() {
                @Override
                public Set<Class<?>> getClasses() {
                        HashSet<Class<?>> s = new HashSet<Class<?>>();
                        s.add(JacksonJaxbJsonProvider.class);// by default the 
wink
                        return s;
                }
        });

        return new RestClient(config);
}
But while trying to upload the file I am getting error,
{ERROR}

java.lang.RuntimeException: No javax.ws.rs.ext.MessageBodyWriter found for
type class org.apache.wink.common.model.multipart.InMultiPart and media type
multipart/form-data

Do you have a suggestion how to resolve the issue? 
-- 
View this message in context: 
http://apache-wink-dev.3470905.n2.nabble.com/REST-Client-failed-to-upload-file-tp5044819p5044819.html
Sent from the Apache Wink Dev mailing list archive at Nabble.com.

Reply via email to