Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How (XML msg) data is sent to Servlet from XI?

Hi

Can anyone tell me how XI sends messages to applications like J2EE. I suppose that XI makes use of this info and sends XML msg to this address: http://localhost:7001/Invoke/DisplayRes/

am i correct?

In Receiver comm channel, i specified about the target system.

Aadapter Type: HTTP

Receiver

Transport Protocol: HTTP1.0

Message Protocol: XI payload in HTTP body

Adapter Engine: Integration Server

Addressing Type: URL address( is this correct?)

Target host: localhost

Service Number: 7001(Port number of Weblogic appl server--where my J2EE appl is deployed).

Path : /Invoke/DisplayRes/(Context path of my J2EE appl)

Authentication Type:Use Logon Data for SAP System

Content Type: text/xml

Username: xiappluser

password: xx

XML code: UTF-8

I suppose XI sends msgs to http://localhost:7001/Invoke/DisplayRes/........

in this example if am correct?

Then I have given all tyhe necessary setting but my servlet is not able to display XML msg in browser?

This is my servlet code:

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

{

PrintWriter out = response.getWriter();

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

String inputLine;

StringBuffer sBuf = new StringBuffer();

response.setContentType("text/xml");

while ((inputLine = brin.readLine()) != null)

sBuf.append(inputLine);

out.println("hi");

out.println(sBuf.toString());

brin.close();

out.flush();

}

What went wrong? This is not diplaying anything

Help me, all helpful answers are highly rewarded.

Thanks

Not what you were looking for? View more on this topic or Ask a question