IBM BJ0NJML - Service And Asset Management Integration Manual page 233

Integration guide
Table of Contents

Advertisement

The HTTP Processing
Exit Class
HTTPResponseUser
Integration Framework Customization with Java and XSL
You can use an HTTP exit placeholder for customization when sending
transactions from the system to an external system using HTTP. This exit class is
optional and is called as part of the response from the HTTP call.
The following figure shows the HTTP processing exit class that the system runs
when a response is returned to the HTTP Post from an external system.
In the default implementation, psdi.iface.router.DefaultHTTPExit, the response
code received from the external system is compared to a range of response codes.
The range used by the default implementation is 200 - 299. If the code is outside
that range, then the transaction was not delivered to the external system and an
exception is raised.
With some external systems, the response from an HTTP call is interpreted to see
if the external system accepted the message or not. The interpretation logic can be
implemented in the HTTP exit class.
If the publish channel message is not accepted, the code must raise an exception.
The message in the outbound queue is marked in error and is not removed from
the queue. If the message is accepted, the message is removed from the outbound
queue.
If the invocation channel message fails, the exception is returned to the invoker of
the channel and the invoker handles the exception according to the design
requirements.
This class must implement the psdi.iface.router.HTTPExit interface and
implement the following method:
public void processResponseData(int responseCode, String
responseMsg, byte[] msgBodyData)
If necessary, this class can interpret the response code and throw an exception.
You enter the fully qualified name of the Java class in the HTTPEXIT property of
the endpoint that implements the HTTP handler.
This class does the following processing to analyze the response from the HTTP
post:
Checks the response code from the HTTP post.
If the response code is in the error range, the exception is logged on the
ERROR level and a system exception is thrown.
If the response code is valid, the transaction is logged on the DEBUG level.
Outbound Customization
219

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents