cancel
Showing results for 
Search instead for 
Did you mean: 

Http adapter -reading a http file stream

Former Member
0 Kudos

Hi folks,

Here is a requirement

I need to read a file sent as an http object stream through XI and then updated the same in a database table in R/3?

<b>How can i configure the http adapter so that it reads the file stream</b>

regards

krishna

Message was edited by:

Krishnamoorthy Ramakrishnan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

there is no need to configure sender adapter if you are receiving file in http format.

Simply complete the mapping and configure the receiver communcation channel then its done.

do revert if you have any doubt.

Regards,

Gourav Khare

---

<i>Reward points if it helps you</i>

Former Member
0 Kudos

Gaurav,

thanks for your quick response. Yes, you are right that http sender needs no adapter in CC.

But , I would like to read the file stream within XI. How can i go about doing this??

regards

krishna

Former Member
0 Kudos

Hi,

>>> I would like to read the file stream within XI

If I understand correctly you will receive this information as http stream in such case you don't need to configure anything. If you want to read file then use file adapter. once message come inside XI then it is not a issue.

If I don't understand correctly then pls specify with example then may be I can help you.

Regards,

Gourav

bhavesh_kantilal
Active Contributor
0 Kudos

Krishna, Do you mean to say you need to pick a file from a HTTP location?

If yes, this is a HTTP Get Operation and currently HTTP adapters can be used only for HTTP Post.

To fire a HTTP get from XI, check this blog,

/people/amol.joshi2/blog/2006/06/28/must-fire-a-http-get-from-xi---try-this

Regards

Bhavesh

Former Member
0 Kudos

Thanks bhavesh

Though your reply and reference did not directly answer my question, which i will explain below concisely, it did help me to get an idea about how to handle my requirement.

Please read and give me your valuable advise.

The sender is a distributor that wants to send some text file to a file server in XI.The sender will have to send the file as a http stream link. XI has to read the file from the http stream and push it to a file server in XI. for this, i have identified that

1. At outbound/sender side, there is an HTTP adapter in XI.

2.The request to XI should be of the some think like

<b>http://<host>:<port>/file stream.....</b>

3. At inbound side , I have a java server proxy as suggested in the blog.

4. The server proxy will use a http client connection to read the file stream and another ftp client to push it to the file server

Do you think this would realize the requirement?

I have also got a question here

With the above mentioned URL, will the sender be able to communicate with XI, since the client is outside the network and has access to internet only. How can it communicate with XI?

Also, Is there an better alternative to this approach?

Thanks for your help

Kind Regards

krishna

Former Member
0 Kudos

Gaurav,

Please read above to know what i would like to achieve

Regards

krishna

bhavesh_kantilal
Active Contributor
0 Kudos

Krishna,

You do not need a Proxy For this.

Use the Plain sender HTTP adapter to do this.

When you use the Sender HTTP adapter ( basically the HTTP Client ),the HTTP Body of the message is the Payload used in XI.

So, if the sending application can send this inputstream as the HTTP body your scenario becomes a HTTP to File (without proxies).

Regards

Bhavesh

Former Member
0 Kudos

yes...also a lot would depend on who is going to intiate the transfer.

if your sender system will initiate the transfer, then as suggested by Bhavesh your scenario will become http-> XI -> target.

but , if your req is not in line with this , then may be u'll have to look for alternative

Former Member
0 Kudos

Hi bhavesh

Yes, as you mentioned, an "http to File" interface would suit the requirement.

I have a couple more questions here

1. As i understand, the http client pushes the data/the file as an activeX component like

<i>var xmlDoc = new ActiveXObject("microsoft.xmldom");

xmlDoc.async=false;

xmlDoc.load (document.MessageParameters.xmlFile.value);

xhttp.send (xmlDoc);</i>

In my case, the client just can only invoke the request URL with the file as a stream

object. The client can be some VB application that outputs such a URL. The client can not be modified. So, how can I push the file from the client ?

2. If it is possible to push the file as a stream , will it be available as a payload within XI?

<b>3.This is actually the same question i asked earlier. How can the client communicate with our XI box having just an internet access? our IP is not public.</b>

Regards

Krishna

Former Member
0 Kudos

Amol,

the system will initiate a transfer but we dont have an option to push the text file as an ActiveX object as i explained above. We will just append the file object as a stream after the request URL.

Can you think of some solution?

regards

krishna

Former Member
0 Kudos

Hi,

If your XI IP is not public then client application can't access box directly.

I suggest following method:

1. VB application giving URL of file.

2. Develop intermediate VB code to create file from this URL and then dump file into shared folder (which should be accessible from XI).

3. Develop sender file communication channel to pick up this file.

---

Another possibility is to push http stream using custom code but you have to figure out proxy/reverse proxy setting of your XI box.

normally reverse proxy should be applicable in your case if IP is not public.

Regards,

Gourav

Former Member
0 Kudos

you might need to go for certain custom development where..

1. Your VB application , which you say can not change , let it invoke a URL. I am assuming that your VB application is capable of sending the data to this URL when it invokes it.

2. Let this URL be a web application (Java based) , deployed on the J2EE stack of XI. as mentioned in the point 1, if the VB application capable of sending data to this URL , the server side program of this web app say a servlet will get the data with it.

3. Develop a Java proxy for your sender side i.e. Outbound Async MI and design it in such a way that it is capable of getting the required data in XI. From the servlet mentioned in point 2, invoke your Java proxy and pass on the required data to it.

4. This would then become your Java Proxy --> XI --> File scenario, with a custom development of a web application as mentioned to act as a starting / intiatiation point for the end to end process, which your VB application will give a call to and transfer data over HTTP to it.

Former Member
0 Kudos

Gaurav

Thanks for you suggestion

<i>2. Develop intermediate VB code to create file from this URL and then dump file into shared folder (which should be accessible from XI).</i>

Creation of a "staging" area as you have suggested is not possible.

Thanks for the idea of setting up a reverse proxy. From what i understood, setting up a reverse proxy would not require us to open up the firewall and the ports. If this is correct how would the reverse proxy determine the port the messaging server runs on? IS it advisable to have have the reverse proxy without a DMZ set up?

these doubts have to be clarified before we can think of actuating this solution.

regards

krishna

Former Member
0 Kudos

Hi amol,

Thanks for your time writing the response.

Your solution does seem within reach and interesting if not for the following issue

<i>if the VB application capable of sending data to this URL ,</i>

How can the VB application at the client location reach the IP of out internal j2ee/was? Our IP as i mentioned is not public?

regards

krishna

Former Member
0 Kudos

Hi,

<i>>>From what i understood, setting up a reverse proxy would not require us to open up the firewall and the ports</i>- You are right.

<i>>>reverse proxy determine the port the messaging server runs on</i>

- Reverse proxy is also having DSN to locate internal address.

<i>>>IS it advisable to have have the reverse proxy without a DMZ set up?</i>- No, you must have DMZ and inside DMZ you can setup shared FTP, reverse proxy, http proxy etc.

the communication will be

XI->DMZ(http proxy)->internet

internet->DMZ(reverse proxy)->XI

Regards,

Gourav

Former Member
0 Kudos

Thanks for the info gaurav but we dont have a DMZ setup within our n/w. How long does it take to create a DMZ? I believe there are 2 DMZs that have to be set up(external and internal) IS there any documentation available on the same??

REgards

krishna

Former Member
0 Kudos

>>>> How long does it take to create a DMZ?

- No idea

>>>I believe there are 2 DMZs that have to be set up(external and internal)

- No, only one DMZ required which serves both internal and external networks.

I have no further information on this. Maybe some networking guys can help you.

Regards,

Gourav

Former Member
0 Kudos

Thanks gaurav..

May be someone else has more info on this.

Regards

krishna

prateek
Active Contributor
0 Kudos

Hi Krishna,

<i>How long does it take to create a DMZ?</i>

That purely depends upon the speed of the configuration process

How to create it,

http://kbserver.netgear.com/kb_web_files/n101146.asp

<i>I believe there are 2 DMZs that have to be set up(external and internal)

</i>

Only 1 reruired. It captures the need for both interal and external

<i>IS there any documentation available on the same??</i>

http://en.wikipedia.org/wiki/Demilitarized_zone_(computing)

Regards,

Prateek

Former Member
0 Kudos

Prateek,

thanks for your input.

Well, looks like we need to open up all the ports on the XI box thereby escaping firewall security. Does it mean the XI box is subject to vulnerability from literally any computer on the internet, if it is configured to be in the DMZ??

regards

krishna

prateek
Active Contributor
0 Kudos

<i>Well, looks like we need to open up all the ports on the XI box thereby escaping firewall security.</i>

U only put adapter engine in the DMZ. Proxies and application gateways are placed in the outer DMZ, providing acess control between Internet and internal networks. In an inner DMZ, an Integration Server is placed. It exchanges documents with external partners and the business system in the server LAN.

<i>Does it mean the XI box is subject to vulnerability from literally any computer on the internet, if it is configured to be in the DMZ??</i>

No

http://help.sap.com/saphelp_nw04/helpdata/en/d9/ef2940cbf2195de10000000a1550b0/content.htm

Regards,

Prateek

Former Member
0 Kudos

Thanks for the info prateek

I am out of 6 points:(

regards

krishna

Answers (0)