cancel
Showing results for 
Search instead for 
Did you mean: 

XI message id in inbound proxy

michel_dekimpe
Participant
0 Kudos

Hello,

Is it possible to retreive the xi message id in a proxy.

Regards, Michel

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Answers (4)

Answers (4)

michel_dekimpe
Participant
0 Kudos

Stefan,

I finally found the solution.

data : g_message_id_protocol type ref to if_wsprotocol_message_id,

g_server_context type ref to if_ws_server_context,

g_xi_message_id type sxmsmguid.

  • XI GUI id

try.

  • Get server context

g_server_context = cl_proxy_access=>get_server_context( ).

  • Get message id protocol

g_message_id_protocol ?= g_server_context->get_protocol( if_wsprotocol=>message_id ).

  • Fill in message id

g_xi_message_id = g_message_id_protocol->get_message_id( ).

catch cx_ai_system_fault.

endtry.

Thanks for your help with this.

Regards, Michel

michel_dekimpe
Participant
0 Kudos

Stefan,

No luck in trying to implement this.

Thanks for your replies.

Regards, Michel

stefan_grube
Active Contributor
0 Kudos

Which release/Sp du you have?

Does this work for you:

DATA:  lo_server_context   TYPE REF TO if_ws_server_context,
       lo_payload_protocol TYPE REF TO if_wsprotocol_payload.

lo_server_context   = cl_proxy_access=>get_server_context( ).
lo_payload_protocol = 
     lo_server_context->get_protocol( if_wsprotocol=>payload ).

I took this from

http://help.sap.com/saphelp_nwpi71/helpdata/en/51/d5cd16235e4643ae8ec92395c4ad97/frameset.htm

This does not work for me. If the code samples in online help are wrong, then it is worth to create in OSS ticket for this.

Regards

Stefan

michel_dekimpe
Participant
0 Kudos

Stefan,

Maybe I don't understand it correctly but, we've got the following scenario

JDBC sender adapter -> XI -> inbound proxy

I would like to have the xi message id in the inbound proxy

The example in the link call's an outbound proxy first

Regards, Michel

stefan_grube
Active Contributor
0 Kudos

Yes, the example is an outbound proxy, but the handler class can be used in outbound and inbound proxy. This is mentioned at that page.

I cannot provide a code sample, as I have not done this before. But it should not be so difficult. Why you do not give a try?

michel_dekimpe
Participant
0 Kudos

Thanks for your reply Stefan, but this in for the outbound proxy call,

do you know if it's possible for the inbound proxy ?

Regards, Michel

stefan_grube
Active Contributor
0 Kudos

The code sample is for the outbound call, but the handler class works for:

Asynchronous proxy call at sender - Message header of request message

Synchronous proxy call at sender - Message header of response message

Synchronous/asynchronous proxy call at receiver - Message header of request message