Exemplo n.º 1
0
        /// <summary>
        /// Gets the category.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <param name="tModelName">Name of the t model.</param>
        /// <param name="cKeyName">Name of the category key.</param>
        /// <returns></returns>
        public static string GetCategory(UddiConnection UDDIConnection, string tModelName, string cKeyName)
        {
            Category cat = new Category(GetTModelKey(UDDIConnection, tModelName));

            cat.RelationshipQualifiers.Add(RelationshipQualifier.root);

            GetRelatedCategories grc = new GetRelatedCategories();

            grc.Categories.Add(cat);

            CategoryList list           = grc.Send(UDDIConnection);
            string       categoryKeyVal = "";

            foreach (CategoryInfo info in list.CategoryInfos)
            {
                foreach (CategoryValue cv in info.Roots)
                {
                    categoryKeyVal = GetCategoryItems(UDDIConnection, info.TModelKey, cv.KeyValue, cKeyName);
                    if (!categoryKeyVal.Equals(String.Empty))
                    {
                        return(categoryKeyVal);
                    }
                }
            }

            return("");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the category items.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <param name="tModelKey">The t model key.</param>
        /// <param name="cKeyValue">The category key value.</param>
        /// <param name="cKeyName">Name of the category.</param>
        /// <returns></returns>
        public static string GetCategoryItems(UddiConnection UDDIConnection, string tModelKey, string cKeyValue, string cKeyName)
        {
            Category cat = new Category(tModelKey, cKeyValue);

            cat.RelationshipQualifiers.Add(RelationshipQualifier.child);

            GetRelatedCategories grc = new GetRelatedCategories();

            grc.Categories.Add(cat);

            CategoryList list = grc.Send(UDDIConnection);

            foreach (CategoryInfo info in list.CategoryInfos)
            {
                foreach (CategoryValue cv in info.Children)
                {
                    if (cv.KeyName.Equals(cKeyName))
                    {
                        return(cv.KeyValue);
                    }
                    GetCategoryItems(UDDIConnection, tModelKey, cv.KeyValue, cKeyName);
                }
            }

            return("");
        }
Exemplo n.º 3
0
        public PublishServiceForm(UddiConnection uddiConnection)
        {
            InitializeComponent();

            this.uddiConnection = uddiConnection;

            searchOntologies();
        }
Exemplo n.º 4
0
        public CreateOntologyForm(UddiConnection uddiConnection)
        {
            this.uddiConnection = uddiConnection;
            this.availableProperties = new Properties();

            InitializeComponent();

            SetProperties();
            PopulateWithAvailableProperties();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Deletes the business's all services.
        /// </summary>
        /// <param name="uConn">The UDDI connection.</param>
        /// <param name="pName">Name of the provider</param>
        public static void DeleteBusinessAllServices(UddiConnection uConn, string pName)
        {
            BusinessEntity businessEntity = UDDISearcher.GetBusinessEntity(uConn, UDDISearcher.GetBusinessKey(uConn, pName));

            foreach (BusinessService businessService in businessEntity.BusinessServices)
            {
                DeleteService dService = new DeleteService(businessService.ServiceKey);
                dService.Send(uConn);
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Gets the Tmodel key.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <param name="tMName">Name of the tModel.</param>
        /// <returns></returns>
        public static string GetTModelKey(UddiConnection UDDIConnection, string tMName)
        {
            FindTModel findTModel = new FindTModel(tMName);
            TModelList tMList     = findTModel.Send(UDDIConnection);

            if (tMList.TModelInfos.Count > 0)
            {
                return(tMList.TModelInfos[0].TModelKey);
            }
            return(String.Empty);
        }
Exemplo n.º 7
0
        public ConnectionForm(UddiConnection uddiConnection)
        {
            InitializeComponent();

            this.uddiConnection = uddiConnection;

            txbInquireURL.Text  = uddiConnection.InquireUrl;
            txbPublishURL.Text  = uddiConnection.PublishUrl;
            txbUsername.Text    = uddiConnection.Username;
            txbPassword.Text    = uddiConnection.Password;
        }
Exemplo n.º 8
0
        /// <summary>
        ///   Callback-ul apelat după completarea unui ConnectionForm.
        ///   Stocheaza informatiile privind conexiunea la serverul UDDI.
        /// </summary>
        private void connectionForm_ConnectionUpdated(object sender, ConnectionUpdateEventArgs e)
        {
            uddiConnection = new UddiConnection();

            uddiConnection.InquireUrl = e.InquireURL;
            uddiConnection.PublishUrl = e.PublishURL;
            uddiConnection.Username   = e.Username;
            uddiConnection.Password   = e.Password;

            uddiConnection.AuthenticationMode = AuthenticationMode.UddiAuthentication;
        }
Exemplo n.º 9
0
        /// <summary>
        /// Gets the service key from service name.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <param name="sName">Name of the service.</param>
        /// <returns></returns>
        public static string GetServiceKey(UddiConnection UDDIConnection, string sName)
        {
            FindService findService = new FindService(sName);
            ServiceList bList       = findService.Send(UDDIConnection);

            if (bList.ServiceInfos.Count > 0)
            {
                return(bList.ServiceInfos[0].ServiceKey);
            }
            return(String.Empty);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Gets the business key.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <param name="pName">Name of the provider.</param>
        /// <returns></returns>
        public static string GetBusinessKey(UddiConnection UDDIConnection, string pName)
        {
            FindBusiness findBusiness = new FindBusiness(pName);
            BusinessList bList        = findBusiness.Send(UDDIConnection);

            if (bList.BusinessInfos.Count > 0)
            {
                return(bList.BusinessInfos[0].BusinessKey);
            }
            return(String.Empty);
        }
Exemplo n.º 11
0
        /// <summary>
        /// Creates the UDDI connection with windows authentication.
        /// </summary>
        /// <param name="UDDIURL">The UDDIURL.</param>
        /// <returns></returns>
        public static UddiConnection CreateUDDIConnection(string UDDIURL)
        {
            UddiSiteLocation usc = new UddiSiteLocation(
                UDDIURL + "/inquire.asmx",
                UDDIURL + "/publish.asmx",
                UDDIURL + "/extension.asmx",
                "UDDI",
                AuthenticationMode.WindowsAuthentication);
            UddiConnection UDDIConnection = new UddiConnection(usc);

            return(UDDIConnection);
        }
Exemplo n.º 12
0
        /// <summary>
        /// Creates the UDDI connection .
        /// </summary>
        /// <param name="UDDIURL">The UDDIURL with uddi authentication.</param>
        /// <param name="UDDICUsername">The UDDIC username.</param>
        /// <param name="UDDICPassword">The UDDIC password.</param>
        /// <returns></returns>
        public static UddiConnection CreateUDDIConnection(string UDDIURL, string UDDICUsername, string UDDICPassword)
        {
            UddiSiteLocation usc = new UddiSiteLocation(
                UDDIURL + "/inquire.asmx",
                UDDIURL + "/publish.asmx",
                UDDIURL + "/extension.asmx",
                "UDDI",
                AuthenticationMode.UddiAuthentication);
            UddiConnection UDDIConnection = new UddiConnection(usc, UDDICUsername, UDDICPassword);

            return(UDDIConnection);
        }
Exemplo n.º 13
0
        /// <summary>
        /// Determines whether there is any service on the business or not.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <param name="pName">Name of the provider</param>
        /// <returns>
        ///   <c>true</c> if [is service exists] [the specified UDDI connection]; otherwise, <c>false</c>.
        /// </returns>
        public static bool IsServiceExists(UddiConnection UDDIConnection, string pName)
        {
            FindBusiness findBusiness = new FindBusiness(pName);

            findBusiness.FindQualifiers.Add(FindQualifier.ApproximateMatch);
            BusinessList bList = findBusiness.Send(UDDIConnection);

            if (bList.BusinessInfos[0].ServiceInfos.Count > 0)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 14
0
        /// <summary>
        /// Gets the service object.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <param name="sName">Name of the service.</param>
        /// <returns></returns>
        public static BusinessService GetService(UddiConnection UDDIConnection, string sName)
        {
            GetServiceDetail sDetailObjList = new GetServiceDetail();

            sDetailObjList.ServiceKeys.Add(GetServiceKey(UDDIConnection, sName));
            ServiceDetail sDetailObj = sDetailObjList.Send(UDDIConnection);

            if (sDetailObj.BusinessServices.Count > 0)
            {
                return(sDetailObj.BusinessServices[0]);
            }
            return(null);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Gets all MSE full path of the service from MSE web service.
        /// </summary>
        /// <returns></returns>

        /*public static string[] GetAllMSEServices()
         * {
         *  MSEServiceCatalogue.ServiceModelClient serviceCatalogue = new MSEServiceCatalogue.ServiceModelClient("NetTcpBinding_ServiceModel");
         *  return serviceCatalogue.GetVirtualizedURLs("localRS");
         * }*/

        /// <summary>
        /// Gets all businesses.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <returns></returns>
        public static List <string> GetAllBusinesses(UddiConnection UDDIConnection)
        {
            List <string> retList      = new List <string>();
            FindBusiness  findBusiness = new FindBusiness("%");

            findBusiness.FindQualifiers.Add(FindQualifier.ApproximateMatch);
            BusinessList bList = findBusiness.Send(UDDIConnection);

            foreach (BusinessInfo bInfo in bList.BusinessInfos)
            {
                retList.Add(bInfo.Names[0].Text);
            }
            return(retList);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Gets the business entity object.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <param name="bKey">The business key.</param>
        /// <returns></returns>
        public static BusinessEntity GetBusinessEntity(UddiConnection UDDIConnection, string bKey)
        {
            if (!String.IsNullOrEmpty(bKey))
            {
                GetBusinessDetail bDetailObject = new GetBusinessDetail();

                bDetailObject.BusinessKeys.Add(bKey);
                BusinessDetail businessDetail = bDetailObject.Send(UDDIConnection);
                if (businessDetail.BusinessEntities.Count > 0)
                {
                    return(businessDetail.BusinessEntities[0]);
                }
            }
            return(null);
        }
Exemplo n.º 17
0
        /// <summary>
        /// Gets all T models.
        /// </summary>
        /// <param name="UDDIConnection">The UDDI connection.</param>
        /// <returns></returns>
        public static List <string> GetAllTModels(UddiConnection UDDIConnection)
        {
            List <string> retList    = new List <string>();
            FindTModel    findTModel = new FindTModel("%");

            findTModel.FindQualifiers.Add(FindQualifier.ApproximateMatch);
            findTModel.FindQualifiers.Add(FindQualifier.SortByNameAscending);
            TModelList tMList = findTModel.Send(UDDIConnection);

            foreach (TModelInfo tMInfo in tMList.TModelInfos)
            {
                retList.Add(tMInfo.Name.Text);
            }
            return(retList);
        }
Exemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UDDIManagement"/> class.
 /// </summary>
 /// <param name="UDDIURL">The UDDIURL.</param>
 public UDDIManagement(string UDDIURL)
 {
     try
     {
         UDDIConnection = UDDIDataCreater.CreateUDDIConnection(UDDIURL);
         if (null != UDDIConnection)
         {
             isConnected = true;
             GenerateServiceResponseTypesDictionary();
             GenerateServiceSecurityTypesDictionary();
             GenerateServiceNameListDictionary();
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Unable to connect to UDDI Server " + ex.Message);
     }
 }
Exemplo n.º 19
0
        public SearchOntologyForm(UddiConnection uddiConnection)
        {
            InitializeComponent();

            this.uddiConnection = uddiConnection;
        }
Exemplo n.º 20
0
        /// <summary>
        ///		Entry Point
        /// </summary>
        public static void Main( )
        {
            //
            // Attempt to find the first site listed in Active Directory
            //
            UddiSiteLocation location = GetFirstLocation(AuthenticationMode.WindowsAuthentication);

            //
            // Create a location if no location was returned from Active Directory
            // These settings use the default access points for UDDI Services and Windows Authentication
            // TODO: Update with actual servername
            //

            string httpServerName  = "http://servername/uddi/";
            string httpsServerName = "https://servername/uddi/";

            if (null == location)
            {
                location = new UddiSiteLocation(
                    httpServerName + "inquire.asmx",
                    httpsServerName + "publish.asmx",
                    httpServerName + "extension.asmx",
                    "My Site",
                    AuthenticationMode.WindowsAuthentication);
            }

            //
            // Create the connection object.
            //
            _connection = new UddiConnection(location);


            Console.WriteLine("Current Data");

            //
            // Display the current entities owned by this publisher
            //
            DisplayOwnedEntities();

            Console.WriteLine("Saving New Data");

            //
            // Create a new Provider.
            //
            BusinessEntity entity = SaveNewProvider("My New Provider Name", "Description of my new Provider");

            //
            // Add a new Service to that provider
            //
            AddService(entity, "My New Service", "Description for my new Service");

            Console.WriteLine("New Data");

            //
            // Display the currently owned entities again.
            //
            DisplayOwnedEntities();

            Console.WriteLine("Taxonomy Data");

            //
            // Display the taxonomy information for UddiOrgTypes.
            //
            DisplayTaxonomy(CommonCanonical.UddiOrgTypes);
        }
Exemplo n.º 21
0
        public SearchOntology(UddiConnection uddiConnection, String ontologyName, Boolean caseSensitive, Boolean exactMatch)
        {
            this.uddiConnection = uddiConnection;

            this.ontologyName   = ontologyName;
            this.caseSensitive  = caseSensitive;
            this.exactMatch     = exactMatch;
        }
Exemplo n.º 22
0
        public SearchOntology(UddiConnection uddiConnection)
        {
            this.uddiConnection = uddiConnection;

            this.ontologyName   = "%";
            this.caseSensitive  = false;
            this.exactMatch     = false;
        }
Exemplo n.º 23
0
 public SearchService(UddiConnection uddiConnection, String businessName, String serviceName, String[] ontologyAttributes, Boolean caseSensitive, Boolean exactMatch)
 {
     this.uddiConnection     = uddiConnection;
     this.businessName       = businessName;
     this.serviceName        = serviceName;
     this.ontologyAttributes = ontologyAttributes;
     this.caseSensitive      = caseSensitive;
     this.exactMatch         = exactMatch;
 }
Exemplo n.º 24
0
        /// <summary>
        ///   Reinnoieste toate functionalitatile.
        /// </summary>
        public void updateFunctionalities(string UDDIAddress)
        {
            this._functionalities = new List<Functionality>();

            try
            {

                UddiConnection uddiConnection = new UddiConnection(UDDIAddress);

                FindTModel findTModel = new FindTModel();

                // uuid:a035a07c-f362-44dd-8f95-e2b134bf43b4  == uddi-org:general_keywords key
                KeyedReference categoryOntology = new KeyedReference("uuid:a035a07c-f362-44dd-8f95-e2b134bf43b4", "ontology", "QoS");

                findTModel.CategoryBag.Add(categoryOntology);

                TModelList tModelList = findTModel.Send(uddiConnection);

                foreach (TModelInfo tModelInfo in tModelList.TModelInfos)
                {

                    // Provide the unique tModel key.
                    GetTModelDetail getTModelDetail = new GetTModelDetail(tModelInfo.TModelKey);

                    // Send the GetTModelDetail request over the connection.
                    TModelDetail tModelDetail = getTModelDetail.Send(uddiConnection);

                    this.addFunctionalityFromXml(tModelDetail.TModels[0].TModelKey, tModelDetail.TModels[0].OverviewDoc.OverviewUrl);
                }

                this._lastError = null;
            }
            catch (UddiException e)
            {

                this._lastError = "Uddi error: " + e.Message;
            }
            catch (Exception e)
            {

                this._lastError = "General exception: " + e.Message;
            }
        }
Exemplo n.º 25
0
        /// <summary>
        ///   Indică apăsarea butonului pentru modificarea informatiilor privind conexiunea la serverul UDDI.
        ///   Salveaza informatiile daca s-au facut modificari.
        /// </summary>
        private void btnUDDIConnection_Click(object sender, EventArgs e)
        {
            UddiConnection uddiConnection = connection.getUddiConnection();

            if (uddiConnection != null) {

                this.uddiConnection = uddiConnection;
            }
        }
Exemplo n.º 26
0
 public CategoryTreeView(UddiConnection connection) : this()
 {
     _connection = connection;
 }
Exemplo n.º 27
0
        /// <summary>
        /// Saves the business service.
        /// </summary>
        /// <param name="uConn">The UDDI connection.</param>
        /// <param name="bService">The business service.</param>
        public static void SaveBusinessService(UddiConnection uConn, BusinessService bService)
        {
            SaveService sService = new SaveService(bService);

            sService.Send(uConn);
        }
Exemplo n.º 28
0
        /// <summary>
        /// Deletes the binding template.
        /// </summary>
        /// <param name="uConn">The UDDI connection.</param>
        /// <param name="bTemplate">The binding template.</param>
        public static void DeleteBindingTemplate(UddiConnection uConn, BindingTemplate bTemplate)
        {
            DeleteBinding dBinding = new DeleteBinding(bTemplate.BindingKey);

            dBinding.Send(uConn);
        }
Exemplo n.º 29
0
        /// <summary>
        /// Saves the business entity.
        /// </summary>
        /// <param name="uConn">The UDDI connection.</param>
        /// <param name="bEntity">The business entity.</param>
        public static void SaveBusinessEntity(UddiConnection uConn, BusinessEntity bEntity)
        {
            SaveBusiness sBusiness = new SaveBusiness(bEntity);

            sBusiness.Send(uConn);
        }
Exemplo n.º 30
0
        /// <summary>
        /// Deletes the business entity.
        /// </summary>
        /// <param name="uConn">The UDDI connection.</param>
        /// <param name="bEntity">The business entity.</param>
        public static void DeleteBusinessEntity(UddiConnection uConn, BusinessEntity bEntity)
        {
            DeleteBusiness dBusiness = new DeleteBusiness(bEntity.BusinessKey);

            dBusiness.Send(uConn);
        }
Exemplo n.º 31
0
        /// <summary>
        /// Deletes the business service.
        /// </summary>
        /// <param name="uConn">The UDDI connection.</param>
        /// <param name="bServiceKey">The business service key.</param>
        public static void DeleteBusinessService(UddiConnection uConn, string bServiceKey)
        {
            DeleteService dService = new DeleteService(bServiceKey);

            dService.Send(uConn);
        }
Exemplo n.º 32
0
 /// <summary>
 /// Saves the T model.
 /// </summary>
 /// <param name="uConn">The UDDI connection.</param>
 /// <param name="tModel">The t model.</param>
 public static void SaveTModel(UddiConnection uConn, TModel tModel)
 {
     SaveTModel   sTModel = new SaveTModel(tModel);
     TModelDetail tDetail = sTModel.Send(uConn);
 }
Exemplo n.º 33
0
        /// <summary>
        /// Saves the binding template.
        /// </summary>
        /// <param name="uConn">The UDDI connection.</param>
        /// <param name="bTemplate">The business template.</param>
        public static void SaveBindingTemplate(UddiConnection uConn, BindingTemplate bTemplate)
        {
            SaveBinding sBinding = new SaveBinding(bTemplate);

            sBinding.Send(uConn);
        }
Exemplo n.º 34
0
        public ConnectionForm()
        {
            InitializeComponent();

            this.uddiConnection = null;
        }
Exemplo n.º 35
0
        public OntologyCompositionForm(UddiConnection uddiConnection)
        {
            this.uddiConnection = uddiConnection;

            InitializeComponent();
        }
        /// <summary>
        ///     Face un update al serviciilor retinute.
        /// </summary>
        /// <param name="UDDIAddress">Adresa serverului UDDI (inquire)</param> 
        /// <param name="functionalitiesData">Informatii esentiale despre toate functionalitatile existente, pe baza carora se face cautarea de servicii.</param>
        public void updateServices(string UDDIAddress, string[] functionalitiesData)
        {
            if (functionalitiesData != null)
            {

                try
                {

                    this.services = new Hashtable();

                    UddiConnection uddiConnection = new UddiConnection(UDDIAddress);

                    FindService findService = new FindService("%");

                    ServiceList serviceList = findService.Send(uddiConnection);

                    foreach (ServiceInfo serviceInfo in serviceList.ServiceInfos)
                    {

                        GetServiceDetail getServiceDetail = new GetServiceDetail(serviceInfo.ServiceKey);

                        ServiceDetail serviceDetail = getServiceDetail.Send(uddiConnection);

                        foreach (BindingTemplate bindingTemplate in serviceDetail.BusinessServices[0].BindingTemplates)
                        {

                            Boolean stop = false;

                            for (int k = 0; k < functionalitiesData.Length && !stop; k = k + 3)
                            {

                                for (int j = 0; j < bindingTemplate.TModelInstanceInfos.Count && !stop; ++j)
                                {

                                    if (bindingTemplate.TModelInstanceInfos[j].TModelKey == functionalitiesData[k])
                                    {

                                        stop = true;

                                        string functionalityName = functionalitiesData[k + 1];

                                        string accessPoint = string.Empty;

                                        if (bindingTemplate.AccessPoint.Text.ToLower().EndsWith("asmx"))
                                        {

                                            accessPoint = bindingTemplate.AccessPoint.Text + "?wsdl";
                                        }

                                        if (bindingTemplate.AccessPoint.Text.ToLower().EndsWith("wsdl"))
                                        {

                                            accessPoint = bindingTemplate.AccessPoint.Text;
                                        }

                                        if (accessPoint != string.Empty)
                                        {

                                            XMLElement root = XMLParser.parse(accessPoint);

                                            if (root != null)
                                            {

                                                if (root.containsElements("wsdl:service"))
                                                {

                                                    XMLElement service = root.getElements("wsdl:service")[0];

                                                    if (service.containsAttribute("name"))
                                                    {

                                                        string serviceName = service.getAttribute("name");

                                                        string ontologyPath = functionalitiesData[k + 2];

                                                        if (service.containsAttribute("sawsdl:modelReference"))
                                                        {

                                                            string annotationPath = service.getAttribute("sawsdl:modelReference");

                                                            //specificAnnotationSAWSDL
                                                            this.addSpecificService(serviceName, accessPoint, functionalityName, ontologyPath, annotationPath);
                                                        }
                                                        else
                                                        {

                                                            //defaultAnnotationFromOntology
                                                            this.addDefaultService(serviceName, accessPoint, functionalityName, ontologyPath);
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    this._lastError = null;
                }
                catch (UddiException e)
                {

                    this._lastError = "Uddi error: " + e.Message;
                }
                catch (Exception e)
                {

                    this._lastError = "General exception:" + e.Message;
                }
            }
            else
            {

                this._lastError = "There are no functionalities. Try a functionalities update.";
            }
        }
Exemplo n.º 37
0
        /// <summary>
        /// Deletes the T model.
        /// </summary>
        /// <param name="uConn">The UDDI connection.</param>
        /// <param name="tModel">The t model.</param>
        public static void DeleteTModel(UddiConnection uConn, TModel tModel)
        {
            DeleteTModel dTModel = new DeleteTModel(tModel.TModelKey);

            dTModel.Send(uConn);
        }