Ejemplo n.º 1
0
        // Recuperare l'elenco degli endpoint esposti dal server
        public ListEndpoint DiscoveryEndpoints(String endpointURL)
        {
            ListEndpoint list = new ListEndpoint();
            var          endpointConfiguration = EndpointConfiguration.Create(config);

            try
            {
                Uri uri = new Uri(endpointURL);

                DiscoveryClient discoveryC = DiscoveryClient.Create(uri, endpointConfiguration);

                endpoints = discoveryC.GetEndpoints(null);

                for (int i = 0; i < endpoints.Count; i++)
                {
                    list.endpointList.Add(
                        new EndpointView(endpoints[i].EndpointUrl, endpoints[i].SecurityMode.ToString(), endpoints[i].TransportProfileUri, i, endpoints[i].SecurityPolicyUri.Split('#')[1]));
                }
                return(list);
            }
            catch (System.UriFormatException)
            {
                return(list = null);
            }
            catch (ServiceResultException p)
            {
                throw new BadConnectException("Impossible to connect to server!", p);
            }
        }
Ejemplo n.º 2
0
 public EndpointsPage(ListEndpoint _list, ClientOPC _client)
 {
     InitializeComponent();
     BindingContext = endpoints;
     storedList     = _list;
     client         = _client;
     displayEndpoints();
 }