Quantcast
Channel: SCN : Discussion List - SAP Enterprise Portal : Administration and Development
Viewing all articles
Browse latest Browse all 2686

Reading a WRR Resource as InputStream

$
0
0

Hello All,

 

I need to read a file kept in Portal WRR as inputstream.

 

From below link, I could write code to get instance of IResource and it's URI, but I don't see any 'getContent' or similar method for this object which will give me inputstream for this file.

 

Accessing the Web Resource Repository - Portal - SAP Library

 

Hence, first question is,  "Is there any method or standard way to read a WRR Resource as inputstream like we have in KM Resource?"

 

 

Then I tried to get inputstream using URI of this object using traditional old URLConnection way.

Hence, I noticed strange thing: -

 

1. When I try to get inputstream from URL of below pattern, I am able to get the inputstream: -

 

http : // <host> : <port> / com.sap.portal.resourcerepository / repo / folder1 / Test_Data.csv

 

2. And when I try to get inputStream using masked hostname URL (the one which actually used by end-users), I get connection timed out error in URLConnection: -

 

http : // <masked-hostname> / com.sap.portal.resourcerepository / repo / folder1 / Test_Data.csv

 

 

Any ideas/pointers?

 

Thanks & Regards,

Amey


Viewing all articles
Browse latest Browse all 2686

Trending Articles