this.baseURI = baseURI;
requestHeaders = createRequestHeaders(reqHdrs);
}
public Response addNewsStory(NewsStory story) throws Exception {
RestClient client = new RestClient(new ApacheHttpClientConfig());
Resource resource = client.resource(baseURI);
setRequestHeaders(resource);
JAXBContext context = JAXBContext.newInstance(NewsStory.class);
StringWriter sw = new StringWriter();
context.createMarshaller().marshal(story, sw);