tModel.getOverviewDoc().add(overviewDoc);
// Set the categoryBag
CategoryBag categoryBag = new CategoryBag();
if (targetNamespace!=null) {
KeyedReference namespaceReference = WSDL2UDDI.newKeyedReference(
"uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", targetNamespace);
categoryBag.getKeyedReference().add(namespaceReference);
}
KeyedReference typesReference = WSDL2UDDI.newKeyedReference(
"uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process");
categoryBag.getKeyedReference().add(typesReference);
for (QName qName : portTypes.keySet()) {
String portTypeKey = keyDomainURI + qName.getLocalPart();
KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference(
"uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey);
categoryBag.getKeyedReference().add(portTypeReference);
}
tModel.setCategoryBag(categoryBag);