try {
setSenderInfo("Generate", producer);
genDoc = getGenerateDoc();
buildGenerateMessage(genDoc, keyObject);
if (getValidation()) {
XmlValidator xmlValidator = new XmlValidator();
if (xmlValidator.isValid(genDoc) == false) {
outputXMLDocument(genDoc, "Contents of Generate document.");
throw new EnterpriseObjectGenerateException("Generate document is not valid for " + getClass().getName());
}
}
/*
TextMessage responseMessage = (TextMessage)produceRequest(producer, genDoc);
String responseText = responseMessage.getText();
if (responseText == null) {
throw new EnterpriseObjectGenerateException("A null response was returned from the server - " + getElementName());
}
*/
// Get the results out of the TextMessage
Document responseDoc = null;
// try {
// SAXBuilder builder = new SAXBuilder(false);
// responseDoc = builder.build(new ByteArrayInputStream(responseText.getBytes()));
responseDoc = producer.produceRequest(this, genDoc);
if (getValidation()) {
XmlValidator xmlValidator = new XmlValidator();
if (xmlValidator.isValid(responseDoc) == false) {
throw new EnterpriseObjectGenerateException("Generate response document is not valid for " + getClass().getName());
}
}
Element controlArea = getControlArea(responseDoc.getRootElement());