Problem in downloading a xml file
hi,
i have a requirement that, in a page for example test.html a button is provided. on clicking that button one a request is send to an application which is running at a remote location, which i dont know. just i have the url of that perticular application which is running at one server. Depending on the requirement i have to pass different arguments, based on this arguments, remote application returns a XML file as a response.
In my application one servlet has to catch that response, process the xml and i have to store the elements present in the xml file into a suitable datastructure object and keep that object in the context of the application for further manipulation, finally i have to dispaly all the data present in that in to another page like a display.jsp.
i dont know how the remote application is working, i know only that if any request goes to that application with a valid arguments, it returns a xml to the application who makes that request. and that response should be handled by my application.
To solve this, i used socket communication in java.net package. by clicking the button, i called a servlet and that servlet calls the remote application by passing the valid parameter, catch the xml file as responce, and do whatever required.
i need ur suggesions about this that i did in a right way or not. if any body have another idea about how to solve this, please give me a reply.
there's usually more than one way to do something, and right or wrong isn't always the best way to look at it. if your solution works, then you're good! if you are having problems in a specific area, post the code/error and we can help.
Similar Messages
-
To download SOAP/XML file at runtime....
Hi,
My porgram is consuming a web service, provided by an external party, by calling the method of the corresponding proxy class. The problem is I want to capture the SOAP/XML file that is generated at runtime when the proxy method is called.
Could you please suggest me a way by which I can download the XML file. Is it possible?
Regards,
VaraHi Vara,
One solution is to activate logging and tracing and to see the payload in the log viewer. Consider that this could lower the performance of the system.
Another solution could be to use some kind of [packet analyzer|http://en.wikipedia.org/wiki/Packet_sniff] ...
Hope this helps,
Rossen -
Problem in attaching a xml file in Email Notification
Hi,
I am new to BPEL. I am using 10.1.3.4 Jdev. Facing a problem in attaching a xml file in Email Notification process. I do not get any email when ever the attachment is a xml. Whereas when the attachment is a pdf, i get the pdf in the mail. I have put the mime type as text/xml. Used ora:doc() to read the xml. Dont know what i am missing. Please help me out. Thanks.
Edited by: friendsforever on Oct 6, 2010 1:05 AMactually i want that when a user open my website register form then he must attached their resume in it
so i want to know how can i make a field of attaching.
please reply
I am waiting for your reply -
Download a XML file from Web Services Using Flex
Hi All...
I am new for flex, im developing a windows application using Flex/Air, i have connected the web services with user authentication, now I want to download a xml file using web services in flex,
how can i do this?? please reply...
Thanks in advance
VasanthHi All....
I have done this myself using sample tutorials...
here is the code for your reference guys
plyLoginName = txtEmailIdDownload.text;
var urlpath:String = new String("your url p?LoginName=");
urlpath = new String(urlpath.concat(plyLoginName));
urlpath = new String(urlpath.concat("&PlayerType="));
urlpath = new String(urlpath.concat(chkseasonvalue));
Alert.show(urlpath);
var request:URLRequest = new URLRequest(urlpath)
var fileRef:FileReference = new FileReference();
fileRef.download(request,"yourfilename.xml");
Alert.show('File downloaded Successfully');
txtEmailIdDownload.text = "";
txtPWDownload.text = "";
thanks
Vasanth -
Downloading an XML file from Website through BPEL/ADAPTER
Hi,
I want to download an xml file from one webpage through BPEL. I am using jdeveloper 10.1.3.3 to create a BPEL process and Adapters.
Is there anyway to download the xml file from the site through FUSION middleware.what do you mean download, is it a site where you click a hyperlink then down load the file.
This is not possible as this is invoked by human intervention. SOA suite is invoked by events. If you want to perform this kind of function you would need to create a jave service to perform this.
Is there any posibility that there is a FTP link that you could use?
cheers
James -
Downloading an XML file from Website through FUSION middleware
Hi,
I want to download an xml file from one website through BPEL. I am using jdeveloper 10.1.3.3 to create a BPEL process and Adapters.
How can i download the xml file from the site through FUSION middleware?Another option would be to write a smal Java class the uses URLConnect to connect to the URL in question and use WSIF to bind it to the BPEL process.
Just google for sample code.
--olaf -
Oracle reports problem in distribution with xml file
Hi ,
I am having problem while I am trying to distribute the file with specifing the destination details in the xml. If I am giving the destination details in url then it is working.
Ex.
This is Working
http://bryxh91:8889/reports/rwservlet?report=devlopersuit/reports/test.jsp&userid=anju/[email protected]&desformat=pdf&destype=file&desname=devlopersuit/reports/output_file.pdf
Not working :
http://bryxh91:8889/reports/rwservlet?report=devlopersuit/reports/test.jsp&userid=anju/[email protected]&DISTRIBUTE=YES&destination=devlopersuit/reports/dis_test.xml
xml file
<destinations>
<file id="test" name="output_file.pdf" format="pdf">
<include scr="mainSection"/>
</file>
</destinations>
Error : REP-34304: Distribution failed to complete; review the distribution lists
Its been week I tried many things , but not working.
Right now I am trying to distribute to single file but my goal is to burst and distribute on basis of account number.
This is the first stage of the project.
Thanks a lot for the help
AnjuHello
see answer in Oracle reports problem in distribution with xml file
Regards -
Problem on downloading a zip file
I am having a problem on downloading a zip file(file size is about 2Mb). Sometimes I can get a complete file and can open the file, sometimes the zip file is chunked(the file size is smaller than the right one), so I can't open it.
The file content is stored in a blob field. The code first goes to database get the blob as inputstream, then copy the inputstream into response.getOutputStream().
The problem is unpredictable. Even for the same blob data, sometimes I can get working file, sometimes I just get crapped file.
Could somebody help me out? I am struggling with it.
Any input is appreciated!
public class DownloadTextAction extends Action implements Serializable{
private static Log log = LogFactory.getLog(DownloadTextAction.class);
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
ActionErrors errors = new ActionErrors();
String batch_id = (String)request.getParameter("batch_id");
String fileName = batch_id+".zip";
try
// response.setContentType("application/octet-stream");
response.setContentType("application/download");
// response.setContentLength(content.length());
// response.setHeader("Content-Disposition", "inline; filename=\""
// + fileName + "\"");
response.setHeader("Content-Disposition", "attachment; filename=\""
+ fileName + "\"");
InputStream in = untilService.getBlob(batch_id);
OutputStream out = response.getOutputStream();
FileHelper.copy(in, out);
out.flush();
in.close();
out.close();
catch (Exception e)
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.detail", e.toString()));
saveErrors(request, errors);
log.error(e.toString());
return mapping.findForward(Constants.SUCCESS);
}Maybe a fault in the missing FileHelper.copy() method?
-
Hi,
There is a requirement to download an XML file from the Web using Fusion middleware. The XML file is available as a URL, and is updated daily.
http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml
We need to check if this is download is possible from within ESB.
One Oracle consultant reported this to be slightly tricky, but possible through HTTP Binding. We never could get in touch with him again.
So open to the forum.
So please suggest your opinions, and icing on the cake if you can also point to some tutorial or sample code.
Thanks,
Amitjust run a wget on the file and then you can pick it up with a file adapter, I note there is no XSD association with it.
-
Is there a way to download an XML file from internet to internal table.
Hi,
We have Two system that first is "R/3 4.6C" and second is "WebAS 6.20" and prior is first.
I tried so much ways, i searched Function modules, classes, transactions ...
But i have not found a way to download and XML file from internet like "http://www.tcmb.gov.tr/kurlar/today.xml" to internal table.
is it possible to do ?
if not, i will do with Delphi and RFC but i dont want to do this outside from SAP.
thanks
ibrahimHi Ibrahim Bhai,
I am Facing same kind of issue of getting Data of url into internal table.
I want to know what are the settings that need to be made in SM59 to achieve this.
What are the parameters that need to be passed while call to FM 'http_get' .
Full Points will be rewarded.
In Advance Thanks.
With Regards,
Shahrukh. -
How to download the xml file with netweaver 2004s
I am trying to find the xml file in order to link R/3 to my portal
I installed Netweaver 2004s but I am not able to link to R/3
I heard that I can use another xml file from another server and download it and change the config to match the new server
JFHi JF,
Michael is right in EP5, system are defined in XML file. use the following properties you will able to create system connecting to R/3.
choose System Administration->System Configuration-> System Landscape.
Create a system of SAP_R/3_Dedicated type system
Select the <b>Connector</b> from the Property category dropdown
Application Host : <R/3 Host name>
SAP Client: <Clent no>
SAP System ID (SID):
Server Port:
SAP System Number
System Type: SAP_R3
Select the <b>User Management</b> from the Property category dropdown
Logon Method - UIDPW
User Mapping Type - Admin,user
Select <b>System Aliases</b> in the Edit dropdown list.
This opens the System Alias Editor, and displays the existing list of aliases created for this system. Add the system alias here.
Select the <b>test connection</b> in the Edit dropdown list:
test the connection
Hope this will solve your problem.
Thanks
Sai -
ALV list downloading to XML file
hi experts,
im working on ALV reports. i have displayed the list using grid, im also displaying the subtotals and grand total also.
its all working fine.
my problem is, when i try to download it using list -> export -> spreadsheet, im getting only the data. the top of page, end of list and totals are not getting into the xml file.
can some one help me to solve this problem please.
one more problem is when i download using local file button (ctrlshftF9) im gtting header footer and all. but here the problem is its getting some additional coloms and also a list header, which i didnt gave. how to avoid those. please help me to slove these problems.
thanks in advance.hi,
i cannot understand y u r not getting totals and headings in xml file.
check this sample program,i have downloaded now to desktop and iam getting all headings,subtotals and totals.
REPORT ZGM_ALV_SUBTOTAL_TEXT .
*& Table declaration
TABLES: ekko.
*& Type pool declaration
TYPE-POOLS: slis. " Type pool for ALV
*& Selection screen
SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.
*& Type declaration
Type declaration for internal table to store EKPO data
TYPES: BEGIN OF x_data,
ebeln TYPE char30, " Document no.
ebelp TYPE ebelp, " Item no
matnr TYPE matnr, " Material no
matnr1 TYPE matnr, " Material no
werks TYPE werks_d, " Plant
werks1 TYPE werks_d, " Plant
ntgew TYPE entge, " Net weight
gewe TYPE egewe, " Unit of weight
END OF x_data.
*& Internal table declaration
DATA:
i_ekpo TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
Internal table for storing field catalog information
i_fieldcat TYPE slis_t_fieldcat_alv,
Internal table for Top of Page info. in ALV Display
i_alv_top_of_page TYPE slis_t_listheader,
Internal table for ALV Display events
i_events TYPE slis_t_event,
Internal table for storing ALV sort information
i_sort TYPE slis_t_sortinfo_alv,
i_event TYPE slis_t_event.
*& Work area declaration
DATA:
wa_ekko TYPE x_data,
wa_layout TYPE slis_layout_alv,
wa_events TYPE slis_alv_event,
wa_sort TYPE slis_sortinfo_alv.
*& Constant declaration
CONSTANTS:
c_header TYPE char1
VALUE 'H', "Header in ALV
c_item TYPE char1
VALUE 'S'.
*& Start-of-selection event
START-OF-SELECTION.
Select data from ekpo
SELECT ebeln " Doc no
ebelp " Item
matnr " Material
matnr " Material
werks " Plant
werks " Plant
ntgew " Quantity
gewei " Unit
FROM ekpo
INTO TABLE i_ekpo
WHERE ebeln IN s_ebeln
AND ntgew NE '0.00'. IF sy-subrc = 0.
SORT i_ekpo BY ebeln ebelp matnr .
ENDIF.
To build the Page header
PERFORM sub_build_header. "* To prepare field catalog
PERFORM sub_field_catalog. "* Perform to populate the layout structure
PERFORM sub_populate_layout."* Perform to populate the sort table.
PERFORM sub_populate_sort."* Perform to populate ALV event
PERFORM sub_get_event.
END-OF-SELECTION.
* Perform to display ALV report
PERFORM sub_alv_report_display.
*& Form sub_build_header
To build the header
No Parameter
FORM sub_build_header .
Local data declaration
DATA: l_system TYPE char10 , "System id
l_r_line TYPE slis_listheader, "Hold list header
l_date TYPE char10, "Date
l_time TYPE char10, "Time
l_success_records TYPE i, "No of success records
l_title(300) TYPE c. " Title
Title Display
l_r_line-typ = c_header. " header
l_title = 'Test report'(001).
l_r_line-info = l_title.
APPEND l_r_line TO i_alv_top_of_page.
CLEAR l_r_line.
* Run date Display
CLEAR l_date.
l_r_line-typ = c_item. " Item
WRITE: sy-datum TO l_date MM/DD/YYYY.
l_r_line-key = 'Run Date :'(002).
l_r_line-info = l_date.
APPEND l_r_line TO i_alv_top_of_page.
CLEAR: l_r_line,
l_date.ENDFORM. " sub_build_header
*& Form sub_field_catalog
Build Field Catalog
No Parameter
FORM sub_field_catalog .
Build Field Catalog
PERFORM sub_fill_alv_field_catalog USING: '01' '01' 'EBELN'
'I_EKPO' 'L'
'Doc No'(003) ' ' ' ' ' ' ' ', '01' '02' 'EBELP' 'I_EKPO' 'L'
'Item No'(004) 'X' 'X' ' ' ' ', '01' '03' 'MATNR' 'I_EKPO' 'L'
'Material No'(005) 'X' 'X' ' ' ' ', '01' '03' 'MATNR1' 'I_EKPO'
'L'
'Material No'(005) ' ' ' ' ' ' ' ',
'01' '04' 'WERKS' 'I_EKPO' 'L'
'Plant'(006) 'X' 'X' ' ' ' ', '01' '04' 'WERKS1' 'I_EKPO' 'L'
'Plant'(006) ' ' ' ' ' ' ' ', '01' '05' 'NTGEW' 'I_EKPO' 'R'
'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'.ENDFORM.
" sub_field_catalog*&----
*& Form sub_fill_alv_field_catalog
*& For building Field Catalog
*& p_rowpos Row position
*& p_colpos Col position
*& p_fldnam Fldname
*& p_tabnam Tabname
*& p_justif Justification
*& p_seltext Seltext
*& p_out no out
*& p_tech Technical field
*& p_qfield Quantity field
*& p_qtab Quantity table
FORM sub_fill_alv_field_catalog USING p_rowpos TYPE sycurow
p_colpos TYPE sycucol
p_fldnam TYPE fieldname
p_tabnam TYPE tabname
p_justif TYPE char1
p_seltext TYPE dd03p-scrtext_l
p_out TYPE char1
p_tech TYPE char1
p_qfield TYPE slis_fieldname
p_qtab TYPE slis_tabname.
Local declaration for field
catalog
DATA: wa_lfl_fcat TYPE slis_fieldcat_alv.
wa_lfl_fcat-row_pos = p_rowpos. "Row
wa_lfl_fcat-col_pos = p_colpos. "Column
wa_lfl_fcat-fieldname = p_fldnam. "Field Name
wa_lfl_fcat-tabname = p_tabnam. "Internal Table Name
wa_lfl_fcat-just = p_justif. "Screen Justified
wa_lfl_fcat-seltext_l = p_seltext. "Field Text
wa_lfl_fcat-no_out = p_out. "No output
wa_lfl_fcat-tech = p_tech. "Technical field
wa_lfl_fcat-qfieldname = p_qfield. "Quantity unit
wa_lfl_fcat-qtabname = p_qtab .
"Quantity table
IF p_fldnam = 'NTGEW'.
wa_lfl_fcat-do_sum = 'X'.
ENDIF.
APPEND wa_lfl_fcat TO i_fieldcat.
CLEAR wa_lfl_fcat.
ENDFORM.
" sub_fill_alv_field_catalog*&----
*& Form sub_populate_layout
Populate ALV layout
No Parameter
FORM sub_populate_layout . CLEAR wa_layout.
wa_layout-colwidth_optimize = 'X'.
" Optimization of Col width
ENDFORM. " sub_populate_layout*&----
*& Form sub_populate_sort
Populate ALV sort table
No Parameter
FORM sub_populate_sort .
Sort on material
wa_sort-spos = '01' .
wa_sort-fieldname = 'MATNR'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
Sort on plant
wa_sort-spos = '02'.
wa_sort-fieldname = 'WERKS'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
ENDFORM.
" sub_populate_sort*&----
*& Form sub_get_event
Get ALV grid event and pass the form name to subtotal_text
event
No Parameter
FORM sub_get_event .
CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
'SUBTOTAL_TEXT'. DATA: l_s_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 4
IMPORTING
et_events = i_event
EXCEPTIONS
list_type_wrong = 0
OTHERS = 0.
Subtotal
READ TABLE i_event INTO l_s_event
WITH KEY name = slis_ev_subtotal_text.
IF sy-subrc = 0.
MOVE c_formname_subtotal_text TO l_s_event-form.
MODIFY i_event FROM l_s_event INDEX sy-tabix.
ENDIF.ENDFORM.
" sub_get_event*&----
*& Form sub_alv_report_display
For ALV Report Display
No Parameter
FORM sub_alv_report_display .
DATA: l_repid TYPE syrepid .
l_repid = sy-repid .
This function module for displaying the ALV
report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_top_of_page = 'SUB_ALV_TOP_OF_PAGE'
is_layout = wa_layout
it_fieldcat = i_fieldcat
it_sort = i_sort
it_events = i_event
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = i_ekpo
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'Error in ALV report display'(055).
ENDIF.
ENDFORM.
" sub_alv_report_display*&----
FORM sub_alv_top_of_page
Call ALV top of page
No parameter
FORM sub_alv_top_of_page. "#EC CALLED*
*To write header for the ALV
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_alv_top_of_page.
ENDFORM.
"alv_top_of_page*&----
*& Form subtotal_text
Build subtotal text
P_total Total
p_subtot_text Subtotal text info
FORM subtotal_text CHANGING
p_total TYPE any
p_subtot_text TYPE slis_subtot_text.
Material level sub total
IF p_subtot_text-criteria = 'MATNR'.
p_subtot_text-display_text_for_subtotal
= 'Material level total'(009).
ENDIF.
Plant level sub total
IF p_subtot_text-criteria = 'WERKS'.
p_subtot_text-display_text_for_subtotal = 'Plant level total'(010).
ENDIF.
ENDFORM. "subtotal_textSelection screen: -
Download of xml file is incomplete
We have a system which serves xml files (datafeeds of products). Some customers have reported problems with downloading feeds. Further analysis showed that they were getting incomplete downloads. This problem could be circumvented by downloading in another browser. I have not been able to reproduce this problem in Opera 11.5, FF4, FF6 under Ubuntu nor in FF3.6, FF4, FF5, FF6 in windows.
I have seen the problem occur and it is reproducible on systems where it fails. Unfortunately I do not have ready access to these systems nor am I allowed to go bugging customers directly. I do have access to a system of an account manager who has the same problem. I am including debug information from her machine. Note the debug information is in dutch (where language is applicable)Reload web page(s) and bypass the cache.
* Press and hold Shift and left-click the Reload button.
* Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
* Press "Cmd + Shift + R" (MAC)
More:
*http://kb.mozillazine.org/Error_loading_websites -
Download a xml file from a server
Hi guys,
First of all excuse me for my disorganized english.
I have a JSP applicaction using tomcat 4.1 wich is accesed from internet using an IIS server for the redirection.
In my servlet I'm generating a XML file wich will be downloaded by the client, in the servlet I set up this header, like in the others forums some fellows told.
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=\"" + nombreBorrador + "\"");
I'm having a problem downloading a file from a server, the download dialog box says in the filename the name of the servlet instead of the name of the XML file.
Any comments will be really appreciated.
Best Regards
JCh.-hai,
give a print of ur variable "nombreBorrador" and check whether the name of xml file is getting passed correctly.
Ani -
Problemas para download do XML em massa no GRC NFe 10.0
Boa tarde
Fizemos o upgrade de versão do GRC 1.0 para 10.0 e entramos em Produção na segunda-feira, 19/02.
Estamos tendo dificuldades para efetuar o dwonload em massa dos arquivos. Temos um programa Z que parou de funcionar e quando estamos indo pela opção do Menu
WDY_APPLICATION - Download Archived XML nem todas as notas estão sendo exportadas
Ex.: para um determinado CNPJ temos mais de 240 notas de saída aprovadas e só estamos conseguindo exportar 12 arquivos XML
Alguém tem alguma idéia/dica para a solução?
Temos que enviar os XMLs em atraso e fazendo o download individual está sendo inviável.
Grata,
DeniseOlá Henrique
Identificamos o problema através de debug da função /XNFE/OUTNFE_XML_MASS_DATA.
O parâmetro de seleção está invertido. Se digitarmos o emissor no lugar do recebedor o programa funciona.
É erro no standard. O curioso é que ninguém reportou esse erro. Não devem estar usando o programa de download em massa.
De qualquer forma obrigada pela ajuda.
Denise
Maybe you are looking for
-
Oracle RAC 10g on Solaris x86 using vmware
Guys, I am practising 10g RAC installation on my laptop, wherein I have vmware workstation and solaris-x86 version 10 installed on it. I am trying to install Oracle 10g clusterware. I have followed the steps for clusterware installation. I am facing
-
Is there a way to transfer my iphone4 voicemail to my computer
Is there a way to transfer my i phone 4voicemail to my computer? thanks
-
Drag and Drop in JTree / Show line between Nodes as DropTarget
Hello folks, I am using the posted DnDTree. My problem is to show a line between two nodes when I am drgging another node over them. The idea is to have the posibility to sort nodes in the same level. Has anybody an idea how to solve that? Thanks and
-
Difference in Moving Avg Price & Standard Cost
Hi Sapians, Can you please guide me regarding difference between MAP & Standard Costing in relation to the working/process and accounting entries? Regards, Volas
-
Facing issue while trying to disable automatic discovery of devices through Apple Bonjour
Hi All, I am facing issue while trying to disable automatic discovery of devices through Apple Bonjour. Background: Whenever our application is in running state, devices are automatically discovered if it connects to PC. We are using Apple Bonjour's