Hello,
I make a WebServer with this instruction.
how-to-create-a-web-service-project-in-net-using-visual-studio
Was ok. It is running
http://localhost:52683/WebService.asmx
To make it work I had to turn on the IIS.
How can I make the server active without VisualStudio?
After that I created a WSDL file
and creates a proxy class.
C:\Users\freitag\source\repos\WebServiceProject>wsdl /par Test.wsdl
Microsoft (R)-WSDL-Hilfsprogramm (Web Services Description Language)
[Microsoft (R) .NET Framework, Version 4.6.1055.0]
Copyright (C) Microsoft Corporation. All rights reserved.
Datei 'C:\Users\freitag\source\repos\WebServiceProject\WebService.cs' wird geschrieben
C:\Users\freitag\source\repos\WebServiceProject>
Is this way right?
Then a C# client and I can call the functions. The question is how can I start the server without Visual Studio so I can test the client.
Can I also write a function that returns a json object. Do you have an example for this?
private void Form1_Load(object sender, EventArgs e)
{
using (WebService testClient= new WebService())
{
string test1 = testClient.HelloWorld();
List<int> lstTest = new List<int>();
lstTest.Add(7);
lstTest.Add(7);
lstTest.Add(7);
lstTest.Add(7);
int result = testClient.Add(lstTest.ToArray());
}
}


Could I also implement an ASMX file in the client? Do I necessarily need a WSDL file?






