Hi Jurgen,

> A quick sanity check:  If, from another environment I have an 
> HttpUrlConnection
> and execute its setRequestProperty("Accepts", "image/png"), I 
> should expect my variant.getMediaType() to match on IMAGE_PNG,
> right?  Or is there more to this.  

You need to check two things:
 - that your resource has declared a variant with the media type
   IMAGE_PNG. Ex: getVariants().add(new Variant(MediaType.IMAGE_PNG));
 - the your getRepresentation(Variant) method correctly checks the
   incoming variants' mediatype.
 
> My Resource derived class adds variant support for TEXT_XML 
> and IMAGE_PNG. 
> Requests for XML force a post from the other environment that 
> calls this same
> resource but with the "image/png".  However the variant of 
> the image call appears as null. 
> 
> Any feedback on what I might be doing wrong?

We would need some code sample to help us understand the exact issue. 

Best regards,
Jerome  

Reply via email to