Skip to Content
avatar image
Former Member

.NET Connector XML naming conflict problem

The error I am getting seems to be a similar type to the error patched in OSS Note 506603 ( I have installed this patch already, as I was having XML naming conflict problems ). After installing the patch there are still some naming problems.

I create a proxy with three methods:




I create the proxy using:

SAPProxy1 proxy = new SAPProxy1(connectionString);

and I get the following error ( due to a naming conflict )

System.InvalidOperationException: Method SAPClient.CommitWork can not be reflected. ---> System.InvalidOperationException: The XML element named 'BAPI_TRANSACTION_COMMIT' from namespace 'urn:sap-com:document:sap:rfc:functions' references a method and a type. Change the method's message name using WebMethodAttribute or change the type's root element using the XmlRootAttribute.

NOTE: I can workaround this issue by changing the following lines in the SAPProxy1.cs file ( adding _RENAMED)


ResponseNamespace = "urn:sap-com:document:sap:rfc:functions",

ResponseElementName = "BAPI_TRANSACTION_COMMIT.Response_RENAMED")]

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 06, 2005 at 02:55 PM


    Many thanks for this advice, I had the same problem.

    Just one note, the posted correction contains an error, the correct strings are:

    RequestElementName:="BAPI_TRANSACTION_COMMIT_RENAMED", _ ResponseNamespace:="urn:sap-com:document:sap:rfc:functions", _ ResponseElementName:="<b>BAPI_TRANSACTION_COMMIT_RENAMED.Response</b>")> _

    Add comment
    10|10000 characters needed characters exceeded

    • Let me just mention that you shouldn't add BAPI_TRANSACTION_COMMIT to your poxy but use the builtin CommitWork() instead. That the builtin version doesn't have the Wait parameter is by intention (see the corresponding discussions).

      The workarround mentioned only works for RFC and not for Soap.

  • avatar image
    Former Member
    Jul 06, 2005 at 03:31 PM

    Thanks, Reiner.

    The only reason I was calling BAPI_TRANSACTION_COMMIT was that I ported my code from DCOM to the .NET connector. I was unaware that CommitWork was the method to use to replace


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      The CommitWork method will only be good if you are not trying to commit multiple transactions simultaneously. That is, if you are making multiple updates without a commit because you only want to commit if all updates are successful, then you can't reliably use the CommitWork method.