0

I want to access a web page in a Windows Forms app via SOAP.

Unfortunately, the compiler spits out many errors after I added the WCF Web Service to the project. What am I doing wrong here? The possible options don't tell me anything. The examples I found on the Internet could not help me with the errors.

Visual Studio Community 2022

WCF Web Service URI: https://www.onlinembe.de/wsdl/OnlineMbeSOAP.wsdl

[ ] Always generate message contracts
[X] Reuse types in referece assemblies

  • [X] Reuse types in all referenced assemblies

Access level for generated classes:
[X] Public

Compiler Error CS0120
An object reference is required for the non-static field, method or property "ShipmentRequestType.System".

  • Does this answer your question? [CS0120: An object reference is required for the nonstatic field, method, or property 'foo'](https://stackoverflow.com/questions/498400/cs0120-an-object-reference-is-required-for-the-nonstatic-field-method-or-prop) – Timothy G. Aug 03 '22 at 14:40
  • [Examples](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0120) from the official documentation may be helpful. – Jiayao Aug 04 '22 at 06:30

1 Answers1

1

In 'Reference.cs' add 'using System.Xml.Schema;' and replace 'Form=System.Xml.Schema.XmlSchemaForm.Unqualified' with Form='XmlSchemaForm.Unqualified'.