String wsdlAddress = getWsdlAddress();
if (wsdlAddress != null) {
String targetServiceCat = servletRequest.getParameter("serviceCat");
String targetServiceName = servletRequest.getParameter("serviceName");
String targetProtocol = servletRequest.getParameter("protocol");
ContractInfo contract;
try {
// Generate the WSDL...
contract = getContractInfo(Service.getService(targetServiceCat, targetServiceName), wsdlAddress);
String data = contract.getData();
if (data != null) {
contract.setData( updateWsdl(data, epr, targetServiceCat, targetServiceName, targetProtocol) );
} else {
throw new Exception("null Contract data");
}
} catch (Exception e) {
String e_msg = "Failed to load WSDL contract information from address '" + wsdlAddress + "': " + e.getMessage();
logger.error(e_msg, e);
contract = new ContractInfo("text/xml", "<definitions><!-- " + e_msg + " --></definitions>");
}
return contract;
} else {
logger.warn("Requested contract info for unknown webservice endpoint.");
return null;