Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot import XML file from local file system

Former Member
0 Kudos

Hi all,

I try to import an XML file from a local file system, using the example code from

<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/86/8280cf12d511d5991b00508b6b8b11/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/86/8280cf12d511d5991b00508b6b8b11/content.htm</a>

type-pools: ixml.

class cl_ixml definition load.

data: g_ixml type ref to if_ixml.

g_ixml = cl_ixml=>create( ).

data: streamFactory type ref to if_ixml_stream_factory.

streamFactory = g_ixml->create_stream_factory( ).

data: iStream type ref to if_ixml_istream.

iStream = streamFactory->create_istream_uri( "file://c:\public\test.xml" ).

I replaced the last line with

iStream = streamFactory->create_istream_uri( 'file://c:\myXMLfile.xml' ).

After that, iStream is initial.

Is there perhaps sth. wrong with the URI syntax, that I use?

Armin

3 REPLIES 3

Former Member
0 Kudos

Hi,

look at the below link

Regards

Sudheer

0 Kudos

Hi Sudheer,

I checked the thread that you linked me to, but method create_istream_uri isn't mentioned there.

What exactly is it, that you wanted to point out?

Best regards,

Armin

pepl
Active Participant
0 Kudos

I have exactly the same situation! Everything is fine when i use WS_UPLOAD and then read file from application server, but if i try to open file right from frontend machine as it was shown in the official documentation i have an initial stream finally.

Does anybody know what's the matter?