Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 17, 2006 at 07:53 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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!