Skip to Content
Former Member
Mar 30, 2008 at 11:53 PM

WSDL generates incorrect BAPIRET2 code in VS2005


I have tried to import WSDL for two Web Services based on function modules into a Visual Studio C# project.

In both cases, the WSDL generates the web service; however when I build the project, both services have syntax errors in the Reference.cs file for all components of the Bapiret2 class.

Each component generates the following two error messages:

"An object reference is required for the nonstatic field, method or property '<namespace>.System.get"


"'string' does not contain a definition for 'Xml'"

In each case, the error messages refer to the line that reads:

"[System.Xml.Serialization.XmlElementAttribute (Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]"

that precedes the "Set" & "Get" methods for each Bapiret2 class component. The errors highlight the "System" and "X,l" components following "Form=" .

Has anyone seen this before?

I'm using SAP 2004s with Support Stack 15, and Visual Studio 2005 SP1 with the Enterprise Services Explorer add-on.