// read in the entire specDD as a string, we need this for getDeploymentDescriptor
// on the J2ee management object
specDD = DeploymentUtil.readAll(specDDUrl);
} catch (Exception e) {
//construct a default spec dd
ApplicationClientDocument appClientDoc = ApplicationClientDocument.Factory.newInstance();
appClientDoc.addNewApplicationClient();
appClient = appClientDoc.getApplicationClient();
specDD = appClientDoc.xmlText();
}
if (appClient == null) {
//we found application-client.xml, if it won't parse it's an error.
try {
// parse it
XmlObject xmlObject = XmlBeansUtil.parse(specDD);
ApplicationClientDocument appClientDoc = convertToApplicationClientSchema(xmlObject);
appClient = appClientDoc.getApplicationClient();
} catch (XmlException e) {
throw new DeploymentException("Unable to parse application-client.xml", e);
}
}