users@jersey.java.net

[Jersey] MessageBodyWriter/Mimetype exception & a general question

From: tmp <le_tmp_at_gmx.de>
Date: Wed, 15 Dec 2010 20:48:10 -0800 (PST)

Hello!

I have two questions regarding the following code:
http://pastebin.com/Gm0pgs6m
This resource should get some arbitrary data from the internet (js, images,
html, ...) and deliver it in a response to the client.

1) At the moment I get errors when I want to deliver images:
A message body writer for Java class com.sun.jersey.api.client.WebResource,
and Java type class com.sun.jersey.api.client.WebResource, and MIME media
type image/png was not found

What is missing? Here you can see the jersey dependency in the pom.xml:
http://pastebin.com/aqiFdDx1

2) Because I have to solve a cross-domain problem in a webapplication, this
resource has deliver arbitrary content from the web. Inside the webapp an
arbitrary webpage is embedded in an iframe. All requests from this iframe
(css files, js files, images, ...) are mapped to the posted resource. Now
this resource has to check the headers of the iframe-request, build a new
request with the given data and deliver the resonse to the client. Is my
attempt correct? How can I get the headers (and all other needed data?) to
forward it in the new request from the server? Is there a better way to
solve the problem? (for example forwarding the request and the response)

Thanks in advance!
-- 
View this message in context: http://jersey.576304.n2.nabble.com/MessageBodyWriter-Mimetype-exception-a-general-question-tp5840878p5840878.html
Sent from the Jersey mailing list archive at Nabble.com.