import javax.xml.registry.*; public class JAXRRegister extends RegistryClient { static String JAXRFactory = new String("JAXRConnectionFactory"); // // The two onException and onResponse methods are defined by the RegistryClient // interface to support asynch. messaging. // void onException() { }; void onResponse() { }; Connection getConnection(){ // . . . Exactly like searching } void Register() { Connection conn = getConnection(); Registry Service rs = conn.getRegistryService(); BusinessLifeCycleManager lcm = rs.getBusinessLifeCycleManager(); Organization org = lcm.createOrganization("Lumber Yards of Nashua"); org.setDescription("All the wood you'll ever need!"); ClassificationScheme cs = lcm.createClassificationScheme("ntis-gov:naics", "North Marican Industry CLassification System"); // our unique UUID infomodel.Key ckey = lcm.createKey("uuid:C0AABBCC-3333-AB66-000011113333"); cs.setKey(cKey); Classification cf = (Classification)lcm.createClassification(cs,"Lumber and Lumber Yards","11111"); Collection classifications = new ArrayList(); classifications.add(cf); org.addClassifications(classifications); Collection orgs = new ArrayList(); orgs.add (org); lcm.saveOrganization(orgs); } }