cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Acknowledgement [Response code 200/500 in response data type]

Former Member
0 Kudos

Hi Experts,

Help me on how to get the HTTP Acknowledgment, 200 for success/500 for failure after posting in PI

I am having a requirement in which I have to sent some DB details via XML to an HTTP URL (An ASP page)

JDBC -


> HTTP

After the XML is posted at the target, according to the status of its posting, Success/Failure, I should update the source JDBC with a Status flag Which is a constant.... like 1 for success/ 0 for failure

The Issue here is that, when I tried the scenario I tried it as a JDBC to Sync HTTP, I got a response which was the page itself.

But what i want as the response is just the response code. Say 200 for success/ 500 for failure, in a response datatype. I am in the assumption that like in Sync JDBC, the response datatype will be automatically updated with the response value.... Please correct me if I am wrong.

Please provide me some good links which will help me solve this problem too.

Edited by: Thomas Varghese on Jun 4, 2009 7:59 AM

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Thomas,

JDBC sender is always aysnchronous, from HTTP receiver you want to have a response, therefore that flow must be design synchronous. You can achieve that with a Business Process:

JDBC -> BP (asynchr)

BP <-> HTTP (synchr)

BP -> JDBC (asynchr)

The HTTP answer is a RESPONSE, not an acknowledgment (!). If your receive ANY response in a synchronous process you can be shure the message had reached the target. If you want to know about processing of the message you need a detailed response - this can only be done by the HTTP receiver.

Regards,

Udo

Former Member
0 Kudos

Hi

Thanks for the reply, But my requirement is somewhat different. As per my requirement I need to update a flag according to the success of the posting at HTTP. So only if I get an HTTP response code 200/500 I will be able to perform this action right?

So again my initial question comes back How can we get these response into XI?

Any ideas?

Edited by: Thomas Varghese on Jun 4, 2009 10:50 AM

Former Member
udo_martens
Active Contributor
0 Kudos

Hi Thomas,

if you get the response in a synchronous flow you have implizit 200. You can update with sucess.

If you wont get a response (define a exception for the send step and implement the reaction in an exception branch) it is 500 or another error and your DB shoudl be updated with flag error.

Regards,

Udo

Former Member
0 Kudos

Hi,

I had gone through this sap help doc. But unfortunately I could not find a solution to my problem there. But can someone tell me for what HTTP Header Fields (Synchronous Response) field in HTTP receiver adapter is used? Will this solve my problem?

Former Member
0 Kudos

Hi Udo,

I think you are nearing to the possible solution. As you mentioned all what i want to know is "How will I get hold of that 200 response?" If I am able to get that my problem is definitely solved!

As I mentioned earlier, in my sync SEND in BPM; I am getting a response, but to my astonishment and despair, I am getting the target ASP page itself. I can actually see the page in the response payload window in SXMB_MONI.

But what I want, as you rightly mentioned is the HTTP response code only.

How can I get that.... Any ideas?

Edited by: Thomas Varghese on Jun 4, 2009 11:17 AM

udo_martens
Active Contributor
0 Kudos

Hi Thomas,

you wont get the response code, your process step fails or not. If you get the response, it doent matter how it looks like. Thats it.

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

Thanks. So my last option is to get an HTTP transport acknowledgement. Could you please let me know how I can achieve this?

udo_martens
Active Contributor
0 Kudos

Hi Thomas,

acknowledgments are only for asynchronous messages. You can request them for instance by configuring a BP send step.

(the question is why you ask if you ignore answers..)

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

I am not ignoring the answers, All I wanted is to get a response code. From your previous post I understood that there is no way to get the response code. I wanted the response code because, there can be multiple response codes like 200 or 500 that comes as a response, ie HTTP 200 response code means successfully processed and HTTP 500 response code means failed to process. So my requirement is not just to get a response, I have to check whether it was successfully processed, that was why i asked for it.

Your solution will tell me whether the data has been posted to the HTTP URL, but I believe it will not tell us whether it was posted successfully. Anyways I think getting response code is not possible. And I had made the target HTTP sync just to capture this data. Since I get the acknowledgment in async mode too, as you mentioned... then I thought I can go with that.That is why I asked how I can achieve it and your post helped to know how it was done. Thanks

Udo, If I am wrong in any of the point mentioned, please correct me. Thank you for helping to solve my problem.

Answers (0)