cancel
Showing results for 
Search instead for 
Did you mean: 

Process Response from IDoc via HTTP_AAE POST Request

Former Member
0 Kudos

Hello,

I'm currently working on the problem, that I receive an IDoc from our ERP system at the PI server. This IDoc is mapped via an Operation Mapping to the correct structure and is then processed by an HTTP_AAE Adapter. Due to the IDoc, the communication is async.

The message need to be transmitted to a Web service via an HTTP POST Request (I further modify the XI Payload via a Java Bean)

Unfortunately, I don't get any response from the Web service. Within the Communication Channel monitoring I only get the message that the message was successfully processed.

The current communications works:

ERP - IDoc Adapter - Operation Mapping - Sending via HTTP_AAE Adapter


This is what I need also:


HTTP_AAE Adapter - Operation Mapping Process Response - IDoc Adapter - ERP


Does somebody have experience with this kind of scenario and can maybe give me some advices?

In case you need additional information, please let me know, so I can provide them.

Kind regards & thanks for your help!

Florian

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi Florian

Welcome to SCN!

Did you consider using an Async-Sync Bridge for your scenario?

Below are two articles that are useful for setting up such a scenario.

There are also other examples on SCN, try searching for them using the search functionality.

Rgds

Eng Swee

Former Member
0 Kudos

Hello,

thanks for sharing the links.

I was testing the solution. As stated on the second page, this solution doesn't seem to work for HTTP_AAE. After setting up all Java Beans correctly, the received message fails with the error:

For my understanding, the interface should be replaced with the interface specified in the JavaBean?

One further questions: The HTTP_AEE Adapter Communication Channel is used as Sender and Receiver? Or do i need to create two channels and somehow connect them?

Thanks for the help!

Florian

suman_saha
Contributor
0 Kudos

Hi,

Why are you using HTTP_AAE instead of IDOC_AAE?

If you want system acknowledgement, you may use module as described in Acknowledgments - SAP NetWeaver Process Integration - SAP Library

You can go for ALEAUD if you want to set up acknowledgement for sender IDOC.

Configuring Acknowledgements for a Sender IDoc Adapter (AAE) - Advanced Adapter Engine - SAP Library

Handling Idoc Acknowledgements - ABAP Development - SCN Wiki

Regards,

Suman

Former Member
0 Kudos

Hi Suman,

thanks for your response.

I'm using the IDoc_AAE Adapter to receive the IDoc from ERP at the PI system. After mapping the values to the correct data structure, i need to send this structure via an HTTP POST request to a web service. Therefore, the only adapter is the HTTP_AAE Adapter.

Unfortunately, the IDoc_AAE Adapter only works in asynchronous way.

Currently the message terminates after the HTTP_AAE adapter has transmitted the message to the web service. My question is, how do i connect the response of the HTTP_AAE adapter (which is a Receiver Adapter) to the modules corresponding to the ERP system (consuming the response from the web service).

Thanks for the help!

Kind regards,

Florian

Former Member
0 Kudos

Does anyone has a suggestion or has an example for the HTTP_AAE Adapter?

Thanks for your support!

Kind regards,

Florian

engswee
Active Contributor
0 Kudos

Hi Florian

Sorry for the delay in response.

From your error message, it looks like there is no matching sender agreeement for the response of the sync message. Based on William's blog, this should be item #4 in the list. You will need a sender agreement (or ICO if on single stack) which has "Sender uses virtual receiver" checked. The interface and namespace on the sender agreement should match the values in the ResponseOneWayBean of the previous step's sync receiver channel.

Yes, you will need 2 HTTP_AAE channels, firstly the receiver HTTP_AAE for the sync request, and secondly the sender HTTP_AAE (used in above sender agreement) for receiving the sync response.

Regarding the usage of the HTTP_AAE on the sync side, I haven't used it before so I'm not sure if it will work or not per the comment on the blog. If after setting up the configuration above and it does not work, I would suggest you switch to SOAP instead. I've used SOAP and it works perfectly fine. On the SOAP channels, check "Do not use SOAP envelope" and it would behave like an HTTP POST.

Rgds

Eng Swee

Former Member
0 Kudos

Thanks for your help!

The remaining problem is that the JavaBean does not seem to work properly:

Because the error I'm getting is:

It seems that the Interface is not replaced (still is Request and not Response). Is this correct?

Kind regards,

Florian

engswee
Active Contributor
0 Kudos

Can you try switching to SOAP adapter (without envelope as suggested above) and see if it makes any difference?

Rgds

Eng Swee

Former Member
0 Kudos

I switched to SOAP and it seems to work fine. I hope that I can achieve the same functionality with SOAP as with the HTTP_AAE adapter.

When, I'm finished I will provide you a soluion on this one

Thanks for helping so far!

Kind regards,

Florian

Answers (0)