/** * Registers a WSDL Definition onto the UDDI node referenced by the * clerk. Note, if registration fails, no exception is thrown * * @param wsdlDefinition - the WSDL Definition * @param keyDomain - the keyDomain which will be used to construct the * UDDI key IDs. If left null the keyDomain defined in the node's * properties will be used. * @param businessKey - the key of the business to which this service * belongs. If left null the businessKey defined in the node's * properties will be used. * */ public void registerWsdls(tDefinitions wsdlDefinition, String keyDomain, String businessKey) { try { Properties properties = new Properties(); properties.putAll(this.getUDDINode().getProperties()); if (keyDomain != null) { properties.setProperty("keyDomain", keyDomain); } if (businessKey != null) { properties.setProperty("businessKey", businessKey); } WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(this, new URLLocalizer(), properties); wsdl2UDDI.registerBusinessServices(wsdlDefinition); } catch (Exception e) { log.error("Unable to register wsdl " + " ." + e.Message, e); } }
/** * Performans the process of parsing the configuration defined wsdls to * UDDI. This is a convenience wrapper Note, if registration fails, no * exception is thrown */ public void registerWsdls() { if (this.getWsdls() != null) { Properties properties = new Properties(); properties.putAll(this.getUDDINode().getProperties()); foreach (WSDL wsdl in this.getWsdls()) { try { ReadWSDL rw = new ReadWSDL(); tDefinitions wsdlDefinition = rw.readWSDL(wsdl.getFileName()); if (wsdl.getKeyDomain() != null) { properties.setProperty("keyDomain", wsdl.getKeyDomain()); } if (wsdl.getBusinessKey() != null) { properties.setProperty("businessKey", wsdl.getBusinessKey()); } WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(this, new URLLocalizer(), properties); wsdl2UDDI.registerBusinessServices(wsdlDefinition); } catch (Exception e) { log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + e.Message, e); } } } }