cancel
Showing results for 
Search instead for 
Did you mean: 

content retrival via http

Former Member
0 Kudos

Hi everyone,

I want to define a scenario in SAP XI that receives a fileID via http and returns the content of the matching file.

Please let me know the steps required.

Regards,

Varun

Accepted Solutions (1)

Accepted Solutions (1)

hemant_chahal
Contributor
0 Kudos

You should have a HTTP sender adapter and make it synchronous,

in request you would map the fie ID and response whatever you want to give according to mapping.

File ID shoul be passed by a HTTP client to the Sender Adapter, So you should have a HTTP client.

You can use a script for that. If you want to go ahead using this sloution i can mail you the script.

varun_k
Contributor
0 Kudos

Hi Manas,

Thanks for your reply,

I have done all that you have said, the thing is , how do I get the response from the file, if it is RFC, i could get as it supports Synchronous.

In my scenario, I am using HTTP as sender and File as Receiver. If I send File ID as request , i shd get File content as response.

Regards,

Varun

hemant_chahal
Contributor
0 Kudos

DO you have a RFC to return the file Content?

If yes then you should have the RFC adapter in the receiver channel.

not the file adapter.

Please elaborate your scenario more.

hemant_chahal
Contributor
0 Kudos

I have one more approach which can help you.

Have a RFC which will just take a file id and return the file path.

come to mapping in response and using UDF read the file path and return the file content to one string.

Request:

(sender Adapter/Synchronous) (Receiver Adapter)

HTTP----


>RFC

Response:

HTTP<----


RFC

Request from HTTP to RFC: File ID

Response from RFC:File path

Response Mapping: UDF to return file content for file path.

File content back to HTTTP Response.

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

go thru this blog.... hope it helps u r scenario

Thanks,

Madhav

note: Points if useful

Former Member
0 Kudos

You can achieve it with Http - SOAP scenario.

Make a synchronous call and get the data from SOAP.

Generally it is used from EP to XI ...r u trying same?

search on google for riyaz.net and it has same scenario step by step.

prateek
Active Contributor
0 Kudos

Using the basic fucntionality of File adapter in XI, u cannot perform this task. U can try a workaround.

1. Open Sync -Async bridge of BPM

2. Make an async HTTP to File scenario where http sends the filename to XI and a file is created in a temporary intermediate folder at the file system. The name of this file is same as the data sent by http sender.

2. Now use a receive step to receive the file. U may use OS command to fetch the filename from intemediate folder, search for it in original directory and copy it to another temp location from where it could be picked up by sender file communication channel (Very complex ).

3.Then u ll have ur data in XI which can then be posted to http closing the sync-async bridge.

Hey just found this, its quite similar to ur requirement

Regards,

Prateek