on 05-17-2005 8:27 PM
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:
Bapi_Alm_Notif_Create
Bapi_Alm_Notif_Save
Bapi_Transaction_Commit
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)
RequestElementName = "BAPI_TRANSACTION_COMMIT_RENAMED",
ResponseNamespace = "urn:sap-com:document:sap:rfc:functions",
ResponseElementName = "BAPI_TRANSACTION_COMMIT.Response_RENAMED")]
Great!
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>")> _
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
BAPI_TRANSACTION_COMMIT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.