/** The APPLICATIO n_ xml. */
APPLICATION_XML("application/xml"),
-
+ APPLICATION_XML_SCVMM("text/xml"),
/** The APPLICATIO n_ json. */
APPLICATION_JSON("application/json");
+
/** The content type. */
private String contentType;
/**
* Instantiates a new content type enum.
- *
+ *
* @param type
* the type
*/
/**
* Gets the content type.
- *
+ *
* @return the content type
*/
public String getContentType() {
final JsonParser parser = new JsonParser();
try {
if (ContentTypeEnum.APPLICATION_XML.getContentType().equals(
+ contentType) ||
+ ContentTypeEnum.APPLICATION_XML_SCVMM.getContentType().equals(
contentType)) {
final Random random = new Random();
final String randomString = String.valueOf(random.nextInt());
responseString = responseJson.toString();
// conversion is required only for XML type response type
if (ContentTypeEnum.APPLICATION_XML.getContentType().equals(
+ requiredContentType) ||
+ ContentTypeEnum.APPLICATION_XML_SCVMM.getContentType().equals(
requiredContentType)) {
// modify the json object to remove null and empty nested
// json and arrays
ApplicationConstants.PUT_METHOD_NAME)) {
isMediaTypeCorrect = false;
String contentType = request.getContentType();
+ LOG.debug("Media Type : " + contentType);
if (contentType != null) {
String content[] = contentType
.split(ApplicationConstants.SEMI_COLON);
.equalsIgnoreCase(ContentTypeEnum.APPLICATION_JSON
.getContentType()) || content[0]
.equalsIgnoreCase(ContentTypeEnum.APPLICATION_XML
+ .getContentType()) || content[0]
+ .equalsIgnoreCase(ContentTypeEnum.APPLICATION_XML_SCVMM
.getContentType()))) {
isMediaTypeCorrect = true;
}