// Override with the service description from the WSDL if present
Element docElement = binding.getDocumentationElement();
if (docElement != null && docElement.getTextContent() != null) {
bindingDescription = docElement.getTextContent();
}
Description description = new Description();
description.setLang(lang);
description.setValue(bindingDescription);
bindingTemplate.getDescription().add(description);
// reference wsdl:binding tModel
TModelInstanceInfo tModelInstanceInfoBinding = new TModelInstanceInfo();
tModelInstanceInfoBinding.setTModelKey(keyDomainURI + binding.getQName().getLocalPart());
InstanceDetails instanceDetails = new InstanceDetails();
instanceDetails.setInstanceParms(portName);
tModelInstanceInfoBinding.setInstanceDetails(instanceDetails);
Description descriptionB = new Description();
descriptionB.setLang(lang);
descriptionB.setValue("The wsdl:binding that this wsdl:port implements. " + bindingDescription
+ " The instanceParms specifies the port local name.");
tModelInstanceInfoBinding.getDescription().add(descriptionB);
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();
}
Description descriptionPT = new Description();
descriptionPT.setLang(lang);
descriptionPT.setValue("The wsdl:portType that this wsdl:port implements." + portTypeDescription);
tModelInstanceInfoPortType.getDescription().add(descriptionPT);
tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoPortType);
bindingTemplate.setTModelInstanceDetails(tModelInstanceDetails);
} else {