cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi

My J2EE is not installed on the same server as XI.

I checked my J2EE application server log i got 'null' as output from XI server.

Then how can i check whether XI is actually sending messages to my J2EE appl, where can i see that?

Thanks for your prompt reply!

stefan_grube
Active Contributor
0 Kudos

When you use the HTTP adapter, you can see error messages in the SXMB_MONI.

Regards

Stefan

Former Member
0 Kudos

Hi

I got this error from SXMB_MONI:

=================

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Call Adapter

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>XIAdapter</SAP:Category>

<SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code>

<SAP:P1>400</SAP:P1>

<SAP:P2>ICM_HTTP_CONNECTION_FAILED</SAP:P2>

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>HTTP client. Code 400 reason ICM_HTTP_CONNECTION_FAILED</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

what corrects are to be done?

Thanks

Former Member
0 Kudos

Hi

<b>Where to see this server log.

>>>>Check the server log for the output.

You said: you mean to say i need to check in XI server log? or in J2EE appl server log?</b>In my J2EE appl server log i got 'null' from XI server

Both in SXMB_MONI and RWB->Message monitoring i got no error. I got success flag in SXMB_MONI and successful as status in Message monitoring!

Thanks a lot

stefan_grube
Active Contributor
0 Kudos

Change the cc settings as I have already written.

Apply the correct server name (instead of localhost) and a valid user (instead of XIAPPLUSER).

Regards

Stefan

moorthy
Active Contributor
0 Kudos

Hi,

CHeck the Port number it should be http port.

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

Thanks,

Moorthy