forked from CoreWCF/CoreWCF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
31 lines (25 loc) · 958 Bytes
/
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
using System;
using StandardClient;
using CoreWCF.Samples.StandardCommon;
namespace NetCoreClient
{
class Program
{
/// <remarks>
/// use commanline argument localhost
/// or something similar to indicate the WCF Server hostname
/// </remarks>
static void Main(string[] args)
{
string hostname = args.Length >= 1 ? args[0] : null;
Console.Title = "WCF .Net Core Client";
Settings settings = ClientLogic.BuildClientSettings(hostname);
static void log(string value) => Console.WriteLine(value);
ClientLogic.InvokeEchoServiceUsingWcf(settings, log);
string rawSoapResponse = ClientLogic.InvokeEchoServiceUsingWebRequest(settings.basicHttpAddress);
Console.WriteLine($"Http SOAP Response:\n{rawSoapResponse}");
Console.WriteLine("Hit enter to exit");
Console.ReadLine();
}
}
}