cancel
Showing results for 
Search instead for 
Did you mean: 

Idempotency in Enterprise Services

Former Member
0 Kudos

Hi all,

I am looking to implement Idempotency for the custom developed web services.

I looked at the help and documents on how to implement and have got the code working partially in the backend ABAP Proxy.

Based on the help we need to run the TCODE WSIDPADMIN to activate the Idempotency and I executed and activated it.

It created 4 SAP tables /1SAP1/IDPID*<clientid> and /1SAP1/IDPBD1<clientid>

When i execute the services it adds data only in table /1SAP1/IDPBD1<clientid> but not in any other tables.

If we debug the method "is_message_processed" of helper "class cl_ws_idp_factory" it check against table /1SAP1/IDPID*<clientid> where the entries are not created and because of that it fails.

If i debug the method "save" i don't see it entering data into tables /1SAP1/IDPID*<clientid>.

Did any one encounter this issue?

I am working on SAP NEtweaver 7.1 platform and SAP_BASIS patch level is SAPKB71009

I also implemented following notes but still the issue exists

0001404131 Dump in CL_WS_IDP_HELPER -> SAVE_ON_COMMIT

0001435650 Remove of obsolete coding in the Web Service Runtime

0001461682 Enqueue issues in idempotency framework, IDP performance

Thanks

-Sam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sam,

What is the issue though? Is the indempotency check failing?

Also, is the response being sent back to the consumer?

It might be that when the request comes in it creates an entry in the IDPBD1<clientid> table & when an outbound response is created it's first stored in the IDPID* table. The indempotency check will only check if a response message exists for a request with the same UUID. This is an assumption though, you won't really find any architectural documentation on the subject.

If the response is being sent back successfully, I would start looking if there is maybe an explicit commit missing somewhere.

Also, check very useful guide below, see appendix section for custom services:

[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60679679-85c1-2c10-9fa4-cc009a522788?quicklink=index&overridelayout=true]

Regards, Trevor

Former Member
0 Kudos

Hi Trevor,

I followed the same document from Suresh when i first started. However the issue I have as you have correctly suggested.

When the outbound response is sent it stores the record in IDPBD1<clientid> but not in IDPID1<clientid> table and because of that when next time the same message is sent (with same message ID) it could not find in IDPID1<clientid> table.

You mentioned about explicit commit. Do we have to commit explicitly after the "Save" Method of Helper Class CL_WS_IDP_HELPER because that method does have a commit within it. The concern is i don't see it writing to the IDPBD1<clientid> tables.

Thanks

-Sam

Former Member
0 Kudos

Hi Trevor,

I looked at one of the standard implementation and i see that they explicity commit using:

  • save application and eventually response message

CALL METHOD cl_soap_commit_rollback=>commit.

Thanks a lot of the hint.

Thanks

-Sam

Answers (0)