cancel
Showing results for 
Search instead for 
Did you mean: 

PI scenario to download file from server when link is provided via webservice

Former Member
0 Kudos

Hi all.

We have scenario when we have to retrieve an xml file from external web server. The link is provided via webservice.

I have an idea of how to call webservice and obtain the link.

Also I have an idea of how to download the file from webserver.

What I cannot understand is how do I bring these two tasks together.

PI version - 7.1

Please give me a hint.

Thanks in advance!

Renat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

So let me clarify your scenario, you want PI to pull XML content from a web URL, and send that on to SAP?

Do you want to pull based on an interval, or should a transaction in SAP initiate the request?

If SAP should initiate from RFC or Proxy, try along these lines:

http://scn.sap.com/people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walk...

If you want a polling interval:

Depending on your service pack level you can try the AXIS adapter like in Michal's blog.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/01/05/michals-pi-tips-exchange-rates-fr...

If you can't support that, you can use a File Sender adapter like his other example:

http://scn.sap.com/people/michal.krawczyk2/blog/2010/01/22/pixi-how-to-get-an-xml-file-from-a-web-pa...

Or you can use a "dummy" text trigger file (leave it in test mode so it doesn't get deleted) and do the HTTP lookup in a UDF. In this case be careful that your application is idempotent (does not get affected if the same xml is retrieved twice).

http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/11/20/webservice-calls-from-a-user-defi...

Let us know how you get on. The more you can describe the scenario, and what exact point you are stuck, the more the community can help you.

tinu_n
Participant
0 Kudos

Hi Aaron,

I have a scenario where we need to pull .CSV file from webservice. Can we pull the file in case URL is dynamic with AXIS adapter?

URL  - https://<Link>/sample1.csv

Link will be same all the time but the file name changes for every request.

PI version 7.1 SP 06.

Regards,

Tinu

Answers (2)

Answers (2)

Former Member
0 Kudos

Sorry for being late in answering. I've faced with some internet proxy issues and other basis issues, but now, when they are solved, I'm ready to describe the scenario and solution.

I'd like to thank all of You for all advices and solutions provided. They really helped me to find a solution for my scenario.

The scenario

There is a need to download update files, provided by company through internet. Company provides update files as an archive and the link for downloading is provided via webservice.

We are using PI version 7.1.1 SP5, so unfortunately we cannot use AXIS adapter.

The solution

Thanks to Aaron Myers,I've tried the solution provided by Bhavesh Kantilal that is: "dummy" file to trigger scenario, that calls webservice and uses java mapping to parse webservice response, retrieve the link, download update file and stream it to ftp.

Thanks all

Regards,

Renat

Former Member
0 Kudos

It is good of you to come back and complete your post Renat. So many times I have searched SCN and found a person with the same question I have, only to find the thread was left open.

By the way, if you would like to see a polling interval built into the normal PI SOAP Sender Adapter, please vote on this idea at the SCN Idea space:

https://ideaplace.brightidea.com/ct/ct_a_view_idea.bix?c=97F64433-5773-403E-A7C6-D7EB3BD6428D&idea_i...

Former Member
0 Kudos

Thanks Aaron for link to Idea Space.

It's good idea to have such an option in SOAP adapter.

I have another idea: although I couldn't use AXIS adapter, I've found that it cannot work behind firewall and this certainly limits use of AXIS adapter.

sunilchandra007
Active Contributor
0 Kudos

One way would be to merge this activities in mapping with soap lookup to obtain the file link and then download it. Can you describe the complete scenario.

Regards,

Sunil Chandra

Former Member
0 Kudos

Hi,

You may try soap axis adapter for this. Please check sap note - 1039369.

Regards,

Beena.