cancel
Showing results for 
Search instead for 
Did you mean: 

How to receive XML file from web site?

Former Member
0 Kudos

Hi experts. I need to download xml file from the website (like file adapter).

In details, I need to take this file using PI every day:

http://www.nbp.pl/kursy/xml/LastA.xml

How can I do this?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

We have acheived this using a UDF. In UDF, we used java.net APIs such as URLConnection to the website and then read the InputStream from the same.

Regards

Former Member
0 Kudos
iaki_vila
Active Contributor
0 Kudos

Hi Andrey,

If you need this file from ECC for example, i would do an PROXY-HTTP scenario. I will make a job in the ECC system in orde to retrieve that file all days.

Regards.

Former Member
0 Kudos

So, how can I take this file using HTTP adapter? Is there any blogs on this topic?

former_member184681
Active Contributor
0 Kudos

Hi Iñaki Vila,

Correct me if I'm wrong, but I believe HTTP receiver cannot be used in synchronous mode, so Andrey wouldn't be able to receive the XML content as a response. I believe the requirement could be met with Proxy -> PI -> SOAP scenario, having "Do not use SOAP Envelope" set in the receiver SOAP channel.

Andrey,

Proxy to * and * to SOAP scenarios are widely discussed in SCN, use the search function to find valuable blogs and Wikis on those topics. Just consider this XML source as an almost regular web service. Almost regular because of two things: you do not use SOAP Envelope (which PI can cover with the indicator I mentioned above) and you do not have the .wsdl file, so you have to define the response structure yourself.

Regards,

Greg

iaki_vila
Active Contributor
0 Kudos

Hi Grzegorz,

I've never used the http receiver in synchronous mode, probably you are rigtht.

But if you search in help documentation, probably im wrong in something,  you will find in:

http://help.sap.com/saphelp_nwpi71/helpdata/en/43/64db4daf9f30b4e10000000a11466f/frameset.htm

Quality of Service BE, EO, EOIO

And in  Configuring Receiver Plain HTTP Adapter in Integration Directory:

      If you want to save HTTP header fields from the synchronous response in the XI message header, choose HTTP Header Fields (Synchronous Response) and enter the fields in the fields Field 1 to Field 6.

Regards.

former_member184681
Active Contributor
0 Kudos

Hi Iñaki,

I believe you are right about the QoS supported. Still, you can only receive HTTP header fields as a response, just like you quoted from SAP Help. The response does not contain payload, so it doesn't let you collect data from the XML file. See a full list here: List of HTTP header fields - they are strictly technical values.

Regads,

Greg

iaki_vila
Active Contributor
0 Kudos

Hi Grzegorz,

I've tried an example and i did some research and you are totally right. All days i learn something new in these forums.

Thank very much.

Regards.