Ejemplo n.º 1
0
        public void xr_subscriptionFilterws()
        {
            Console.Out.WriteLine("serialization xr_subscriptionFilterws");
            Console.Out.WriteLine("xr_subscriptionFilterws");
            subscriptionFilter r            = new subscriptionFilter();
            UDDIClient         clerkManager = null;
            Transport          transport    = null;
            UDDIClerk          clerk        = null;

            try
            {
                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();
                org.uddi.apiv3.UDDI_Publication_SoapBinding     publish  = transport.getUDDIPublishService();
                org.uddi.apiv3.UDDI_CustodyTransfer_SoapBinding custody  = transport.getUDDICustodyTransferService();
                org.uddi.apiv3.UDDI_Subscription_SoapBinding    sub      = transport.getUDDISubscriptionService();
                clerk = clerkManager.getClerk("default");

                save_subscription ss = new save_subscription();
                ss.subscription = new subscription[] { new subscription() };
                ss.subscription[0].subscriptionFilter = r;
                sub.save_subscription(ss);
            }
            catch (Exception ex)
            {
                String s = "";
                while (ex != null)
                {
                    s  = s + ex.Message;
                    ex = ex.InnerException;
                }
                if (ContainsSerializationError(s))
                {
                    Assert.Fail(s);
                }
            }
            finally
            {
                if (transport != null && transport is IDisposable)
                {
                    ((IDisposable)transport).Dispose();
                }
                if (clerk != null)
                {
                    clerk.Dispose();
                }
            }
        }
Ejemplo n.º 2
0
        public static void init()
        {
            if (Environment.GetEnvironmentVariable("debug") != null &&
                Environment.GetEnvironmentVariable("debug").Equals("true", StringComparison.CurrentCultureIgnoreCase))
            {
                serialize = true;
            }

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

            transport = clerkManager.getTransport("default");

            security = transport.getUDDISecurityService();
            inquiry  = transport.getUDDIInquiryService();
            publish  = transport.getUDDIPublishService();
            sub      = transport.getUDDISubscriptionService();
            clerk    = clerkManager.getClerk("default");
            node     = clerk.getUDDINode();
            WebClient c = new WebClient();

            Console.Out.WriteLine("Checking to see if tomcat is running");
            String s     = null;
            int    count = 100;

            while (s == null && count > 0)
            {
                try
                {
                    s = c.DownloadString("http://localhost:8080/");
                    Console.Out.WriteLine("Tomcat is running");
                    break;
                }
                catch
                { }
                Console.Out.WriteLine("tomcat isn't running yet, waiting...");
                Thread.Sleep(1000);
            }

            if (s == null)
            {
                Console.Out.WriteLine("Unable to confirm if tomcat is running, aborting");
                online = false;
            }
        }
Ejemplo n.º 3
0
        public static void init()
        {
            if (Environment.GetEnvironmentVariable("debug") != null
                && Environment.GetEnvironmentVariable("debug").Equals("true", StringComparison.CurrentCultureIgnoreCase))
            {
                serialize = true;
            }

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

            transport = clerkManager.getTransport("default");

            security = transport.getUDDISecurityService();
            inquiry = transport.getUDDIInquiryService();
            publish = transport.getUDDIPublishService();
            sub = transport.getUDDISubscriptionService();
            clerk = clerkManager.getClerk("default");
            node = clerk.getUDDINode();
            WebClient c = new WebClient();

            Console.Out.WriteLine("Checking to see if tomcat is running");
            String s = null;
            int count = 100;
            while (s == null && count > 0)
            {
                try
                {
                    s = c.DownloadString("http://localhost:8080/");
                    Console.Out.WriteLine("Tomcat is running");
                    break;
                }
                catch
                { }
                Console.Out.WriteLine("tomcat isn't running yet, waiting...");
                Thread.Sleep(1000);
            }

            if (s == null)
            {
                Console.Out.WriteLine("Unable to confirm if tomcat is running, aborting");
                online = false;
            }
        }
Ejemplo n.º 4
0
        public void xr_subscriptionResultsListws()
        {
            Console.Out.WriteLine("serialization xr_subscriptionResultsListws");
            subscriptionResultsList r = new subscriptionResultsList();
            UDDIClient clerkManager   = null;
            Transport  transport      = null;
            UDDIClerk  clerk          = null;

            try
            {
                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();
                org.uddi.apiv3.UDDI_Publication_SoapBinding     publish  = transport.getUDDIPublishService();
                org.uddi.apiv3.UDDI_CustodyTransfer_SoapBinding custody  = transport.getUDDICustodyTransferService();
                org.uddi.apiv3.UDDI_Subscription_SoapBinding    sub      = transport.getUDDISubscriptionService();
                clerk = clerkManager.getClerk("default");
            }
            catch (Exception ex)
            {
                while (ex != null)
                {
                    System.Console.WriteLine("Error! " + ex.Message);
                    ex = ex.InnerException;
                }
            }
            finally
            {
                if (transport != null && transport is IDisposable)
                {
                    ((IDisposable)transport).Dispose();
                }
                if (clerk != null)
                {
                    clerk.Dispose();
                }
            }
        }