コード例 #1
0
 public void xr_subscriptionFilter()
 {
     Console.Out.WriteLine("serialization xr_subscriptionFilter");
     subscriptionFilter r = new subscriptionFilter();
     XmlSerializer xr = new XmlSerializer(typeof(subscriptionFilter));
     StringWriter sw = new StringWriter();
     xr.Serialize(sw, r);
     System.Console.Out.WriteLine(sw.ToString());
 }
コード例 #2
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();
            }
        }