Skip to Content
avatar image
Former Member

processing sync http response code XI

We are receiving a synchronous HTTP response code from the 3rd party using HTTP adapter. The requirement is based on the response code (either 200 or 4xx or 5xx), email or some action needs to be generated, so that the user knows what happened to the Outbound message processing.

I am not very sure how to trap and process further this HTTP response code. Please note that this is a syn scenario and has been achieved without using BPM.

Any suggestion is highly appreciated.

Thank you.

Anuradha.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jun 29, 2011 at 03:50 AM

    Hello,

    Not really sure if this is possible using the Plain HTTP Adapter,

    You can try using SOAP Adapter instead. To do this:

    1.) Check the Do Not Use SOAP Envelope in your receiver adapter

    2.) And then on the modules tab, module configuration add this

    Module Key                  Parameter Name                 Parameter Value
    soap                        XMBWS.NoSOAPIgnoreStatusCode   true
    

    I have not tried capturing the 200 response, but was able to capture 403,404 and 503 errors in html format...

    Hope this helps,

    Mark

    Edited by: Mark Dihiansan on Jun 29, 2011 5:51 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 29, 2011 at 05:45 PM

    Hi Mark.

    Thanks for the answer. We are using HTTP adapter and we are already receiving the response codes from the 3rd party. My question is if I want to do some further processing based on the response code, then how that should be done?

    I canniot use alert mechanish in this scenario, because the response code always comes as a success message in SXMB_MONI, irrespective of the status code being 200 or 4xx.

    Please suggest.

    Thanks.

    Anuradha.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello,

      I canniot use alert mechanish in this scenario, because the response code always comes as a success message in SXMB_MONI, irrespective of the status code being 200 or 4xx.

      Let me know if I have correctly interpreted it, you are already able to see the response message in sxmb_moni? In that case, you can try failing at the message mapping level (for the response) so that the alerting framework gets used in 4xx and 5xx scenarios e.g in the root xml, the occurrence is always 1..1, if you get a 4xx or 5xx error then you can pass a suppressed to the root node.

      No alert means the message is successful.

      Hope this helps,

      Mark

  • avatar image
    Former Member
    Jun 30, 2011 at 09:33 AM

    Hello Mr,

    You need to use a BPM to achieve this issue.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 30, 2011 at 04:39 PM

    Just to clarify this response code is synchronous response code that gets generated from the 3rd party, We are not doing any mapping for this, the response message comes as sycn acknowledgement from the receiving system. We want to do further processing with this response code, depending on the status code.

    Thanks.

    Anuradha.

    Add comment
    10|10000 characters needed characters exceeded

    • I have the impression, that the mentioned response code is not the HTTP code, but part of the HTTP message payload. Is this correct?

      When you send a message with HTTP adapter to external system, any other HTTP code than 2xx will make the XI message fail.

      If I am not correct, could you provide the HTTP stream of the response message here? This will help to understand the issue.

  • avatar image
    Former Member
    Jul 05, 2011 at 09:05 PM

    Hello Stephan.

    I have the impression, that the mentioned response code is not the HTTP code, but part of the HTTP message payload. Is this correct?

    -->> The response code is part of the synch response message that we are getting from the 3rd party

    When you send a message with HTTP adapter to external system, any other HTTP code than 2xx will make the XI message fail.

    If I am not correct, could you provide the HTTP stream of the response message here? This will help to understand the issue.

    This is the attached payload: (response sync message)

    <?xml version="1.0" encoding="UTF-8" ?>

    <!DOCTYPE cXML (View Source for full doctype...)>

    - <cXML timestamp="2011-06-2916:08:49-0400" payloadID="50000011930000000220110629200753" version="1.2.011">

    - <Response>

    <Status code="200" text="OK" />

    </Response>

    </cXML>

    Thanks.

    Anuradha.

    Add comment
    10|10000 characters needed characters exceeded