overviewURL.setValue(wsdlURL);
OverviewDoc overviewDoc = new OverviewDoc();
overviewDoc.setOverviewURL(overviewURL);
tModel.getOverviewDoc().add(overviewDoc);
// Create the categoryBag, The tModel MUST contain a categoryBag
CategoryBag categoryBag = new CategoryBag();
// the categoryBag MUST contain a keyedReference with a tModelKey of the WSDL
// Entity Type category system and a keyValue of "portType".
KeyedReference typesReference = newKeyedReference(
"uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "portType");
categoryBag.getKeyedReference().add(typesReference);
// If the wsdl:portType has a targetNamespace then the categoryBag MUST also contain an
// additional keyedReference with a tModelKey of the XML Namespace category system and a
// keyValue of the target namespace of the wsdl:definitions element that contains the
// wsdl:portType. If the targetNamespace is absent from the portType, a categoryBag
// MUST NOT contain a keyedReference to the XML Namespace category system.
if (namespace != null && !"".equals(namespace)) {
KeyedReference namespaceReference = newKeyedReference(
"uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace);
categoryBag.getKeyedReference().add(namespaceReference);
}
tModel.setCategoryBag(categoryBag);
tModels.add(tModel);
}