cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrive information from XML using servlets? Help me

Former Member
0 Kudos

Hi

I have a scenario like this

File-->XI-->J2ee application(HTTP Receiver adapter)

I want to know how XI sends xml file as a query string file name?

What ever may be the case i just need to retrieve the information from Request object and display the same in browser(JSP).How to do that, I am totally confused, please anyone help me!

Code help is highly rewarded.

Thanx

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Datta,

This blog may help you.

<a href="/people/kausik.medavarapu/blog/2005/12/29/csv-file-lookup-with-http-request-and-response-in-xi">/people/kausik.medavarapu/blog/2005/12/29/csv-file-lookup-with-http-request-and-response-in-xi</a>

Regards,

Sudharshan

Former Member
0 Kudos

Hi

Where else should i specify about my target system in XI.

I have giventhe following info in my outbound HTTP (in ID) commincation channel:

Xi sends XML file to my J2EE application.I am using HTTP adapter as receiver.

Adapter type: HTTP

Message protocol: Xi payload in HTTP body

Transport protocol: HTTP 1.0

Adapter Engine: Integration Server

Addressing Type: URL

Service number:7001 (BEA Weblogic 9.0 application server)

Path: /InvokeJ2EE/SendName/

Target host:localhost(is where my J2EE appl reside)Authentication Type: Use Logon adat for SAP system

Username: xiappluser

password:xxxxx

Content Type: text/xml

XML code:UTF-8

Thanks

Former Member
0 Kudos

You can retrieve the XML sent by XI to your web application in a servlet like this

BufferedReader brin =
new BufferedReader(new InputStreamReader(request.getInputStream()));

String inputLine;
System.out.println("nnnPrinting request contents*******");
while ((inputLine = brin.readLine()) != null)
     System.out.println(inputLine);
brin.close();

Former Member
0 Kudos

You can retrieve the XML sent by XI to your web application in a servlet like this

BufferedReader brin =
new BufferedReader(new InputStreamReader(request.getInputStream()));

String inputLine;
System.out.println("nnnPrinting request contents*******");
while ((inputLine = brin.readLine()) != null)
     System.out.println(inputLine);
brin.close();

Former Member
0 Kudos

Hi,

there are two HTTP GET or HTTP Post,

once calling http adapter, asp, or jsp can get data with some coding from XI. Please look at the web programming

thanks

venjamin