Exemplo n.º 1
0
        void GetCompanies(string accessToken, string clusterUrl)
        {
            var processXmlService = new ProcessXmlSoapClient(
                new BasicHttpsBinding(),
                new EndpointAddress(clusterUrl + "/webservices/processxml.asmx"));

            var result = processXmlService.ProcessXmlString(
                new Header {
                AccessToken = accessToken
            },
                "<list><type>offices</type></list>");

            var doc     = XDocument.Parse(result);
            var offices = doc.Root?.Elements("office").ToArray();

            Log($"Found {offices?.Length} companies");
            if (offices != null)
            {
                foreach (var office in offices)
                {
                    Log($"{office.Attribute("name")?.Value} [{office.Value}]");
                }
            }
        }
Exemplo n.º 2
0
 public ProcessXmlSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(ProcessXmlSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemplo n.º 3
0
 public ProcessXmlSoapClient(EndpointConfiguration endpointConfiguration) :
     base(ProcessXmlSoapClient.GetBindingForEndpoint(endpointConfiguration), ProcessXmlSoapClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }