Examples of DefectTrackerFormatException


Examples of com.denimgroup.threadfix.exception.DefectTrackerFormatException

            try {
                JAXBContext ctx = JAXBContext.newInstance(c);
                Unmarshaller marshaller = ctx.createUnmarshaller();
                res = (T) marshaller.unmarshal(new StringReader(xml));
            } catch (JAXBException e) {
                throw new DefectTrackerFormatException(e, "Unable to parse XML response from server.");
            }
        }

        return res;
    }
View Full Code Here

Examples of com.denimgroup.threadfix.exception.DefectTrackerFormatException

            StringWriter entityXml = new StringWriter();
            marshaller.marshal(o, entityXml);

            return entityXml.toString();
        } catch (JAXBException e) {
            throw new DefectTrackerFormatException(e, "Unable to parse XML response from server.");
        }
    }
View Full Code Here

Examples of com.denimgroup.threadfix.exception.DefectTrackerFormatException

            InputSource source = new InputSource(new StringReader(inputString));
            source.setEncoding("UTF-8");
            xmlReader.parse(source);
        } catch (SAXException | IOException e) {
            throw new DefectTrackerFormatException(e, "Unable to parse server response as XML.");
        }

        return parser.attributeList;
    }
View Full Code Here

Examples of com.denimgroup.threadfix.exception.DefectTrackerFormatException

        DefectPayload payload = new DefectPayload(objectMap, getJiraMetadata());

        try {
            return new ObjectMapper().writeValueAsString(payload);
        } catch (IOException e) {
            throw new DefectTrackerFormatException(e, "We were unable to serialize object as JSON");
        }
    }
View Full Code Here

Examples of com.denimgroup.threadfix.exception.DefectTrackerFormatException

            try {
                JAXBContext ctx = JAXBContext.newInstance(QCRestException.class);
                Unmarshaller marshaller = ctx.createUnmarshaller();
                res = (QCRestException) marshaller.unmarshal(new StringReader(xml));
                String errorMsg = res.getId() + ": " + res.getTitle();
                throw new DefectTrackerFormatException(ex, errorMsg);
            } catch (JAXBException e) {
                throw new DefectTrackerFormatException(e, "Unable to parse XML response from server.");
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.