/** * This calls a jUDDI implementation specific API call and is used to * help configure internode communication between jUDDI servers. This is * NOT part of the UDDI specification.<br> * Note: this API call should only be used with secure ports (SSL/TLS) * * @param node * @return a node or null if registration fails */ public NodeDetail saveNode(Node node) { NodeDetail nodeDetail = null; try { log.info("Sending Node " + node.getName() + " info to jUDDI " + getUDDINode(node).getName()); SaveNode saveNode = new SaveNode(); saveNode.setAuthInfo(getAuthToken(node.getSecurityUrl())); saveNode.getNode().add(node); nodeDetail = getUDDINode(node).getTransport().getJUDDIApiService(node.getJuddiApiUrl()).saveNode(saveNode); } catch (Exception e) { log.error("Unable to save node " + node.getName() + " ." + e.getMessage(), e); } catch (Throwable t) { log.error("Unable to save node " + node.getName() + " ." + t.getMessage(), t); } return nodeDetail; }
org.apache.juddi.model.Node node2 = em.find(org.apache.juddi.model.Node.class, apiClerk.getNode().getName()); if (node2 == null) {
org.apache.juddi.model.Node node2 = em.find(org.apache.juddi.model.Node.class, apiClerk.getNode().getName()); if (node2 == null) {
/** * Registers services to UDDI using a clerk, and the uddi.xml * configuration. */ public void registerAnnotatedServices() { Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks(); if (uddiClerks.size() > 0) { AnnotationProcessor ap = new AnnotationProcessor(); for (UDDIClerk uddiClerk : uddiClerks.values()) { Collection<BusinessService> services = ap.readServiceAnnotations( uddiClerk.getClassWithAnnotations(), uddiClerk.getUDDINode().getProperties()); for (BusinessService businessService : services) { log.info("Node=" + uddiClerk.getUDDINode().getApiNode().getName()); uddiClerk.register(businessService, uddiClerk.getUDDINode().getApiNode()); } } } }
Class<?> transportClass = ClassUtil.forName(clazz, this.getClass()); Transport transport = (Transport) transportClass.getConstructor(String.class ).newInstance(fromClerk.getNode().getName()); UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService(fromClerk.getNode().getSubscriptionUrl()); SubscriptionResultsList list = subscriptionService.getSubscriptionResults(getSubscriptionResult);
Class<?> transportClass = ClassUtil.forName(clazz, this.getClass()); Transport transport = (Transport) transportClass.getConstructor(String.class ).newInstance(fromClerk.getNode().getName()); UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService(fromClerk.getNode().getSubscriptionUrl()); SubscriptionResultsList list = subscriptionService.getSubscriptionResults(getSubscriptionResult);
public void validateClerk(EntityManager em, org.apache.juddi.api_v3.Clerk clerk) throws DispositionReportFaultMessage { // No null input if (clerk == null) throw new ValueNotAllowedException(new ErrorMessage("errors.clerk.NullInput")); String name = clerk.getName(); if (name == null || name.length() == 0) throw new ValueNotAllowedException(new ErrorMessage("errors.clerk.NoName")); String publisherName = clerk.getPublisher(); if (publisherName == null || publisherName.length() == 0) throw new ValueNotAllowedException(new ErrorMessage("errors.clerk.NoPublisherName")); Node node = clerk.getNode(); if (node == null) throw new ValueNotAllowedException(new ErrorMessage("errors.clerk.NullNodeInput")); String nodeName = node.getName(); if (nodeName == null || nodeName.length() == 0) throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName")); //make sure node exists //edit, doesn't matter if it doesn't exist, it'll be created on save of the clerk /*Object obj = em.find(org.apache.juddi.model.Node.class, nodeName); if (obj == null) throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NodeNotFound", nodeName)); */ }
public void validateClerk(EntityManager em, org.apache.juddi.api_v3.Clerk clerk) throws DispositionReportFaultMessage { // No null input if (clerk == null) throw new ValueNotAllowedException(new ErrorMessage("errors.clerk.NullInput")); String name = clerk.getName(); if (name == null || name.length() == 0) throw new ValueNotAllowedException(new ErrorMessage("errors.clerk.NoName")); String publisherName = clerk.getPublisher(); if (publisherName == null || publisherName.length() == 0) throw new ValueNotAllowedException(new ErrorMessage("errors.clerk.NoPublisherName")); Node node = clerk.getNode(); if (node == null) throw new ValueNotAllowedException(new ErrorMessage("errors.clerk.NullNodeInput")); String nodeName = node.getName(); if (nodeName == null || nodeName.length() == 0) throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName")); //make sure node exists //edit, doesn't matter if it doesn't exist, it'll be created on save of the clerk /*Object obj = em.find(org.apache.juddi.model.Node.class, nodeName); if (obj == null) throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NodeNotFound", nodeName)); */ }
String name = node.getName(); if (name == null || name.length() == 0 || name.length()>255 || node.getClientName()==null|| node.getClientName().length() > 255) { throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName"));
String name = node.getName(); if (name == null || name.length() == 0 || name.length()>255 || node.getClientName()==null|| node.getClientName().length() > 255) { throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName"));
log.debug("Found business with key " + existingBusinessEntity.getBusinessKey() + ". No need to add it again"); } else { log.info("Business was not found in the destination UDDI " + toClerk.getNode().getName() + ", going to add it in."); new XRegistration(serviceInfo.getBusinessKey(), new UDDIClerk(fromClerk), new UDDIClerk(toClerk)).xRegisterBusiness(); log.debug("Found business with key " + existingBusinessEntity.getBusinessKey() + ". No need to add it again"); } else { log.info("Business was not found in the destination UDDI " + toClerk.getNode().getName() + ", going to add it in."); new XRegistration(service.getBusinessKey(), new UDDIClerk(fromClerk), new UDDIClerk(toClerk)).xRegisterBusiness(); log.debug("Found business with key " + existingBusinessEntity.getBusinessKey() + ". No need to add it again"); } else { log.info("Business was not found in the destination UDDI " + toClerk.getNode().getName() + ", going to add it in."); new XRegistration(fromService.getBusinessKey(), new UDDIClerk(fromClerk), new UDDIClerk(toClerk)).xRegisterBusiness(); log.info("Service was not found in the destination UDDI " + toClerk.getNode().getName() + ", going to add it in."); new XRegistration(fromService.getServiceKey(), new UDDIClerk(fromClerk), new UDDIClerk(toClerk)).xRegisterService();
log.debug("Found business with key " + existingBusinessEntity.getBusinessKey() + ". No need to add it again"); } else { log.info("Business was not found in the destination UDDI " + toClerk.getNode().getName() + ", going to add it in."); new XRegistration(serviceInfo.getBusinessKey(), new UDDIClerk(fromClerk), new UDDIClerk(toClerk)).xRegisterBusiness(); log.debug("Found business with key " + existingBusinessEntity.getBusinessKey() + ". No need to add it again"); } else { log.info("Business was not found in the destination UDDI " + toClerk.getNode().getName() + ", going to add it in."); new XRegistration(service.getBusinessKey(), new UDDIClerk(fromClerk), new UDDIClerk(toClerk)).xRegisterBusiness(); log.debug("Found business with key " + existingBusinessEntity.getBusinessKey() + ". No need to add it again"); } else { log.info("Business was not found in the destination UDDI " + toClerk.getNode().getName() + ", going to add it in."); new XRegistration(fromService.getBusinessKey(), new UDDIClerk(fromClerk), new UDDIClerk(toClerk)).xRegisterBusiness(); log.info("Service was not found in the destination UDDI " + toClerk.getNode().getName() + ", going to add it in."); new XRegistration(fromService.getServiceKey(), new UDDIClerk(fromClerk), new UDDIClerk(toClerk)).xRegisterService();
public UDDINode(Node node) { super(); name = node.getName(); clientName = node.getClientName(); description = node.getDescription(); custodyTransferUrl = node.getCustodyTransferUrl(); inquiryUrl = node.getInquiryUrl(); //TODO need juddi schema updat inquiryRESTUrl = node.getInquiryRESTUrl() publishUrl = node.getPublishUrl(); securityUrl = node.getSecurityUrl(); subscriptionUrl = node.getSubscriptionUrl(); subscriptionListenerUrl = node.getSubscriptionListenerUrl(); replicationUrl=node.getReplicationUrl(); juddiApiUrl = node.getJuddiApiUrl(); proxyTransport = node.getProxyTransport(); factoryInitial = node.getFactoryInitial(); factoryURLPkgs = node.getFactoryURLPkgs(); factoryNamingProvider = node.getFactoryNamingProvider(); }
/** * * @param apiNode * @param modelNode */ public static void mapNode(org.apache.juddi.api_v3.Node apiNode, org.apache.juddi.model.Node modelNode) { if (apiNode != null) { modelNode.setCustodyTransferUrl(apiNode.getCustodyTransferUrl()); modelNode.setInquiryUrl(apiNode.getInquiryUrl()); modelNode.setJuddiApiUrl(apiNode.getJuddiApiUrl()); modelNode.setName(apiNode.getName()); modelNode.setClientName(apiNode.getClientName()); modelNode.setProxyTransport(apiNode.getProxyTransport()); modelNode.setPublishUrl(apiNode.getPublishUrl()); modelNode.setSecurityUrl(apiNode.getSecurityUrl()); modelNode.setSubscriptionUrl(apiNode.getSubscriptionUrl()); modelNode.setSubscriptionListenerUrl(apiNode.getSubscriptionListenerUrl()); modelNode.setReplicationUrl(apiNode.getReplicationUrl()); modelNode.setFactoryInitial(apiNode.getFactoryInitial()); modelNode.setFactoryNamingProvider(apiNode.getFactoryNamingProvider()); modelNode.setFactoryURLPkgs(apiNode.getFactoryURLPkgs()); } }
/** * * @param apiNode * @param modelNode */ public static void mapNode(org.apache.juddi.api_v3.Node apiNode, org.apache.juddi.model.Node modelNode) { if (apiNode != null) { modelNode.setCustodyTransferUrl(apiNode.getCustodyTransferUrl()); modelNode.setInquiryUrl(apiNode.getInquiryUrl()); modelNode.setJuddiApiUrl(apiNode.getJuddiApiUrl()); modelNode.setName(apiNode.getName()); modelNode.setClientName(apiNode.getClientName()); modelNode.setProxyTransport(apiNode.getProxyTransport()); modelNode.setPublishUrl(apiNode.getPublishUrl()); modelNode.setSecurityUrl(apiNode.getSecurityUrl()); modelNode.setSubscriptionUrl(apiNode.getSubscriptionUrl()); modelNode.setSubscriptionListenerUrl(apiNode.getSubscriptionListenerUrl()); modelNode.setReplicationUrl(apiNode.getReplicationUrl()); modelNode.setFactoryInitial(apiNode.getFactoryInitial()); modelNode.setFactoryNamingProvider(apiNode.getFactoryNamingProvider()); modelNode.setFactoryURLPkgs(apiNode.getFactoryURLPkgs()); } }