on 05-17-2006 6:52 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.