I'm trying to call an external API. I have used a WSDL file to generate the service code, and now I want to call an endpoint. I have a class that I want to use to send an agreement to the external API as shown below. The CreateAgreement function is just to create an agreement-object that the external API can receive.
My program.cs looks like this:
When I start the program it just opens up my web browser that says "Hello world!" and nothing else happens. I feel like I am missing something very basic here, but all the tutorials I find just say "just make a client and call the method", but isn't that what I'm doing in the SendAgreement() function? How do I call the desired endpoint?
AgreementPortTypeClient implementation: