cancel
Showing results for 
Search instead for 
Did you mean: 

Get Webservice Async Ack

0 Kudos

Hi, everyone.

I have been asked to build an interface (ECC)Proxy - PI - Soap. It is asynchronous. I need to capture Technical Ack(200, 404, 500, etc) from receiver and send it back to ECC using another interface to update a table with log(message delivered or not). I´ve read a lot about it but I still havent found a solution. Proxy Ack as far as I know just tell me if the message reached PI but not the receiver, right? BPM ack tell me if message has reached the comm channel but not the receiver either. I´d be very grateful if someone gave me some hints.

Best regards,

Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor

Hello Oscar,

In case of proxy outbound scenario, acknowledgement request indicator has to be sent on the sender side as a part of proxy call logic. This is achieved by using so-called ABAP proxy protocols technique - precisely speaking, the proxy protocol ASYNC_MESSAGING. In the case described by you, this is about requesting technical acknowledgement (both positive and negative) - it will contain information regarding processing through the PI system and technical delivery to the receiver system (here, web service). In this way, if PI fails to deliver the message to the called web service and receives error, this error will be captured in the acknowledgement and can further be retrieved when explicitly querying an acknowledgement in the sender application.

Some general information regarding ABAP proxy protocols usage and code snippets can be found in the blog .

Example of using proxy protocol ASYNC_MESSAGING can be found in Acknowledgments - Proxy Programming - SAP Library.

Regards,

Vadim

0 Kudos

First of all, thank you for replying. So, Proxy Ack is not limited to receive an Ack telling us PI received the message but also if delivery to receiver was successful. Is that right? After reading some articles about the topic, I had understood such Ack meant PI received your message but it didnt tell me if PI could delivered.

Anyway, I´ll try Proxy Ack

vadimklimov
Active Contributor
0 Kudos

Oscar, your understanding is correct: technical acknowledgement is supposed to also contain information regarding status of technical delivery of the message from the PI system to the receiver system.

I prepared a fast example of this technique (just instead of web service receiver, I used file receiver) so that you can have better outlook at it.

As you can see, technical positive and negative acknowledgements were requested by proxy sender (done programmatically in a proxy caller application using proxy protocol ASYNC_MESSAGING, as described above):

When receiver communication channel processing has been completed, acknowledgement was generated, this is seen from message log in PI:

And here is corresponding acknowledgement message that was transmitted back to the proxy sender and visible in tx. SX_MONITOR for the respective original outbound proxy message:

Regards,

Vadim

0 Kudos

Hi, Vadim.

Just wanted to tell you that unfortunately this may not work with WS.

I coded Proxy consumer and protocol to get Transport Ack.

When testing I realize code 77(OK) is always returned even though forcing erros like using a wrong Service URL or stopping the channel. In the adapter log I can find the status NDLV. If only there were a way to get that status. Also in monitor I see the icon ? still awaiting...

Do you think I´m doing something wrong?

Regards,

former_member182412
Active Contributor
0 Kudos

Hi Oscar,

SOAP adapter by default disable the system acknowledgments from PI 7.31 SP08, refer sap note1821649 - XMBWS.GenerateSysAck is set to false by default.

So we need to enable system acknowledgements by setting below parameter in SOAP adapter:

Q: How to set System Acknowledgment parameter in soap adapter ?
           A: In the note 1821649, default value of the parameter is set to false. Which means that in case the acknowledgement is required to be generated the parameter has to be explicitly set to true in the channel configuration. So note 1821649 is the relevant note for this issue.
           Parameter Name  : XMBWS.GenerateSysAck
           Parameter Value : true



Regards,

Praveen.

0 Kudos

Praveen, thanks for replying.

What you wrote helped me a lot. The missing parameter was causing the problem.

Now I´m getting response and can update the user monitor with logs.

Regards,

0 Kudos

Hi.

Sorry for disturbing you one more time.

I am testing proxy. It is receiving Ack when message is delivered by comm. channel.

But, when I stop the channel or type a wrong webservice url, it goes into Catch.

Isn´t there a way to get the System Error Ack instead of getting catch and the message No acknowledgement for message ID?

Thanks in advance.

Regards

vadimklimov
Active Contributor
0 Kudos

Hi Oscar,

System acknowledgement is generated by the receiver adapter in PI - as it is stated in official documentation, "The acknowledgments are triggered when a message is successfully processed by the adapter or if an error occurs while it is being processed." (refer to Acknowledgment Support in the Adapter Engine - Advanced Adapter Engine - SAP Library). If the channel is stopped, the receiver adapter is not called, so acknowledgement is not generated.

If the communication channel is started, message for which system acknowledgement is requested, reached the receiver adapter, receiver adapter supports acknowledgement (SOAP adapter supports them and my understanding is, you already set adapter module property "XMBWS.GenerateSysAck" to "true") and message failed there, but no acknowledgement is returned, I would suggest tracing receiver communication channel (for example, using XPI Inspector) and looking if acknowledgement generation occurred there (you can search for "DeliveryErrorAck" in a trace).

It shall also be noted that acknowledgement may not reach a sender proxy system immediately after it got generated by a receiver adapter, so please refresh output of tx. SXMB_MONI / SXI_MONITOR for a sent proxy message - an acknowledgement may arrive few seconds later. Similarly, if a caller program in ECC attempts to retrieve acknowledgement right after sending an original proxy message, it may raise an exception NO_ACK_ARRIVED_YET due to absence of an acknowledgement at that time, but if called some time later, may recognize arrived acknowledgement.

Regards,

Vadim

Answers (0)