Beispiel #1
0
        /**
         * This will setup new a business, service, and binding template that's
         * versioned per the article linked above
         */
        private void Setup()
        {
            businessEntity be = new businessEntity();

            keygen = clerk.register(UDDIClerk.createKeyGenator(domain_prefix + "keygenerator", "my domain", lang)).tModel[0];

            be.businessKey = (domain_prefix + "zerocoolbiz");
            be.name        = new name[] { new name("ZeroCool Business", lang) };
            businessService bs = new businessService();

            bs.name = new name[] { new name("ZeroCool Service", lang) };

            bs.businessKey = (domain_prefix + "zerocoolbiz");
            bs.serviceKey  = (domain_prefix + "zerocoolsvc");

            //version 1
            bindingTemplate bt1     = new bindingTemplate();
            String          version = "1.0.0.0";

            bt1.bindingKey            = (domain_prefix + "binding10");
            bt1.Item                  = (new accessPoint("http://localhost", "wsdl"));
            bt1.tModelInstanceDetails = new tModelInstanceInfo[] { UDDIClerk.createServiceInterfaceVersion(version, lang) };

            //version 2
            bindingTemplate bt2 = new bindingTemplate();

            bt2.bindingKey = (domain_prefix + "binding12");
            String version2 = "1.2.0.0";

            bt2.Item = (new accessPoint("http://localhost", "wsdl"));
            bt2.tModelInstanceDetails = new tModelInstanceInfo[] { UDDIClerk.createServiceInterfaceVersion(version2, lang) };

            bs.bindingTemplates = new bindingTemplate[] { bt1, bt2 };
            be.businessServices = new businessService[] { bs };
            clerk.register(be);
        }