Ejemplo n.º 1
0
        public void TestAutomatedAnnotatedClassRegistration()
        {
            //TODO
            //Normally, this code snippet would be executed by some kind of web service life cycle listener
            //such as global.asax
            //a web service contructor
            Type t = typeof(HelloImpl);

            Console.Out.WriteLine(t.AssemblyQualifiedName);
            UDDIClient clerkManager = null;
            Transport  transport    = null;
            UDDIClerk  clerk        = null;

            clerkManager = new UDDIClient("resource/uddi-autoregAnnotations.xml");

            transport = clerkManager.getTransport("default");

            org.uddi.apiv3.UDDI_Security_SoapBinding security = transport.getUDDISecurityService();
            org.uddi.apiv3.UDDI_Inquiry_SoapBinding  inquiry  = transport.getUDDIInquiryService();

            clerk = clerkManager.getClerk("default");
            clerkManager.registerAnnotatedServices();

            //TODO confirm it registered

            //this is more of an "onShutdown" event
            clerkManager.unRegisterAnnotatedServices();
            //Thread.Sleep(15000);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Type t = typeof(HelloWorldWCF);

            Console.Out.WriteLine(t.AssemblyQualifiedName);
            UDDIClient clerkManager = null;
            Transport  transport    = null;
            UDDIClerk  clerk        = null;

            clerkManager = new UDDIClient("uddi.xml");

            transport = clerkManager.getTransport("default");

            org.uddi.apiv3.UDDI_Security_SoapBinding security = transport.getUDDISecurityService();
            org.uddi.apiv3.UDDI_Inquiry_SoapBinding  inquiry  = transport.getUDDIInquiryService();

            clerk = clerkManager.getClerk("default");
            clerkManager.registerAnnotatedServices();
            HelloWorldWCF x = new HelloWorldWCF();

            //   clerkManager.unRegisterAnnotatedServices();
            Thread.Sleep(15000);
        }
Ejemplo n.º 3
0
 public void run()
 {
     try
     {
         if (UDDIClientContainer.getUDDIClient(uddiClient.getName()) != null && uddiClient.getClientConfig().isRegisterOnStartup())
         {
             log.debug("Starting UDDI Clerks for uddiClient " + uddiClient.getClientConfig().getClientName() + "...");
             uddiClient.saveClerkAndNodeInfo();
             uddiClient.registerAnnotatedServices();
             uddiClient.registerWSDLs();
             uddiClient.xRegister();
             log.debug("Clerks started succesfully for uddiClient " + uddiClient.getClientConfig().getClientName());
         }
         else
         {
             log.debug(uddiClient.getName() + " already registered to the UDDIClientContainer.");
         }
     }
     catch (Exception e)
     {
         log.error(e.Message, e);
     }
 }