2005 May 04 10:46 PM
Hi,
I'm following the instructions as laid out in the
"Rendering a DOM tree into an XML document" document via the SAP Library. It basically lays out creating an XML DOM and writing out that DOM. The example code works great if I want to write to the root drive of the application server using the following line of code:
oStream = streamFactory->create_ostream_uri ( system_id = 'file://test.out.xml' ).Let me repeat the above works fine if I want to write to the application servers root drive. My problem is that I wish to write my XML file to a network share.
So far I've tried:
oStream = streamFactory->create_ostream_uri(
system_id = 'file:\servernametest.out.xml' ).oStream = streamFactory->create_ostream_uri(
system_id = 'file://\servernametest.out.xml' ).oStream = streamFactory->create_ostream_uri(
system_id = 'file:servernametest.out.xml' ).Nothing seems to work. With each attempt a null is returned as reference to the oStream object. Am I doing something wrong? Did I miss something? Is this possible?
Any help would be greatly appreciated...
Thanks
Brian
Hi,
I'm following the instructions as laid out in the
"Rendering a DOM tree into an XML document" document via the SAP Library. It basically lays out creating an XML DOM and writing out that DOM. The example code works great if I want to write to the root drive of the application server using the following line of code:
oStream = streamFactory->create_ostream_uri ( system_id = 'file://test.out.xml' ).Let me repeat the above works fine if I want to write to the application servers root drive. My problem is that I wish to write my XML file to a network share.
So far I've tried:
oStream = streamFactory->create_ostream_uri(
system_id = 'file:\servernametest.out.xml' ).oStream = streamFactory->create_ostream_uri(
system_id = 'file://\servernametest.out.xml' ).oStream = streamFactory->create_ostream_uri(
system_id = 'file:servernametest.out.xml' ).Nothing seems to work. With each attempt a null is returned as reference to the oStream object. Am I doing something wrong? Did I miss something? Is this possible?
Any help would be greatly appreciated...
Thanks
Brian
2005 May 05 6:20 AM
Hi Brian,
just a option, which you didn't try:
system_id = 'file://servername/test.out.xml'Some OS use forward slash, some backward. In Windows you use the backward slash (
servername), but it seems your application server expects '/' in path definition.
Regards,
Christian
2005 May 05 9:36 PM
Thanks for the reply, I did try this:
system_id = 'file://servername/test.out.xml'But received the same results.
2005 May 06 6:45 AM
Hi,
it was worth a try. Otherwise I can't help much further, just one question (were I'm not any longer sure, if it's worth a try):
Can you access the network path from application server root, e.g. with LS (or DIR or CD) command? (Maybe your mounted volumes are linked on a different directory level.)
Regards,
Christian
2005 May 23 4:44 PM
You can try the following instruction:
oStream = streamFactory->create_ostream_uri
( system_id = '
servername\filename.xml\' ).
This is because the function uses URL Format.
Also, you can replace servername with an IP address like
oStream = streamFactory->create_ostream_uri
( system_id = '
10.3.1.2\filename.xml\' ).
2005 May 23 4:47 PM
Sorry, in my last post you have to remove the last '\' from the instructions.
The real code for both instructions is:
oStream = streamFactory->create_ostream_uri
( system_id = '
servername\filename.xml' ).
or
oStream = streamFactory->create_ostream_uri
( system_id = '
10.3.1.2\filename.xml' ).
Sorry.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |