cancel
Showing results for 
Search instead for 
Did you mean: 

File fetch from external souce... http adapter, file adapter, or...

Former Member
0 Kudos

Hi - Hopefully this is a straight-forward question. I need to fetch a file from an external source (vendor) using a url that they provided us. Secondly, the url and file change each run. Here is the scenario:

#1.

- our side (PI 7.11) calls their webservice A to tell them to generate a report, and a report handle id is passed back to us (this part works)

- our side (PI 7.11) calls their webservice B with that report id to get a https url string (this part works). E.g. return url is https://pvab70barp.companyb.com/reports/ODbsPPSBIQxPs/u1/u1_1307128013471215.csv

- our side (PI 7.11) then needs to go fetch the contents of that file... again, the file is over at their site

#2.

The next time we run this we would get an entirely different url string

***

So to solve #1, it seems to me that the HTTP adapter can be used (can it be used though given the url is https?). I don't think FILE adapter can be used as I believe it needs the file to reside on the local file system.

To solve #2, it appears some dynamic configuration of the url is needed. Is their an easy way?

If anyone has thoughts on these then I would appreciate hearing back from you with your comments. I have not worked with either of these adapters yet.

Thanks,

Keith

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

1) You can use http or https connection to connect remote server. HTTPS is not an issue. You create RFC destination of type H and there provide login credentials such as client certificates. Use that destination name in the http receiver adapter to use https. Looks like to read the file that is on the http server, you might want to use Java proxy to achieve this. Simple HTTPS communication would not read the file. Or request the client to share it in the network shared drive. so that we can use File adapter to pulll the file.

2) Yes you can use dynamic configuration in the mapping for the dynamic HTTPS URL.

Former Member
0 Kudos

Marked the thread as 'Answered'. We solved by creating an abap fm on PI to actually make the call over to the vendor's file server, installing a security certificate (from the vendor) on PI, and calling that fm from the PI scenario. The fm utilizes standard SAP class methods cl_http_client=>create_by_url, lr_client->send, lr_client->receive, lr_client->response->get_status, lr_client->response->get_cdata, lr_client->close, where lr_client is TYPE REF TO if_http_client.

Thanks,

Keith

Answers (0)