}
request.getRepresentation().add(representation);
}
if (getResponseClass().isPresent()) {
final Response response = new Response();
method.getResponse().add(response);
response.getStatus().add(Long.valueOf(HttpStatus.OK_200));
final Representation representation = new Representation();
representation.setMediaType("application/xml");
final Optional<QName> elementName = getResponseXmlElement();
if (elementName.isPresent()) {
representation.setElement(elementName.get());
}
response.getRepresentation().add(representation);
}
}
return resource;
}