if (sName.getValue() == null) {
sName.setValue(serviceQName.getLocalPart());
}
service.getName().add(sName);
CategoryBag categoryBag = new CategoryBag();
String namespace = serviceQName.getNamespaceURI();
if (namespace != null && namespace.length()!=0) {
KeyedReference namespaceReference = newKeyedReference(
"uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace);
categoryBag.getKeyedReference().add(namespaceReference);
}
KeyedReference serviceReference = newKeyedReference(
"uddi:uddi.org:wadl:types", "uddi-org:wadl:types", "service");
categoryBag.getKeyedReference().add(serviceReference);
KeyedReference localNameReference = newKeyedReference(
"uddi:uddi.org:xml:localname", "uddi-org:xml:localName", serviceQName.getLocalPart());
categoryBag.getKeyedReference().add(localNameReference);
service.setCategoryBag(categoryBag);
for (int i = 0; i < wadlDefinition.getResources().size(); i++) {
BindingTemplate bindingTemplate = createWADLBinding(serviceQName, getDocTitle(wadlDefinition.getResources().get(i).getDoc()), new URL(wadlDefinition.getResources().get(i).getBase()), wadlDefinition.getResources().get(i));