cancel
Showing results for 
Search instead for 
Did you mean: 

Hi How to get XML file from servlet that XI sent to my J2EE appl?

Former Member
0 Kudos

Hi All!

I have a scenario like XI sends xml file to j2ee application. In my J2EE application my servlet receives this xml. Will the xml file be in my HTTPServletRequest object? if so how to get that file from Request object.

Please help me its urgent, Any code help is highly appreciated.

My xml file will be like this:

<ns0:Http_Message_Type_Demo

xmlns:ns0="http://abcdemo.com">

<Name>ABC</Name>

<RollNo>123</RollNo>

<Address>a-4</Address>

</ns0:Http_Message_Type_Demo>

somebody should help me!please

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use HTTPServletRequest object to get the XML payload.

BufferedReader reader = request.getReader(); //gets XML payload

String line = reader.readLine(); // to read the XML payload line by line

(request is the HTTPServletRequest object)

Regards,

Uma

Former Member
0 Kudos

You can also consider exposing your J2EE application as a web service. In XI this web service can be consumed using SOAP adapter.

regards,

Abhi

P.S. Please reward points for useful answers!

Answers (0)