cancel
Showing results for 
Search instead for 
Did you mean: 

How to test whether XI is sending file or not?

Former Member
0 Kudos

Hi all!

My scenario is like this:File(File sender Adapter)->XI->(HTTP receiver adapter)J2EE appl.

I placed the xml file in D:\somedir on my PC. It is picking up the file, after picking it should post the same xml file to my j2ee appl. My servlet receives the xml file and display it on browser. But nothing is displayed. How to test whether XI is sending XML file to J2EE appl or not? All helpful answers are highly appreciated.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

former_member192029
Active Contributor
0 Kudos

Hi

You can check from RWB (RunTime work bench) >> go to Meessage monitoring or end-end monitoring or else SXI_MONITOR

Cheers

Jawahar Govindaraj

PS: plz reward me

Former Member
0 Kudos

Hi

I checked both in RWB->message monitoring and SXI_MONITOR

I got no error, but why my servlet is not able to display.

Please help me!

Former Member
0 Kudos

Datta saru,

I dont know if this is the reason, but I am postiong it...

HTTP adapter is on ABAP Stack, but you are using with the J2EE application. Could this be the reason?

-Naveen.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Datta,

Just goto SXMB_MONI and watch the message, in the payload you can check if the data is sent.

If you want to validate the http adapter, just go to RWB and check the message monitoring and component monitoring.

Finally, if you're not sure whether the J2EE part is ok, do not process the data and just output it directly.

Thanks

Luis

Former Member
0 Kudos

Hi

I got successful status in RWB and also in SXMB_MONI.

I got succcess flag in it.

Why my servlet is not displaying anything?

All helpful answers are rewarded. I am just outputting the xml file as it is to browser, but my servlet is not able to display?

This is my servlet code:

public class DisplayRes extends HttpServlet {

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

doPost(request,response);

}

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

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

String inputLine;

StringBuffer sBuf = new StringBuffer();

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

sBuf.append(inputLine);

brin.close();

PrintWriter out = response.getWriter();

response.setContentType("text/xml");

//out.setContentType("text/xml");

//out.println(sBuf.toString());

out.write(sBuf.toString());

out.flush();

}

}

Thanks

Former Member
0 Kudos

Hi,

<i>D:\somedir on my PC</i>

I dont think the file will be picked up in the first place, since you are placing this file on a local drive rather than on the xi server.

The above path might work if the pc you are working on is the xi server.

In the file adapter, set the processing mode as delete, to make sure that the file is actually picked up.

Regards,

Smitha.

Former Member
0 Kudos

Hi

In the file adapter i set processing mode as delete, it is picking up well from my d:\somedir.

I got success flag in SXMB_MONI and successful status in RWB->message monitoring?

Why my servlet is not able to display?

All helpful answers are rewarded.

public class DisplayRes extends HttpServlet {

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

{

doPost(request,response);

}

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

{

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

String inputLine;

StringBuffer sBuf = new StringBuffer();

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

sBuf.append(inputLine);

brin.close();

PrintWriter out = response.getWriter();

response.setContentType("text/xml");

//out.setContentType("text/xml");

//out.println(sBuf.toString());

out.write(sBuf.toString());

out.flush();

}

}

Thanks

bhavesh_kantilal
Active Contributor
0 Kudos

Datta,

While configuring your Sender File Adapter, let the mode be DELETE. This way, when the file is picked byu the File adapter , it will be deleetd and you can be sure that it has been picked up.

Next, look into the RWB--> FILE ADAPTER and see the log of gthe file adapter

and Also, you can see the flow of your message in the integration engine in SXMB_MONI.

Regards,

Bhavesh

former_member187339
Active Contributor
0 Kudos

Hi,

Check in SXMB_MONI to see the contents of the file... Is there any error in MONI or Runtime Workbench?

Regards

Suraj

Former Member
0 Kudos

Hi

I got successful status in RWB and also in SXMB_MONI.

I got succcess flag in it.

Why my servlet is not displaying anything?

All helpful answers are rewarded.

Thanks