Hello people,

We are building an application with some ESB-like features. One of those features is having insight in the content of requestmessages and the corresponding responsemessages of an external API/webservice call. The type of application is a Service (because of reusable logic, loosely coupled, etc).

The problem is that I don't know of a way to correlate an API request and response message to each other? 

In a traditional webapplication you can set a session variable with a GUID in the OnBeforeRequest and extract the value in the OnAfterResponse. But a service doesn't have session variables and I would like to make it a service. Do you know of any alternatives that I am not seeing?

Btw, I know I can read the Log_Integration and Log_Integration_Detail entities of the PlatformLogs extension, but I am looking for another option.

Thanks in advance!


Regards,

Funs

Hi Find,

The request key is available in the context of a service action, together with UserId and TenantId.

Please read in https://success.outsystems.com/Documentation/11/Developing_an_Application/Reuse_and_Refactor/Use_Services_to_Expose_Functionality#Exposing_Service_Actions

Regards,

Daniel

Hi Daniël,

Thanks for your reply. 

I want access to the original HTTP request- and responsemessages when interacting with an external API. As far as I know I can only do that in the OnBeforeRequest and OnAfterResponse actions of the API that I am consuming.

I think can't do that directly in service actions, hence my question remains how I can correlate HTTP request- and responsemessages in order to store the original content?


Regards,

Funs



Hi Funs,

Reading your original post again, I realize that my first reply doesn't make a lot of sense.

Also, I don't know the answer to your question, hopefully someone else can help you.

Regards,

Daniel