XML to Application
is there a way to create a button from the LiveCylce to send the generated XML to an EXE application instead of email or HTTPsubmit ?!
Hi Daniel and thank you in advance for availability.
The code is good for me ... to do something like this:
lv_null_string = cl_abap_conv_in_ce => UCCP ('0000 ').
LOOP AT lt_stream ASSIGNING <fs>.
IF sy-tabix = lines (lt_stream). "only the last row must not be absolutely length
FIND FIRST OCCURRENCE OF lv_null_string IN <fs>
IN BYTE MODE MATCH OFFSET lv_null_length.
TRANSFER <fs> TO e_filename LENGTH lv_null_length.
ELSE.
TRANSFER <fs> TO e_filename.
ENDIF.
ENDLOOP.
CLOSE DATASET e_filename.
What do you think?
Then I need your opinion, yesterday I turned the file, which was initially in BINARY MODE, in TEXT MODE, using:
* Before the function
CALL FUNCTION 'SCMS_BINARY_TO_STRING'
EXPORTING
input_length = lv_length
IMPORTING
text_buffer = lv_xml_string
TABLES
binary_tab = lt_stream
* And then writing
OPEN DATASET FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
TRANSFER lv_xml_string TO e_filename.
CLOSE DATASET e_filename.
Do you think this workaround will produce an equally correct file of XML or is it more correct (formally) write a binary file?
I ask this because I don't understand why we are the only ones to have this kind of problem around ... there is no other case in SCN.
Similar Messages
-
Portal XML Component Application Parse Error
Has anyone tried to use Portal's XML Component application to pull XML data out of iFS via URLs successfully? I've loaded an XML instance and XML style sheet in iFS (that parse fine in XMLSpy) and tried to display them using the Portal XML Component application. I've also tried to cut/paste the instance and style sheet in to the Component's GUI directly and received the same error. The component finds the files in iFS fine, but generates the following error:
Start of root element expected. at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java) at oracle.xml.parser.v2.XMLError.error(XMLError.java) at oracle.xml.parser.v2.XMLError.error(XMLError.java) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java) at oracle.webdb.xmlcomp.XMLTransDoc.Transform(XMLTransDoc.java:136)
Oracle's sample data works fine too..
Seems like a basic error, but I can't correct it.. THanks in advance for any help, Timtrying files again..
XML instance:
<US_FOREIGN_MISSION>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="AFMIC"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>U.S. Foreign Mission</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<unknown/>
</apsummary>
<amplification>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>No information available.</text>
</para>
</amplification>
</ap>
<US_EMBASSY>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="MCIA"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>U.S. Embassy</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<summary>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>The U.S. Ambassador is Thomas M.T. Niles and the Embassy is located
at 91 Vasilissis Sophias Boulevard, 10160 Athens; telephone [30] (1) 721-2951,
8401; fax [30] (1) 645-6282. The mailing address is PSC 108, Athens; APO
AE 09842. The Consulate General is in Thessaloniki at the Plateia Commercial
Center, 43 Tsimiski Street, 7th floor; telephone [30] (31) 242-905.</text>
</para>
<media>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<graphic file="http://198.83.203.22/public/Graphics/Embassy.jpg" exhibit_id="U.S. Embassy" hplace="center" vplace="none"/>
<title>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>U.S. Embassy</text>
</title>
</media>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Chief of Mission: Ambassador Thomas M.T. Niles</text>
</para>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Local Address: 91 Vasilissis Sophias Boulevard, 10160 Athens</text>
</para>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Mailing Address: PSC 108, Athens; APO AE 09842</text>
</para>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Embassy Telephone: [30] (1) 721-2951, 8401</text>
</para>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>FAX: [30] (1) 645-6282</text>
</para>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Consulate: Thessaloniki</text>
</para>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Consulate Address: Plateia Commercial Center, 43 Tsimiski Street,
7th floor </text>
</para>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Consulate Telephone: [30] (31) 242-905</text>
</para>
</summary>
</apsummary>
</ap>
</US_EMBASSY>
<FOREIGN_CONSULATE>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="AFMIC"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Foreign Consulate</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<unknown/>
</apsummary>
<amplification>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>No information available.</text>
</para>
</amplification>
</ap>
</FOREIGN_CONSULATE>
<FOREIGN_MISSION>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="CIA"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Foreign Mission</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<summary>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>There is no information available.</text>
</para>
</summary>
</apsummary>
</ap>
</FOREIGN_MISSION>
<US_CONSULATE>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="MCIA"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>U.S. Consulate</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<summary>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>There is no information available.</text>
</para>
</summary>
</apsummary>
</ap>
</US_CONSULATE>
<TRAVEL_ADVISORIES>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="JICTRANS"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Travel Advisories</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<summary>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>There is no information available.</text>
</para>
</summary>
</apsummary>
</ap>
</TRAVEL_ADVISORIES>
<ENTRY_REQUIREMENTS>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="MCIA"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Entry Requirements</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<summary>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>A passport is required for tourist or business stays of up to 3
months. An AIDS test is required for performing artists and students on
Greek scholarships; U.S. test results are not accepted.</text>
</para>
</summary>
</apsummary>
<analysis>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Visas are not necessary but a passport is required for tourist or
business stays of up to 3 months. An AIDS test is required for performing
artists and students on Greek scholarships; U.S. test results are not
accepted. </text>
</para>
</analysis>
</ap>
<VACCINATIONS>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="AFMIC"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Vaccinations</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<summary>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Immunization against hepatitis A and B and typhoid fever is recommended.
For other entry questions, contact the Greek Embassy in Washington,
D.C., telephone (202) 939-5800; Greek consulates in other U.S. cities;
Greek embassies and consulates around the world; or visit Website http://www.greekembassy.org
. </text>
</para>
</summary>
</apsummary>
<analysis>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Immunization against hepatitis A and B and typhoid fever is recommended.
For other entry questions, travelers should contact the Embassy of Greece
at 2221 Massachusetts Avenue NW, Washington DC 20008, telephone (202)
939-5800; Greek consulates in Atlanta, Boston, Chicago, Houston, Los
Angeles, New Orleans, New York, and San Francisco; or Greek embassies
and consulates around the world. Additional information is available
at website: http://www.greekembassy.org.</text>
</para>
</analysis>
</ap>
</VACCINATIONS>
<CUSTOMS_RESTRICTIONS>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="MCIA"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Customs Restrictions</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<summary>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>There are duty-free limits on tobacco, alcohol over 44 proof,
wine, perfume, eau de cologne, and gifts; there are no limits on duty-paid
goods, for personal use, from European Union (EU) countries. Plants
with soil, pistols, and rifles may not be brought into the country; shotguns
must be registered upon arrival. Prescription drugs must have a letter
from prescribing doctor and be declared upon entry. Medications containing
codeine are illegal; exporting artifacts or antiquities without permission
is also illegal.</text>
</para>
</summary>
</apsummary>
<analysis>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Duty-free limits are 200 cigarettes, 50 cigars, 100 cigarillos,
or 250 grams of tobacco; 1 liter of alcohol over 44 proof or 2 liters
of wine; 50 grams of perfume and 250 milliliters of eau de cologne, and
gifts of total value less than Dr25,000. There are no limits on duty-paid
goods from European Union (EU) countries, provided they are solely for
personal use. Importing plants with soil is forbidden. Pistols and rifles
may not be brought into the country; shotguns must be registered upon
arrival. Prescription drugs must be accompanied with a letter from the
prescribing doctor and be declared upon entry. Medications containing
codeine are illegal and possessors face fines and imprisonment. Exporting
artifacts or antiquities without the Athens Archaeological Service’s
permission is illegal and vigorously prosecuted. </text>
</para>
</analysis>
</ap>
</CUSTOMS_RESTRICTIONS>
<AVIATION_SAFETY_OVERSIGHT>
<ap>
<metadata>
<administrative>
<identifiers/>
<publisher>
<organization agency="JICTRANS"/>
</publisher>
<dates/>
</administrative>
<descriptive>
<security/>
<title>
<portionmark/>
<text/>
</title>
<subtitle>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>Aviation Safety Oversight</text>
</subtitle>
<locations>
<country CCODE="GRC"/>
</locations>
<subjects>
<code/>
</subjects>
</descriptive>
</metadata>
<apsummary>
<summary>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>The U.S. Federal Aviation Administration has given Greek Airways,
the national air carrier, a safety rating of 2, which is conditionally
unsatisfactory. For further information, contact the U.S. Department
of Transportation at 1-800-322-7873 or visit Website http://www.faa.gov/avr/iasa/index.htm
. For information regarding U.S. DoD policy on specific carriers, contact
DoD at 1–618–256–4801.</text>
</para>
</summary>
</apsummary>
<analysis>
<para>
<portionmark>
<US-SECURITY>
<US-CLASS CLASS="UNCLASSIFIED"/>
</US-SECURITY>
</portionmark>
<text>The U.S. Federal Aviation Administration has given the national
air carrier, Greek Airways, a safety rating of 2, which is conditionally
unsatisfactory. For further information travelers may contact the U.S.
Department of Transportation at 1-800-322-7873, or visit the FAA internet
website at http://www.faa.gov/avr/iasa/index.htm . The U.S. Department
of Defense assesses some carriers for suitability as official provides of
air services. For information regarding Do<?Pub _newline?>D policy on specific
carriers, travelers may contact DoD at 1–618–256–4801.</text>
</para>
</analysis>
</ap>
</AVIATION_SAFETY_OVERSIGHT>
</ENTRY_REQUIREMENTS>
</US_FOREIGN_MISSION> -
Difference betwwen weblogic.xml & weblogic-application.xml
Hi,
Can someone explain the Difference betwwen weblogic.xml & weblogic-application.xml in a portal application with some sample examples relavant to portal use cases.
RegardsThose files are not specific to portal applications. WEB-INF/weblogic.xml configures WebLogic specific settings for web applications. META-INF/weblogic-application.xml configures WebLogic specific settings for JEE applications.
http://download.oracle.com/docs/cd/E21764_01/web.1111/e13706/overview.htm#i1067610 has lots of information about applications in WLS. -
Output XML to Application Server
Hi,
I have successfully output the contents of an xml document object (if_ixml_document) using the following code (where p_xml_document is my xml document object):
TYPES:
BEGIN OF xml_line,
data(256) TYPE x,
END OF xml_line.
DATA:
streamfactory TYPE REF TO if_ixml_stream_factory,
ostream TYPE REF TO if_ixml_ostream,
renderer TYPE REF TO if_ixml_renderer,
ls_xml TYPE xml_line,
lt_xml_table TYPE TABLE OF xml_line,
v_xml_size TYPE i.
Transfer contents of xml document object into an internal table.
streamfactory = g_ixml->create_stream_factory( ).
ostream = streamfactory->create_ostream_itable( table = lt_xml_table ).
renderer = g_ixml->create_renderer( ostream = ostream document = p_xml_document ).
renderer->render( ).
v_xml_size = ostream->get_num_written_raw( ).
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = v_xml_size
filename = 'c:\hr_sl\aaa_sunlife.xml'
filetype = 'BIN'
CHANGING
data_tab = lt_xml_table.
My problem is I really need to output the XML to the application server, so I need to replace the call to cl_gui_frontend_services=>gui_download with something that will download the xml to the app server.
I've tried using OPEN DATASET/TRANSFER/CLOSE DATASET, and while I am getting a file created on the app server, it only contains one line of XML.
My code looks lile this:
OPEN DATASET l_ofile FOR OUTPUT IN BINARY MODE.
Transfer xml to dataset
LOOP AT lt_xml_table INTO ls_xml.
TRANSFER ls_xml TO l_ofile.
ENDLOOP.
Close the dataset.
CLOSE DATASET l_ofile.
I've searched and searched on SDN and have not found an answer. Any help would be greatly appreciated.
Thanks!
Edited by: Russell Hergott on Jan 16, 2008 10:52 PMhi boss,
some of the code may be useful for u .
try like this sending into the internal table and then try ....
*& Report ZTESTPROGRAMFORUPLOAD
REPORT ZTESTPROGRAMFORUPLOAD message-id zmsg.
tables:pa0002.
types:begin of ty_pa0000,
pernr like pa0000-pernr,
endda like pa0000-begda,
end of ty_pa0000.
types:begin of ty_pa0002,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
end of ty_pa0002.
data:it_pa0000 type standard table of ty_pa0000 with header line,
it_pa0002 type standard table of ty_pa0002 with header line.
data: v_pernr like pa0002-pernr,
v_lines type i.
DATA: W_MSG(150) TYPE C.
SELECTION-SCREEN BEGIN OF BLOCK FILE WITH FRAME TITLE TEXT-FIL.
*SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: P_PC RADIOBUTTON GROUP RAD USER-COMMAND USR. "PC
*SELECTION-SCREEN COMMENT 3(5) TEXT-SC1.
PARAMETERS: P_UNIX RADIOBUTTON GROUP RAD DEFAULT 'X'. "UNIX
*SELECTION-SCREEN COMMENT 11(5) TEXT-SC2.
parameters:p_file like rlgrap-filename.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK FILE.
at selection-screen on value-request for p_file.
perform f4_help.
START-OF-SELECTION.
*---Get the active employyes
select pernr
endda
from pa0000
into table it_pa0000 up to 100 rows
where endda >= sy-datum
and begda <= sy-datum
and stat2 = '3'.
if sy-subrc = 0.
sort it_pa0000 by pernr endda descending.
delete adjacent duplicates from it_pa0000 comparing pernr.
endif.
select pernr
begda
endda
vorna
nachn
from pa0002
into table it_pa0002
for all entries in it_pa0000
where pernr = it_pa0000-pernr.
sort it_pa0002 by pernr.
delete adjacent duplicates from it_pa0002 comparing pernr.
append it_pa0002.
endloop.
END-OF-SELECTION.
describe table it_pa0002 lines v_lines .
*---get data into Application Server.
PERFORM OUTPUT_CORPEDIA_VENDOR_FILE .
SKIP 2.
WRITE:/ 'FILE NAME :' , P_FILE .
WRITE:/ 'NO OF RECORDS DOWNLOADED : ', V_LINES .
*& Form f4_help
text
--> p1 text
<-- p2 text
form f4_help .
IF P_UNIX = 'X'.
F4 help for UNIX
CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
EXPORTING
DYNPFIELD_FILENAME = 'P_FILE'
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
FILETYPE = 'P'
LOCATION = 'A'
SERVER = ''.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH TEXT-E01 P_FILE.
ENDIF.
ELSEIF P_PC = 'X'.
F4 help for PC
clear p_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = P_FILE
MASK = ',..'
MODE = '0 '
TITLE = 'Choose File'
IMPORTING
FILENAME = P_FILE
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
ENDIF.
endform. " f4_help
*& Form OUTPUT_CORPEDIA_VENDOR_FILE
text
--> p1 text
<-- p2 text
form OUTPUT_CORPEDIA_VENDOR_FILE .
IF P_PC = 'X'.
data: v_pcfile type string.
v_pcfile = p_file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = v_pcfile
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = it_pa0002.
sort it_pa0002 by pernr.
delete adjacent duplicates from it_pa0002.
else.
data: outrec(200) type c .
OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE encoding DEFAULT.
loop at it_pa0002.
outrec+0(8) = it_pa0002-pernr.
outrec+18(8) = it_pa0002-begda.
outrec+36(8) = it_pa0002-endda.
outrec+54(40) = it_pa0002-vorna.
outrec+104(40) = it_pa0002-nachn.
transfer outrec to p_file.
clear outrec.
endloop.
CLOSE DATASET OUTREC.
IF SY-SUBRC = 0.
CLEAR W_MSG.
CONCATENATE 'Corpedia Vendor Demographic File successfully written to:'
P_FILE
INTO W_MSG SEPARATED BY SPACE.
ULINE. SKIP.
WRITE : W_MSG.
ENDIF.
ENDIF.
endform. " OUTPUT_CORPEDIA_VENDOR_FILE
regards,
venkat. -
Move xml to application server
Hi gurus
iam converting sap data into xml and now iam able to download the file onto presentation server properly.
now i want to write the file onto application server.
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_ostream TYPE REF TO if_ixml_ostream,
l_renderer TYPE REF TO if_ixml_renderer,
l_document TYPE REF TO if_ixml_document.
l_streamfactory = l_ixml->create_stream_factory( ).
l_ostream = l_streamfactory->create_ostream_itable(
table = l_xml_table ).
l_renderer = l_ixml->create_renderer( ostream = l_ostream
document = l_document ).
l_rc = l_renderer->render( ).
Saving the XML document
l_xml_size = l_ostream->get_num_written_raw( ).
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_xml_size
filename = 'c:\satish\sample_trans.xml'
filetype = 'BIN'
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.HI KUMAR
I TRIED THAT IT DIDNT WORK.
DATA: XML_TABLE TYPE TABLE OF XML_LINE.
L_OSTREAM = L_STREAMFACTORY->CREATE_OSTREAM_ITABLE(
TABLE = XML_TABLE ).
CLEAR P_FILE.
CONCATENATE SY-DATUM4(2) SY-DATUM6(2) SY-DATUM(4) INTO V_DATLO.
CONCATENATE P_OUT V_DATLO P_OFILE '.XML' INTO P_FILE.
OPEN DATASET P_FILE FOR OUTPUT IN BINARY MODE." ENCODING DEFAULT.
IF SY-SUBRC = 0.
LOOP AT XML_TABLE INTO XML_TABLE_WA.
TRANSFER XML_TABLE_WA TO P_FILE.
ENDLOOP.
ELSE.
MESSAGE E001(02) WITH 'UNABLE TO OPEN THE FILE FOR OUTPUT'.
WRITE :/ 'UNABLE TO OPEN THE FILE FOR OUTPUT'.
ENDIF.
CLOSE DATASET P_FILE. -
Hello
I create with a transfomation a xstring
and with the fm SCMS_XSTRING_TO_BINARY I create a table.
This table I can download by fm gui_download and I can open the file
with a xml-editor - it works.
But if I do the same, but download to the application server, there is an error,
I cant open the xml-file.
I'm looping throught the table what fm SCMS_XSTRING_TO_BINARY give me back
For each loop I call TRANSFER TO dataset
I can see, the last record is filled out with 0 (Hex 00)
I think this is the problem - by dowload with fm GUI_DOWNLOAD, I can set the file lenght,
but by download to the application server I can't
Thanks for any help
DanielHi Daniel and thank you in advance for availability.
The code is good for me ... to do something like this:
lv_null_string = cl_abap_conv_in_ce => UCCP ('0000 ').
LOOP AT lt_stream ASSIGNING <fs>.
IF sy-tabix = lines (lt_stream). "only the last row must not be absolutely length
FIND FIRST OCCURRENCE OF lv_null_string IN <fs>
IN BYTE MODE MATCH OFFSET lv_null_length.
TRANSFER <fs> TO e_filename LENGTH lv_null_length.
ELSE.
TRANSFER <fs> TO e_filename.
ENDIF.
ENDLOOP.
CLOSE DATASET e_filename.
What do you think?
Then I need your opinion, yesterday I turned the file, which was initially in BINARY MODE, in TEXT MODE, using:
* Before the function
CALL FUNCTION 'SCMS_BINARY_TO_STRING'
EXPORTING
input_length = lv_length
IMPORTING
text_buffer = lv_xml_string
TABLES
binary_tab = lt_stream
* And then writing
OPEN DATASET FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
TRANSFER lv_xml_string TO e_filename.
CLOSE DATASET e_filename.
Do you think this workaround will produce an equally correct file of XML or is it more correct (formally) write a binary file?
I ask this because I don't understand why we are the only ones to have this kind of problem around ... there is no other case in SCN. -
Content-type: application/xml and Application server 9
I have a web service running on Application server 9, implemented using netbeans and JAX-WS.
When a client sends a request to it with:
Content-type: application/xml
the request is rejected because the server does not recognise the mime type.
Specifically, the response is:
HTTP/1.1 415 Unsupported Media Type
X-Powered-By: Servlet/2.5
Content-Type: text/plain; charset=iso-8859-1
Date: Fri, 01 Sep 2006 14:49:04 GMT
Server: Sun Java System Application Server Platform Edition 9.0
Connection: close
Everything works fine when the request has:
Content-type: text/xml
Is there a way to make my web service accept content type of 'application/xml'?
-Tony Beaumont
Aston University
beaumoajI have fixed this for myself, i.e. decompile, replace in jar.
My problem was that most tools define the encoding but code was simply testing
if( contentType.equalsIgnoreCase( "text/xml" ) )
so sending xml from other tools that send contentType
"text/xml;encoding=UTF-8" or some such, like soap tools, would mean no XML was seen.
Is the proper source available for XSQL? -
I can't to download xml example application PRODUCT CATALOG
Hi, i'm a registered user, but i can't to download sample product catalog, http://www.oracle.com/technology/tech/xml/xdk_sample/ProductCatalogSample.html
Please, give me advise - how to download it!
ThanksThank YOU!!!!!!!!!!!
Can you also give links to next examples:
* customer managment application sample and employee managment information using xsql and building product orders
*Employee Information Management using the XSQL page publishing framework
*Building Product Orders with New Oracle9i Database XML Features and the Oracle9i XDK
http://www.oracle.com/technology/sample_code/tech/xml/index.html -
Localization of a XML Phone Application
Phone has support for multiple languages. The particular language can be selected in phone menu by a user. Unfortunately it seems that XML Application environment is not multi-language ready.
Despite user's preference, the phone ask for English variant of XML Application (see following HTTP request) anytime:
GET /Application.xml HTTP/1.0
Host: 10.0.0.1:80
User-Agent: Cisco/SPA508G-7.4.9a (E05FB9824F9D)(sipuraspa)
x-CiscoIPPhoneModelName: SPA508G
x-CiscoIPPhoneDisplay: 128x64
x-CiscoIPPhoneSDKVersion: NA
Accept-Language: en
Connection: close
Is it bug in firmware ?
Is there a MACRO/variable (something like $(LANG) or so) that can be used in XML Application URL construction as workaround for such bug ? Or other idea how to use XML Applications in multi-language environment ?
Any hint will be appreciated ...Well, some progress with 7.5.* version.
Value of Locale configuration tag is used as Accept-Language now. Default value of Locale is en-US so default request header is
Accept-Language: en-US
Unfortunately, Locale is not free-text, only few values are accepted here so no solution for worldwide customers ...
And, of course, such feature (e.g. the content of locale is used as accept-language also) is not documented anywhere (as far as I know).
It's hard job to be Cisco's customer ...
Related: SPA Language -
Hi,
I have 2 EAR´s deployed on an OC4J (10.1.2) Standalone:
uncomsso - SingleSignOn
uncomtvv - Main App.
My server.xml is as follows:
<application name="uncomsso" path="../applications/singlesignon.ear" />
<application name="uncomtvv" path="../applications/uncomtvv.ear"
parent="uncomsso"/>
I have many jars in the singlesignon.ear/lib that must be shared to uncomtvv.ear.
I tought that with the parent application tag, this could be possible, but even with the tag on the server.xml, I´m getting java.lang.ClassNotFoundException.
How can I make the jars on the singlesignon.ear/lib be available to the uncomtvv.ear classes?
Any clarification will be appreciated,
Thanks,
MuriloActually, it seems to search the classes first on the WEB-INF/classes of uncomtvv web module and then, instead of searching the lib directory of uncomtvv EAR, it searches the lib dir of singlesignon EAR and finally the instance classloader...
Anybody can explain me why it doesn´t look for the classes on the lib dir of the uncomtvv EAR?
( The jars in lib dir of uncomtvv.ear are referenced by the MANIFEST.MF of META-INF web-module )
Thanks, -
Read xml from application server
Hello guys,
I have craeted program read xml file from presentation server. its working fine...
below is program
now i want to program read xml file from Application server.
so please give me some idea for that.........
<MODIFIED BY MODERATOR - RESPECT THE 2,500 CHARS LIMIT>
thanks
jigar
Edited by: Alvaro Tejada Galindo on Jan 12, 2010 11:50 AMHi
U need to just replace the fm to upload the file with command OPEN DATASET / READ DATASET / CLOSE DATASET: if you upload the data from application server in the same internal table loaded by fm for presentation your report should be the same
Max -
How to get Soap Request xml in application.cfc
Hi
if api getting soap request using cfhttp like below:
<cfxml variable="mydata">
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header />
<soapenv:Body>
<ns:service_soap_call soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<login>test</login>
<password>test</password>
</ns:service_soap_call>
</soapenv:Body>
</soapenv:Envelope>
</cfxml>
<cfhttp url="http://sm.iclp-dubai.ae/research/wsdl/MyPointsBank.cfc?wsdl" method="post" charset="utf-8" result="myresult">
type" value="text/xml">
<cfhttpparam type="header" name="SOAPAction" value="">
<cfhttpparam name="soapInput" type="xml" value="#trim(mydata)#"/>
</cfhttp>
then how to get Soap Request in application cfc.
like :
<cfif IsSOAPRequest() >
<cfset soapreq = GetSOAPRequest() />
</cfif>
I want to validate the soap xml Request before calling targeted CFC.
Any suggestion!.Let me see whether I understand. Are you attempting to achieve something like this:
test.cfc
<cfcomponent output="no">
<cffunction name="testFunction" returntype="any" access="remote">
<cfargument name="soapInput">
<cfset var inputXML = arguments.soapInput>
<cfset var soapBodyText="">
<cfset var noBodyTextError="">
<cftry>
<cfset soapBodyText = xmlSearch(inputXML,"//soapenv:Body/text()")[1].xmlValue>
<cfsavecontent variable="noBodyTextError"><?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>java.lang.Exception: Body not found.</faultstring></cfsavecontent>
<cfif trim(soapBodyText) is "">
<cfthrow>
</cfif>
<cfreturn inputXML>
<cfcatch type="any">
<cfreturn noBodyTextError>
</cfcatch>
</cftry>
</cffunction>
</cfcomponent>
tester.cfm
<cfxml variable="mydata">
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wor="https://www.worldmilesafrica.com">
<soapenv:Header/>
<soapenv:Body>
</soapenv:Body>
</soapenv:Envelope>
</cfxml>
<cfinvoke webservice = "http://127.0.0.1:8500/workspace/wsTest/test.cfc?wsdl"
method = "testFunction"
returnVariable = "result">
<cfinvokeargument name="soapInput" value="#trim(mydata)#" >
</cfinvoke>
<cfdump var="#result#"> -
Critical: Adding session-config to web.xml cause application NOT to start
I added the <session-config> element under <web-app> in web.xml:
<session-config>
<session-timeout>30</session-timeout>
</session-config>
Now the app won't start!
The reason: the built-in sun app server removes context-root attribute from <web-module> element in domain.xml when the app tries to start!
Please fix this ASAP, guys!I placed it in the wrong place. After following the instructions contained in the Technical FAQ (below), it worked.
Add the following element in your web.xml file, placing it after the mapping for the error servlet and before the welcome file list:
<session-config>
<!-- Set global default timeout to 60 minutes -->
<session-timeout> 60 </session-timeout>
</session-config> -
We want to pull data out of an Oracle database, apply a style
sheet against it (to change it into HTML) and save the results
to a database table or flatfile. Was looking at using PL/SQL or
Java or a combination.
What is the recommended way of doing this using Oracle?
nullWhile you can use Lotus XSL there will be performance advantages
using the Oracle one due to its integration into the parser. It
should be available here in beta form by the end of the month.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Michael Dockham (guest) wrote:
: Can a person simply use LotusXSL? When will this product be
out
: that you are referring to?
: Thanks
: Oracle XML Team wrote:
: : Once we release our XSL Processor, you will be able to pull
: data
: : from the database and either XML tag it, change it to HTML or
: : even generate the DDL that will allow it to be stored into
: other
: : tables.
: : Oracle XML Team
: : http://technet.oracle.com
: : Oracle Technology Network
: : Michael Dockham (guest) wrote:
: : : We want to pull data out of an Oracle database, apply a
: style
: : : sheet against it (to change it into HTML) and save the
: results
: : : to a database table or flatfile. Was looking at using
: PL/SQL
: : or
: : : Java or a combination.
: : : What is the recommended way of doing this using Oracle?
null -
SPA 50X and XML Application URL
Hello Guys,
I made a XML application which runs just fine on a SPA 525 but not on the SPA 502 (have not tested on other 50X phones).
The issue is that the URL I return in a MenuItem for the tag <url> gets cut by the phone when it request it.
The Flow is
Phone Requests
http://192.168.9.207/MyPhoneBridge/myphonebridge.aspx?extension=102&model=SPA123
and gets in return
<?xml version="1.0" encoding="UTF-8"?>
<CiscoIPPhoneMenu><Title>Bla BLa</Title>
<Prompt>Bla Bla Bla</Prompt><MenuItem>
<Name>Name1</Name>
<URL>http://192.168.9.207:80/MyPhoneBridge/myphonebridge.aspx?extension=102&model=SPA123&extensionstatus=yes</URL>
</MenuItem>
<MenuItem>
<Name>Name1</Name>
<URL>http://192.168.9.207:80/MyPhoneBridge/myphonebridge.aspx?extension=102&model=SPA123&presenceinfo=yes</URL>
</MenuItem>
<MenuItem>
<Name>Name3</Name>
<URL>http://192.168.9.207:80/MyPhoneBridge/myphonebridge.aspx?extension=102&model=SPA123&fwdrules=yes</URL>
</MenuItem>
<SoftKeyItem><Name>Select</Name><URL>SoftKey:Select</URL><Position>1</Position></SoftKeyItem><SoftKeyItem><Name>Exit</Name><URL>Key:Services</URL><Position>2</Position></SoftKeyItem></CiscoIPPhoneMenu>
Which ever entry i select now, i only see the request from the phone for http://192.168.9.207:80/MyPhoneBridge/myphonebridge.aspx?extension=102
All Arguments are cut. The this play then writes
XML format error or invalid applicationNote that there is XML Phone Applications space dedicated to XML Phone Applications questions.
But it seems to be rather obvious issue. '&' is not allowed char in URL (it is generic rule, nothing special for SPA502). Such special char needs to be escaped accordingly. So replace all occurrences of '&' by '&'. It should help.
By the way, it is mentioned in documentation.
Rate useful advices. It will help others to search solutions.
Maybe you are looking for
-
Can I daisy chain 30" apple monitor to thunderbolt HD on macbook pro?
I have a 30" apple monitor plugged into this adapter: http://foliovision.com/2009/12/apple-dual-dvi-mini-displayport-adapter-mb571z that in turn is plugged into the thunderbolt port as well as one USB port on my 2011 macbook pro i7. I want to
-
Please help me , my camera raw doesn't open on photoshop or bridge
my camera raw doesn't open on photoshop cs6 or adobe bridge :S and i don't know what is the reason , when i try to open any of my raw photos i get this message so what should i do ? please any one help me here thanks
-
How to fill out POST HTML forms from my Java Application?
Hi - I am writing a little Java GUI program that will allow a user to fill out data from the GUI and then submit that data. When they submit the data (two text fields) I want to take the two text fields and submit them via the POST form method of a H
-
HT201359 I cannot buy from game and apple store pleasea do the needful thanks
I cannot buy from game and from App Store please do the needful thanks
-
Why occur CGS error when create OPS database
When I create database on oracle 8.1.7 OPS,I got a error message "ora-29702 error occurred in cluster group service operation".I have successfully tested the watchdog service.The node monitor service and cluster service has been started.Does anyone k