SAP web service reference in .NET naming conflict issue
Since this issue is caused by naming conflict in .NET and SAP, another workaround for this issue without changing SAP configuration:
Add an alias for System.XML as below in Reference.cs
using SysXml = System.Xml;
Then, replace all the System.Xml where report the error with "SysXml" as below (please note that the word "SysXml" is originally "System.Xml" after adding the service, which caused this issue)
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=SysXml.Schema.XmlSchemaForm.Unqualified)]
public string Type {
get {
return this.typeField;
set {
this.typeField = value;
}
}
The problem is because System namespace in both Windows and BAPI. This can be dealt with by adding global:: before all calls giving the above errors. This does not involve editing WSDL.
References: Comment on one of the page you mentioned above and link that comment referred to.