Skip to Content
0
Former Member
Feb 15, 2006 at 04:50 PM

read file from mime-Repository into XML input stream

473 Views

Hi all,

I just imported a template.xml into the mime of a BSP-Application in order to use the data in it at the runtime.

my question:

How can I read this file into an XML istream? (because I want to transform it with xslt at the time “OnInitialisation”.) What is the right way to give the uri or filename of the mime-object? I failed to create the istream with the following attempts:

iStream = streamFactory->create_istream_uri(uri).

with

Uri = “/SAP/TEST/template.xml”

Uri = “http://xxx.de: 8001/sap/bc/bsp/sap/TEST/TEMPLATE.XML”

Uri = “http://xxx.de: 8001/sap/TEST/TEMPLATE.XML”

(istream is empty)

Then I tried this way:

OPEN DATASET filename FOR INPUT IN BINARY MODE.
READ DATASET filename INTO inputstring.
istream = streamfactory->create_istream_xstring( inputstring ).

with

filename = “/SAP/TEST/template.xml”

filename = “http://xxx.de: 8001/sap/bc/bsp/sap/TEST/TEMPLATE.XML”

filename = “http://xxx.de: 8001/sap/TEST/TEMPLATE.XML”

(file not be opened, so istream is empty)

Does anyone has an idea on how to solve this problem ?

Thanks a lot.

Vivian