Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 29, 2006 at 04:29 PM

    Hi,

    CHeck the Port number it should be http port.

    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/content.htm

    Thanks,

    Moorthy

    Add comment
    10|10000 characters needed characters exceeded

  • May 30, 2006 at 08:54 AM

    When you send data from XI to a servlet, how should the servlet show data in the browser? This is not possible.

    Check the server log for the output.

    In principle your entries are correct, besides:

    localhost: Is your J2EE installed on the same server as XI? It is better to use the host name.

    Authentication Type: Use Logon Data for <b>Non-</b>SAP System

    Username: Take a user with rights for your servlet.

    Check the SXMB_MONI for errors.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded