Problem in reading xml file from server
Hi,
I am using tomcat 4.1 and jdk 1.4.
All the class files and xml files are put into the one jar file.
While running our application a jar file is called from jsp file. in that file we are embedded applet coding. here by i am sending my applet code with this...
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = "500" HEIGHT = "500" codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
<PARAM NAME = CODE VALUE = "Screen.class" >
<PARAM NAME = CODEBASE VALUE = "/Sample/web/" >
<PARAM NAME = ARCHIVE VALUE = "csr.jar" >
</NOEMBED></EMBED>
</OBJECT>
while running our application from another machine we are getting exception filenotfounfexception in the xml is in the generated jar file.
Exception:
org.xml.sax.SAXParseException: File "file:///C:/Documents and Settings/Administrator/Desktop/control_property.xml" not found.
but that xml file is in the jar file and that jar file is present under sample application folder.
what should i change in the applet code? is there any thing related to trusted applet ?
Thanks
You have the xml file in the jar so it is a resource?
http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html#getresource
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)
Similar Messages
-
Problem while reading XML file from Aplication server(Al11)
Hi Experts
I am facing a problem while reading XML file from Aplication server using open data set.
OPEN DATASET v_dsn IN BINARY MODE FOR INPUT.
IF sy-subrc <> 0.
EXIT.
ENDIF.
READ DATASET v_dsn INTO v_rec.
WHILE sy-subrc <> 0.
ENDWHILE.
CLOSE DATASET v_dsn.
The XML file contains the details from an IDOC number , the expected output is XML file giving all the segments details in a single page and send the user in lotus note as an attachment, But in the present output after opening the attachment i am getting a single XML file which contains most of the segments ,but in the bottom part it is giving the below error .
- <E1EDT13 SEGMENT="1">
<QUALF>001</QUALF>
<NTANF>20110803</NTANF>
<NTANZ>080000</NTANZ>
<NTEND>20110803<The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/SHPORD_0080005842.xml'.
/SPAN></NTEND>
<NTENZ>000000</NTENZ>
for all the xml its giving the error in bottom part , but once we open the source code and if we saved in system without changing anything the file giving the xml file without any error in that .
could any one can help to solve this issue .Hi Oliver
Thanx for your reply.
see the latest output
- <E1EDT13 SEGMENT="1">
<QUALF>003</QUALF>
<NTANF>20110803</NTANF>
<NTANZ>080000</NTANZ>
<NTEND>20110803</NTEND>
<NTENZ>000000</NTENZ>
<ISDD>00000000</ISDD>
<ISDZ>000000</ISDZ>
<IEDD>00000000</IEDD>
<IEDZ>000000</IEDZ>
</E1EDT13>
- <E1EDT13 SEGMENT="1">
<QUALF>001</QUALF>
<NTANF>20110803</NTANF>
<NTANZ>080000</NTANZ>
<NTEND>20110803<The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/~1922011.xml'.
/SPAN></NTEND>
<NTENZ>000000</NTENZ>
E1EDT13 with QUALF>003 and <E1EDT13 SEGMENT="1">
with <QUALF>001 having almost same segment data . but E1EDT13 with QUALF>003 is populating all segment data
properly ,but E1EDT13 with QUALF>001 is giving in between. -
Reading XML file from server in BI Publisher
Hi All,
Can any one help me how i can get the XML file from server to BI Publisher using data source.
The file should transfer directly to BI Publisher with out storing it in any local directory in local system.
Thank you
Shalini.Shalini
Do you mean that you have another system that is going to serve up the XML data and you want BIP to be able to pick it up as a data source ?
Couple of options:
1, If the XML filename can remain static you can use the 'XML File' datasource. You need to set up a directory on the server and then maybe create a dummy XML file to start with upon which you can build a report. Then have your external data generator put the file into that directory and then schedule the report so that BIP will pick and report.
2. IS the data generator accessible via HTTP or web service - BIP supports those too.
3. More complex but with a little effort you can create a servlet that will pick up the file from a directory and serve it up to BIP on demand - Im going to write about this on the blog this week
Regards
Tim -
Problem while reading XML File from Memory
I want to read the data from an XML File which is residing in memory.The XML File should be read not by the name or the location of the file but by a Response String.
So Can anybody help me out how can get this.
I tried it with BufferedInputStream but BufferedInputStream needs InputStream as a Parameter and i am not able to get what parameter should be passed into the BufferedInputStream as the syntax of this is
BufferedInputStream(InputStream in)
Its very Urgent !!!
Thanks in AdvanceI have created the parsing method.
The code is like this.
if(response.toString().equals("CS_NEWS_RESPONSE"))
*//InputStream in = new BufferedInputStream(InputStream());*
*//InputStream in = new BufferedInputStream(response.toString());*
*//BufferedInputStream b = new BufferedInputStream(in);*
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse(in);
Element root = doc.getDocumentElement();
The code will go like this....
response.toString() is containing the response type which is the identification of that particular XML File. By using this my file is identified and after identification of this file, i should read the contents and parse them.
Sentences in the bold are the ways. Is this the correct way ??
Amit Will you be able to help me or is there anybody else who knows about this.
Edited by: Monadear on Oct 5, 2007 9:37 AM -
Function module to read xml files from application server
Hi experts,
I need to read xml files from application server to sap. Is the any siutable function moldule for that?Hi Cenosure,
Donno about FM which will upload data directly to SAP, I think you have to do some mapping for it so that it will suit the SAP format. Again it depends on your requirement..
Please elaborate more about your requirement.
Please have a look on below FM
TEXT_CONVERT_XML_TO_SAP
Also search on SCN there are many threads on the same topic available.
http://abapreports.blogspot.com/2008/09/upload-xml-file-from-application-server.html
This is the link which will give you the Code
http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_RMTIWARI_XML_TO_ABAP_46C.html
Use this XML file to Upload the same, this Program will work for your XML file also,
http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/input_xml.xml
See the below thread also
Upload XML to internal table and vice versa in SAP 4.6C
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
FM to read XML files from Application server in ECC5.0
Hi All,
We need to pick up an XML file from Application server/FTP server. The requirement is to parse the XML file and process it to create material master. SAP provides standard function modules to read XML files.
Now we need to read the XML file contents of MM01 and upload into SAP Data Base through BAPI
I need to know about the Function modules to read XML files from Application Server and also about the FM's that will update the Date base tables with the data obtained form XML files.
Regards
PrathimaParsing XML data:
http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
or alternatively check out ABAP online help for "CALL TRANSFORMATION".
For creating the material master look at BAPI_STANDARDMATERIAL_CREATE.
Thomas -
Reading XML file from application server and put into internal table-4.6C
Dear All,
Is there any way of reading XML file from application server to SAP? I am using 4.6C. Function module SCMS_STRING_TO_XSTRING function module is not available. Please suggest.
Thanks and regards,
AtanuHi Atanu!
Simply use the XSLT transformation 'ID'.
FIELD-SYMBOLS <ls_result> TYPE ANY.
CREATE DATA lref_data TYPE (your_structure).
ASSIGN lref_data->* TO <ls_result>.
CALL TRANSFORMATION id
SOURCE XML xmlstr
RESULT result = <ls_result>.
"xmlstr" contains your XML file. Just read it into it via standard I/O operations. "<ls_result>" will contain your DDIC formatted content.
Best regards
Torsten -
Read XML file from presentation server
Hi All,
I want read XML file from presentation server currently i am using GUI_UPLOAD fm . but it is reading some junk data.
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = D:\XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
is there any other alternative.
Thanks
Swarup,Hi Swarup,
Use method IMPORT_FROM_FILE of class CL_XML_DOCUMENT.
A sample code snippet :-
PARAMETERS: p_filnam TYPE localfile OBLIGATORY
DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
DATA: l_v_fieldname TYPE dynfnam.
l_v_fieldname = p_filnam.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = l_v_fieldname
IMPORTING
file_name = p_filnam.
START-OF-SELECTION.
TYPES:
BEGIN OF ty_tab,
name TYPE string,
value TYPE string,
END OF ty_tab.
DATA:
lcl_xml_doc TYPE REF TO cl_xml_document,
v_subrc TYPE sysubrc,
v_node TYPE REF TO if_ixml_node,
v_child_node TYPE REF TO if_ixml_node,
v_root TYPE REF TO if_ixml_node,
v_iterator TYPE REF TO if_ixml_node_iterator,
v_nodemap TYPE REF TO if_ixml_named_node_map,
v_count TYPE i,
v_index TYPE i,
v_attr TYPE REF TO if_ixml_node,
v_name TYPE string,
v_prefix TYPE string,
v_value TYPE string,
v_char TYPE char2.
DATA:
itab TYPE STANDARD TABLE OF ty_tab,
wa TYPE ty_tab.
CREATE OBJECT lcl_xml_doc.
CALL METHOD lcl_xml_doc->import_from_file
EXPORTING
filename = p_filnam
RECEIVING
retcode = v_subrc.
CHECK v_subrc = 0.
v_node = lcl_xml_doc->m_document.
CHECK NOT v_node IS INITIAL.
v_iterator = v_node->create_iterator( ).
v_node = v_iterator->get_next( ).
WHILE NOT v_node IS INITIAL.
CASE v_node->get_type( ).
WHEN if_ixml_node=>co_node_element.
v_name = v_node->get_name( ).
v_nodemap = v_node->get_attributes( ).
IF NOT v_nodemap IS INITIAL
* attributes
v_count = v_nodemap->get_length( ).
DO v_count TIMES.
v_index = sy-index - 1.
v_attr = v_nodemap->get_item( v_index ).
v_name = v_attr->get_name( ).
v_prefix = v_attr->get_namespace_prefix( ).
v_value = v_attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
* text node
v_value = v_node->get_value( ).
MOVE v_value TO v_char.
IF v_char <> cl_abap_char_utilities=>cr_lf.
wa-name = v_name.
wa-value = v_value.
APPEND wa TO itab.
CLEAR wa.
ENDIF.
ENDCASE.
* advance to next node
v_node = v_iterator->get_next( ).
ENDWHILE.
LOOP AT itab INTO wa.
ENDLOOP.
Regards
Abhii -
Reading a XML File from server in BI Publisher
Hi All,
Can any one help me how i can get the XML file from server to BI Publisher using data source.
The file should transfer directly to BI Publisher with out storing it in any local directory in local system.
Thank you
Shalini.Shalini
Do you mean that you have another system that is going to serve up the XML data and you want BIP to be able to pick it up as a data source ?
Couple of options:
1, If the XML filename can remain static you can use the 'XML File' datasource. You need to set up a directory on the server and then maybe create a dummy XML file to start with upon which you can build a report. Then have your external data generator put the file into that directory and then schedule the report so that BIP will pick and report.
2. IS the data generator accessible via HTTP or web service - BIP supports those too.
3. More complex but with a little effort you can create a servlet that will pick up the file from a directory and serve it up to BIP on demand - Im going to write about this on the blog this week
Regards
Tim -
Error while reading a file from server
Mine is 9i database and 11.5.10.2 oracle apps server
I am trying to read PDF file from server, I used the below code
l_bfile:=bfilename('\u05\app\applmgr\11i\oraclecomn\admin\out\jamuna_server','o7742576.out');
if DBMS_LOB.FILEEXISTS(l_bfile) = 1 then
dbms_output.put_line( 'Exists!');
dbms_output.put_line(dbms_lob.getlength(l_bfile));
else
dbms_output.put_line( 'Not Exists!');
end if;
i used forward slashes (/) instead of backward slashes (\) too and i also made dbms_output.put_line(to_char(dbms_lob.getlength(l_bfile)));
while using dbms_log package , i got the below error .I am bit worried since I have created directory and gave sufficicent priviliges too.
Error report:
ORA-00604: error occurred at recursive SQL level 1
ORA-01460: unimplemented or unreasonable conversion requested
ORA-06512: at "SYS.DBMS_LOB", line 485
ORA-06512: at line 24
I am sure bfilename('\u05\app\applmgr\11i\oraclecomn\admin\out\jamuna_server','o7742576.out') is give BFILE which is empty.
Can you please suggest me what I can do to move further? what kind of priviliges it requires to point and read the file from server?
Please help me in this.
Thanks in advanceI suspect you are not using a directory object is the problem.
Here is the formal description of bfilename
http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/functions12a.htm#SQLRF00610
Sybrand Bakker
Senior Oracle DBA -
Import xml file from server to itab
Hi all,
I have a little issue loading data from xml file in server into my itab.
With my file in local (C:\example\example.xml) works fine, but if try this with the same file in the server (e:\example\example.xml) dont work. This is my code resume.
TYPES: BEGIN OF TY_TAB,
NAME TYPE STRING,
VALUE TYPE STRING,
END OF TY_TAB.
DATA: ITAB TYPE STANDARD TABLE OF TY_TAB,
WA TYPE TY_TAB.
* Nombre del fichero
DATA: NOMBREFICHEROXML LIKE IBIPPARMS-PATH,
* data XML
DATA: LCL_XML_DOC TYPE REF TO CL_XML_DOCUMENT,
V_SUBRC TYPE SYSUBRC,
V_NODE TYPE REF TO IF_IXML_NODE,
V_CHILD_NODE TYPE REF TO IF_IXML_NODE,
V_ROOT TYPE REF TO IF_IXML_NODE,
V_ITERATOR TYPE REF TO IF_IXML_NODE_ITERATOR,
V_NODEMAP TYPE REF TO IF_IXML_NAMED_NODE_MAP,
V_COUNT TYPE I,
V_INDEX TYPE I,
V_ATTR TYPE REF TO IF_IXML_NODE,
V_NAME TYPE STRING,
V_PREFIX TYPE STRING,
V_VALUE TYPE STRING,
V_CHAR TYPE CHAR2.
NOMBREFICHEROXML = 'E:\example\example.xml'.
CREATE OBJECT LCL_XML_DOC.
CALL METHOD LCL_XML_DOC->IMPORT_FROM_FILE
EXPORTING
FILENAME = NOMBREFICHEROXML
RECEIVING
RETCODE = V_SUBRC.
IF V_SUBRC EQ '0'.
V_NODE = LCL_XML_DOC->M_DOCUMENT.
CHECK NOT V_NODE IS INITIAL.
V_ITERATOR = V_NODE->CREATE_ITERATOR( ).
V_NODE = V_ITERATOR->GET_NEXT( ).
WHILE NOT V_NODE IS INITIAL.
CASE V_NODE->GET_TYPE( ).
WHEN IF_IXML_NODE=>CO_NODE_ELEMENT.
V_NAME = V_NODE->GET_NAME( ).
WHEN IF_IXML_NODE=>CO_NODE_TEXT OR
IF_IXML_NODE=>CO_NODE_CDATA_SECTION.
*text node
V_VALUE = V_NODE->GET_VALUE( ).
MOVE V_VALUE TO V_CHAR.
IF V_CHAR <> CL_ABAP_CHAR_UTILITIES=>CR_LF.
WA-NAME = V_NAME.
WA-VALUE = V_VALUE.
APPEND WA TO ITAB.
CLEAR WA.
ENDIF.
ENDCASE.
*advance to next node
V_NODE = V_ITERATOR->GET_NEXT( ).
ENDWHILE.
WRITE:/ 'file ok'.
ELSE.
WRITE:/ 'file ko'.
Anyone can help, or tell me a easy way to load xml file from server to my itab that works with my old sap 4.7.
thanks
Edited by: DIEGO_GT on Nov 18, 2011 12:04 PMHi Diego.
Next time try to search in [www.sdn.sap.com] first.
See the following example: [http://wiki.sdn.sap.com/wiki/display/ABAP/UploadXMLfiletointernal+table]
Regards.
Rafael Rojas. -
I am reading XML file from unix using :
FORM read_file USING p_name.
DO.
READ DATASET p_name INTO WXML_LINE LENGTH LENG.
ENDDO.
Then I am using subroutine below where I get a short dump at
case X_NODE->get_type( ).
FORM get_data tables Y_CAPXML structure GV_CAPXML
using value(x_node) type ref to if_ixml_node.
data: INDENT type i.
data: PTEXT type ref to if_ixml_text.
data: STRING type string.
data: TEMP_STRING(100).
case X_NODE->get_type( ).
when if_ixml_node=>co_node_element.
STRING = X_NODE->get_name( ).
GV_NODETEXT = STRING.
when if_ixml_node=>co_node_text.
PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
if PTEXT->ws_only( ) is initial.
STRING = X_NODE->get_value( ).
case GV_NODETEXT.
when 'NIIN'.
move STRING to GV_CAPXML-NIIN.
when 'FED_x0020_STOCK_x0020_CLASS'.
move STRING to GV_CAPXML-fed_stock_class.
when 'DODIC'.
move STRING to GV_CAPXML-dodic.
endcase.
The text for the short dump is : STACK_STATE_NO_ROLL_MEMORY
Can someone please explain what is it mean.
Thanks.May be this blog can help:
<a href="/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach for Blog</a>
Sri -
How to read .xml file from embedded .swf(flash output) in captivate
I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
Here is is graphical demonstration of my query :
Message was edited by: captainmkvHi Captainmkv,
Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
Tristan, -
i want to make a schedular probably in Coldfusion or using javascript , which read xml files from a folder ,import in Indesign template then export as a pdf....
I don't think you understand: I want to open Dreamweaver and build a brand new site, then when I am done I want to host the dreamweaver site on the Business Catalyst platform. I dont want to use anything in BC to build the site, I just want to use the hosting platform. I do not want to import a BC site into dreamweaver or anything like that. I just want to use BC the same way I would use godaddy, or uhost or any other hosting provider. Based on your response you said that "of course its possible to build a BC site in Dreamweaver" I dont want to build a BC site, I want to build a Dreamweaver site and host it on the BC platform. Like I said before it doesnt seem like this is possible. As of now we can only build a new site in MUSE and integrate it into BC without using a BC template. Can you understand what I am saying. I DONT WANT TO USE A BC TEMPLATE, I WANT NOTHING TO DO WITH BC WHILE I AM BUILDING THE SITE WITH DREAMWEAVER, JUST LIKE MUSE DOES.
-
Reading XML File from application server
Hi experts,
My aim is to read a XML file from application server and extract the relevant data from it and process further.
When I am trying to read a XML file from application server it is reading success fully but the problem is that its not reading the last root structure of XML file why is so happening can any body help me?
I am using the following code:
TYPES: BEGIN OF xml_line,
text(256) type x,
END OF xml_line.
DATA: e_file LIKE rlgrap-filename VALUE 'applcatin server path'
OPEN DATASET e_file FOR INPUT IN BINARY MODE.
IF sy-subrc EQ 0.
DO.
READ DATASET e_file INTO wa_item1-text.
IF sy-subrc EQ 0.
APPEND wa_item1 TO gt_item1 .
CLEAR wa_item1.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET e_file.
after this i am passing this internal table to "cl_ixml" class to extract the data
but it returning the itab with required value except the last record.
The stream reading the file it self is i thought in complete thats why it is not converting the all values.
Please help me...
Thanks a ton in advance.Hi,
1 Copy Report BCCIIXMLT1
2 (you can change the way of filling internal table xml_table if necessary)
3 you don't need the part between
*-- render the DOM back into an output stream/internal table
and
*-- print the whole DOM tree as a list...
Comment it out or simply delete it
4 Rename form print_node to your liking e.g. process_node
5 In your new form you need three extra variables:
data: attribs type ref to IF_IXML_NAMED_NODE_MAP,
attrib_node type ref to IF_IXML_NODE,
attrib_value type string.
6 After the lines:
when if_ixml_node=>co_node_element.
string = pNode->get_name( ).
Insert:
attribs = pNode->get_attributes( ).
clear attrib_value.
case string.
when ''. "put your XML tag name here
attrib_node = attribs->get_named_item(name = '' ). "put your XML attribute name here
attrib_value = attrib_node->get_value( ).
You can also refer link,
/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
thanks & regards
shreemohan
Maybe you are looking for
-
Satellite Pro A10 - Unable to connect to internet
I have an old Satellite SPA10 which lost internet connectivity about a year ago. The components at fault are: Ethernet Controller Network Controller Video Controller Video Controller (VGA) I have tried numerous attempts to install drivers to replace
-
External hard drive sleep issue
My external drive contains my share folder for DC++. If I leave my computer on when I'm gone, my DC++ shows my share as 0 after a while. The hard drive seems to unmount after a while, maybe because the enclose sleeps the drive after a while. Is there
-
Dump : storage_parameters_wrong_set
I am currently working on a new BI system.when i am trying to replicate datsources from r/3 the system gives me dump and it reads. <b>Runtime error:storage_parameters_wrong_set.</b> Kindly provide me with OSS note or any solution to this error.
-
NTDLL.DLL issue with HRBLOCK.EXE application
I am on Windows 7 64-bit and everything works fine. I recently downloaded the 2014 H&R Block Tax program on my new computer and ran the installation. Installed fine. Go to use it and it starts up but fails with a reference to NTDLL.DLL and H&R Blo
-
I have tried different plugins and every guide to fix it and I cannot fix it, any suggestions?