forked from CoreWCF/CoreWCF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
34 lines (28 loc) · 1.19 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using StandardClient;
namespace NetCoreClient
{
class Program
{
private readonly static string _baseHttpAddress = @"localhost:8088";
private readonly static string _baseHttpsAddress = @"localhost:8443";
private readonly static string _baseTcpAddress = @"localhost:8089";
static void Main(string[] args)
{
var settings = new ClientLogic.Settings
{
basicHttpAddress = $"http://{_baseHttpAddress}/basichttp",
basicHttpsAddress = $"https://{_baseHttpsAddress}/basichttp",
wsHttpAddress = $"http://{_baseHttpAddress}/wsHttp.svc",
wsHttpsAddress = $"https://{_baseHttpsAddress}/wsHttp.svc",
netTcpAddress = $"net.tcp://{_baseTcpAddress }/nettcp"
};
void log(string value) => Console.WriteLine(value);
ClientLogic.CallUsingWcf(settings, log);
string rawSoapResponse = ClientLogic.CallUsingWebRequest(settings.basicHttpAddress);
Console.WriteLine($"Http SOAP Response:\n{rawSoapResponse}");
Console.WriteLine("Hit enter to exit");
Console.ReadLine();
}
}
}