}
bindingTemplate.getDescription().addAll(Common2UDDI.mapDescription(bindingDescription, lang));
// reference wsdl:binding tModel
TModelInstanceInfo tModelInstanceInfoBinding = new TModelInstanceInfo();
tModelInstanceInfoBinding.setTModelKey(keyDomainURI + binding.getQName().getLocalPart());
InstanceDetails instanceDetails = new InstanceDetails();
instanceDetails.setInstanceParms(portName);
tModelInstanceInfoBinding.setInstanceDetails(instanceDetails);
tModelInstanceInfoBinding.getDescription().addAll(Common2UDDI.mapDescription("The wsdl:binding that this wsdl:port implements. " + bindingDescription +
" The instanceParms specifies the port local name.", lang));
tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoBinding);
// reference wsdl:portType tModel
PortType portType = binding.getPortType();
TModelInstanceInfo tModelInstanceInfoPortType = new TModelInstanceInfo();
tModelInstanceInfoPortType.setTModelKey(keyDomainURI + portType.getQName().getLocalPart());
String portTypeDescription = "";
docElement = portType.getDocumentationElement();
if (docElement!=null && docElement.getTextContent()!=null) {
portTypeDescription = docElement.getTextContent();
}
tModelInstanceInfoPortType.getDescription().addAll(Common2UDDI.mapDescription("The wsdl:portType that this wsdl:port implements." + portTypeDescription, lang));
tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoPortType);
//reference bpel:process tModel
TModelInstanceInfo tModelInstanceInfoBPEL = new TModelInstanceInfo();
tModelInstanceInfoBPEL.setTModelKey(keyDomainURI + service.getQName().getLocalPart() + "Process");
// Description
String serviceDescription = properties.getProperty(Property.SERVICE_DESCRIPTION, Property.DEFAULT_SERVICE_DESCRIPTION);
// Override with the service description from the WSDL if present
docElement = wsdlDefinition.getService(serviceName).getDocumentationElement();
if (docElement!=null && docElement.getTextContent()!=null) {
serviceDescription = docElement.getTextContent();
}
tModelInstanceInfoBPEL.getDescription().addAll(Common2UDDI.mapDescription("The bpel:process this wsdl:port supports." + serviceDescription, lang));
tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoBPEL);
bindingTemplate.setTModelInstanceDetails(tModelInstanceDetails);
} else {
log.error("Could not find Port with portName: " + portName);