public class ResourceServingServlet extends HttpServlet
{
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
WSRP2Producer producer = ProducerHolder.getProducer();
GetResource getResource = ResourceServingUtil.decode(req);
try
{
ResourceResponse resource = producer.getResource(getResource);
ResourceContext resourceContext = resource.getResourceContext();
byte[] itemBinary = resourceContext.getItemBinary();
String itemString = resourceContext.getItemString();
final String mimeType = resourceContext.getMimeType();