Example #1
0
 public UddiPublisher(string publishurl, string securityurl, string username, string encryptedPassword, bool authrequired)
 {
     publishclient = LoaderP(publishurl);
     if (authrequired)
     {
         securityclient = LoaderS(securityurl);
         this.authrequired = authrequired;
         this.username = username;
         this.encryptedpassword = encryptedPassword;
     }
 }
Example #2
0
        private UDDI_Publication_PortType LoaderP(string url)
        {
            BasicHttpBinding b = null;

            if (url.StartsWith("https://", StringComparison.CurrentCultureIgnoreCase))
            {
                b = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
            }
            else
            {
                b = new BasicHttpBinding(BasicHttpSecurityMode.None);
            }
            b.MaxBufferSize          = Int32.MaxValue;
            b.MaxReceivedMessageSize = Int32.MaxValue;
            b.MaxBufferPoolSize      = Int32.MaxValue;
            b.TransferMode           = TransferMode.Buffered;
            b.Name = "UddiBinding";
            b.ReaderQuotas.MaxArrayLength         = Int32.MaxValue;
            b.ReaderQuotas.MaxBytesPerRead        = Int32.MaxValue;
            b.ReaderQuotas.MaxDepth               = Int32.MaxValue;
            b.ReaderQuotas.MaxNameTableCharCount  = Int32.MaxValue;
            b.ReaderQuotas.MaxStringContentLength = Int32.MaxValue;
            b.ReceiveTimeout     = new TimeSpan(0, 0, 30);
            b.SendTimeout        = new TimeSpan(0, 0, 30);
            b.UseDefaultWebProxy = true;
            b.TextEncoding       = Encoding.UTF8;
            b.OpenTimeout        = new TimeSpan(0, 0, 5);
            //b.Namespace = "urn:org.miloss.FGSMS.services.interfaces.policyConfiguration";
            b.MessageEncoding = WSMessageEncoding.Text;
            b.CloseTimeout    = new TimeSpan(0, 0, 5);

            ChannelFactory <UDDI_Publication_PortType> factory =
                new ChannelFactory <UDDI_Publication_PortType>(b, url);
            UDDI_Publication_PortType polservice = factory.CreateChannel();

            return(polservice);
        }