This weblog presents one of the ways to push data from XI to controller part of MVC architectured J2EE application where servlet acts as a controller. We use XI’s HTTP receiver adapter to achieve this. In a complex scenario the servlet plays quite a significant role naming few are Action Mapper, Dispatcher, request binder etc. Hence with the proposed scenario we can remove View part of the application for few of the instances and inturn reduce navigation. Another way to invoke a J2EE application is by using Java Proxies.
Scenario:
Actors in this scenario are Legacy system (LS) and MVC architectured J2EE application. LS uses XI Http receiver adapter to push request to the controller of the J2EE application (Servlet in this case). The request is carried all the way to the controller by passing view and then some server side process manipulates the data and sends it back (In this case, the servlet adds Salutation to the name).

Fig 1.0 Legacy Applicaiton Invoking J2EE Applciaiton using HTTP Adapter
Sequence of Steps:
Design Time
Create the required Design time objects like Data Types, Message Types, Message Interfaces
- Create the required Message Mappings

Fig 2.0 Request Message Mapping

Fig 3.0 Response Message Mapping - Create the required Interface Mappings


Fig 4.0 Interface Mapping
Develop and deploy servlet
Configuration time:

Fig 5.0 Configuration of HTTP Receiver adapter to invoke J2EE Applicaiton - Create the required Configuration time Objects like Receiver Determinaiton, Inaterface determinaiton and mapping, Receiver agreement.

Fig 6.0 Configuration Objects in Integration Directory
Testing:
You can use a Client http adapter to test the scenario.
Result:
You should now be able to push data using XI’s receiver HTTP adapter to the controller MVC architectured J2EE application.