Pass XML Data Between PDFs Using openDoc
I would like to pass data from one PDF to another in the openDoc() function. How do I pull the XML data, store it, then push it to the second PDF?
Thanks
Steve,
I tried the code in the http package in the Appendix A section of your book. Each time i try a POST I get a HTTP/1.1 400 Bad Request error from the server. I can successfully do a GET from URLs. I have pretty much copied your code verbatim. Any ideas?
Thanks,
Sunder
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
See the "Working with XML Messages" section starting on page 242 of my Building Oracle XML Applications. It covers how to Send and Receive XML messages over the web through HTTP GET and HTTP POST as well as specifically Example 6-30 that illustrates how to receive a posted XML message in a servlet and process it.
Hope this helps.<HR></BLOCKQUOTE>
null
Similar Messages
-
How to pass XML data between applications
Hi,
can any one tell me how to pass XML data between applications
Thanks in advance
SudheerSteve,
I tried the code in the http package in the Appendix A section of your book. Each time i try a POST I get a HTTP/1.1 400 Bad Request error from the server. I can successfully do a GET from URLs. I have pretty much copied your code verbatim. Any ideas?
Thanks,
Sunder
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
See the "Working with XML Messages" section starting on page 242 of my Building Oracle XML Applications. It covers how to Send and Receive XML messages over the web through HTTP GET and HTTP POST as well as specifically Example 6-30 that illustrates how to receive a posted XML message in a servlet and process it.
Hope this helps.<HR></BLOCKQUOTE>
null -
Trying to pass xml data to a web service
I'm working on an Apex application that is required to pass data to a web service for loading into another (non Oracle) system. The web service expects two stings as input, the first string is simply an ID, the second string is an xml document. I generate an xml 'string' using PL/SQL in an on-submit process prior to invoking the web service. If I pass regular text for the second parameter, the web service returns an error message which is stored in the response collection and displayed on the page as expected. When I pass the the xml data, I get a no data found error and the response collection is empty. I have tried this in our development environment on Apex 3.1.2 (database version 10.2). I also tried this on our Apex 4.0.2 sandbox (with the same Oracle 10.2 database). I have found that once I have nested xml, I get the no data found message, if I pass partial xml data, I get the error response from the web service. Perhaps I am not generating the xml correctly to pass to the web service (this only just occurred to me as I write this)? Or is there an issue passing xml data from Apex to the web service? Any help will be greatly appreciated! here is the code I use to generate the xml string:
declare
cursor build_data is
select u_catt_request_buid,u_catt_request_name,u_catt_cassette_buid,u_catt_cassette_name
,u_project_name,u_sub_project,replace(u_nominator,'ERROR ','') u_nominator
,replace(replace(u_going_to_vqc,'Yes','true'),'No','false') u_going_to_vqc
,u_promoter,u_cds,u_terminator
,u_primary_trait,u_source_mat_prvd,u_pro_resistance_1,u_vector_type
,nvl(u_my_priority,'Medium') u_my_priority
,replace(replace(u_immediate_trafo,'Yes','true'),'No','false') u_immediate_trafo
,replace(replace(u_new_bps_cmpnt,'Yes','true'),'No','false') u_new_bps_cmpnt
,u_compnt_name,u_new_cmpt_desc,initcap(u_target_crop) u_target_crop,u_corn_line
,u_plant_selection,u_num_of_ind_events,u_num_plants_per_event,u_molecular_quality_events
,replace(replace(u_field,'Yes','true'),'No','false') u_field
,u_t1_seed_request,u_potential_phenotype,u_submission_date
,u_sequence_length,u_trait,u_frst_parent,u_frst_parent_vshare_id,u_cds_vshare_id
,constructid,cassetteid,description
from temp_constructs_lims
order by constructid,description;
v_xml_info varchar2(350);
v_xml_header varchar2(1000);
v_xml_data clob;
v_xml_footer varchar2(50);
v_create_date varchar2(10);
v_scientist_name v_users.full_name%type;
v_scientist_email v_users.email_address%type;
v_primas_code construct.fkprimas%type;
v_nominator_name v_nominators.full_name%type;
v_file_length number;
begin
-- initialize variables
v_create_date := to_char(sysdate,'YYYY-MM-DD');
v_xml_data := null;
-- get name and email address
begin
select full_name,email_address
into v_scientist_name,v_scientist_email
from v_users
where ldap_account = :F140_USER_ID;
exception when no_data_found then
v_scientist_name := '';
v_scientist_email := '';
v_scientist_name := 'Test, Christine';
v_scientist_email := '[email protected]';
end;
-- set up xml file
if :OWNER like '%DEV%' then
v_xml_info := '
<?xml version="1.0" encoding="utf-8"?>
<exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="deService"
xsi:schemaLocation="deService http://mycompany.com/webservices/apexdataexchange/schemas/RTPCATT.xsd">
else
v_xml_info := '
<?xml version="1.0" encoding="utf-8"?>
<exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="deService"
xsi:schemaLocation="deService http://mycompanyprod.com/webservices/apexdataexchange/schemas/RTPCATT.xsd">
end if;
-- populate xml header records
v_xml_header := '<header xmlns="">
<stdXmlVer>2.0</stdXmlVer>
<sendingUnit>'||:P36_UNIT_NUMBER||'</sendingUnit>
<sendingPerson>'||v_scientist_name||'</sendingPerson>
<notification>'||v_scientist_email||'</notification>
<creationDate>'||v_create_date||'</creationDate>
</header>
<entities xmlns="">
for rec in build_data loop
begin
-- get primas code for current construct
select fkprimas
into v_primas_code
from construct
where constructid = rec.constructid;
exception when no_data_found then
v_primas_code := null;
end;
begin
-- get nominator name for current construct
select full_name
into v_nominator_name
from v_nominators
where nominator_id = rec.u_nominator;
exception
when no_data_found then
v_nominator_name := null;
when invalid_number then
v_nominator_name := catt_pkg.full_name_from_user_id(p_user_id => rec.u_nominator);
v_nominator_name := 'Test, Christine';
end;
v_xml_data := v_xml_data||'
<Construct>
<requestBUID>'||rec.u_catt_request_buid||'</requestBUID>
<requestName>'||rec.u_catt_request_name||'</requestName>
<cassetteBUID>'||rec.u_catt_cassette_buid||'</cassetteBUID>
<cassetteName>'||rec.u_catt_cassette_name||'</cassetteName>
<scientist>'||v_scientist_name||'</scientist>
<projectNumber>'||v_primas_code||'</projectNumber>
<subProject>'||rec.u_sub_project||'</subProject>
<comments>'||rec.description||'</comments>
<nominator>'||v_nominator_name||'</nominator>
<goingToVqc>'||rec.u_going_to_vqc||'</goingToVqc>
<primaryTrait>'||rec.u_primary_trait||'</primaryTrait>
<sourceMatPrvd>'||rec.u_source_mat_prvd||'</sourceMatPrvd>
<prokaryoticResistance>'||rec.u_pro_resistance_1||'</prokaryoticResistance>
<vectorType>'||rec.u_vector_type||'</vectorType>
<priority>'||rec.u_my_priority||'</priority>
<immediateTrafo>'||rec.u_immediate_trafo||'</immediateTrafo>
<newComponent>'||rec.u_new_bps_cmpnt||'</newComponent>
<componentName>'||rec.u_compnt_name||'</componentName>
<newComponentDescription>'||rec.u_new_cmpt_desc||'</newComponentDescription>
<targetCrop>'||rec.u_target_crop||'</targetCrop>
<Line>'||rec.u_corn_line||'</Line>
<plantSelection>'||rec.u_plant_selection||'</plantSelection>
<numOfIndEvents>'||rec.u_num_of_ind_events||'</numOfIndEvents>
<numOfPlantsPerEvent>'||rec.u_num_plants_per_event||'</numOfPlantsPerEvent>
<molecularQualityEvents>'||rec.u_molecular_quality_events||'</molecularQualityEvents>
<toField>'||rec.u_field||'</toField>
<potentialPhenotype>'||rec.u_potential_phenotype||'</potentialPhenotype>
</Construct>
end loop;
-- complete xml data
v_xml_footer := '
</entities>
</exchange>
-- complete submission data
:P36_XML_SUBMISSION := null;
:P36_XML_SUBMISSION := v_xml_info||v_xml_header||v_xml_data||v_xml_footer;
:P36_XML_SUBMISSION := trim(:P36_XML_SUBMISSION);
end;Here is an example of :P36_XML_SUBMISSION:
<?xml version="1.0" encoding="utf-8"?> <exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="deService" xsi:schemaLocation="deService http://mycompany.com/webservices/apexdataexchange/schemas/RTPCATT.xsd"> <header xmlns=""> <stdXmlVer>2.0</stdXmlVer> <sendingUnit>10</sendingUnit> <sendingPerson>Test, Christine</sendingPerson> <notification>[email protected]</notification> <creationDate>2011-12-20</creationDate> </header> <entities xmlns=""> <Construct> <requestBUID>150000123</requestBUID> <requestName>AA0000123</requestName> <cassetteBUID>160000123</cassetteBUID> <cassetteName>AB000123</cassetteName> <scientist>Test, Christine</scientist> <projectNumber>T000123</projectNumber> <subProject>Discovery Plus</subProject> <comments>AA0000123 From CATT on 20-DEC-11 </comments> <nominator>Test, Christine</nominator> <goingToVqc>true</goingToVqc> <primaryTrait>promoter::intron::transit:gene::terminator</primaryTrait> <sourceMatPrvd>seed - stuff</sourceMatPrvd> <prokaryoticResistance></prokaryoticResistance> <vectorType>Plant Vector</vectorType> <priority>Medium</priority> <immediateTrafo>true</immediateTrafo> <newComponent></newComponent> <componentName>gene</componentName> <newComponentDescription>unknown function; sequence has some similarity to others</newComponentDescription> <targetCrop>Crop</targetCrop> <Line>Inbred</Line> <plantSelection>smidge ver2</plantSelection> <numOfIndEvents>6</numOfIndEvents> <numOfPlantsPerEvent>1</numOfPlantsPerEvent> <molecularQualityEvents>NA</molecularQualityEvents> <toField>true</toField> <potentialPhenotype></potentialPhenotype> </Construct> </entities> </exchange>My application page is accessed by an action from another page. The user reviews the data in a sql report region. When the use clicks on the Upload (SUBMIT) button, the xml string is generated first and then the web service is invoked. I have tried passing a simple string as the second parameter ("dummydata") and partial data in the xml string ("<sendingPerson>Test, Christine</sendingPerson>") the web service returns this error in both cases:
Error[Validate Data]: (XML) = Data at the root level is invalid. Line 1, position 1.. Cannot validate the XML! Data Exchange not accepted!Once I pass the entire xml string above, I get an Oracle-01403: no data found error. I have opened the web service in IE and pasted my xml input string and received a valid, verified result, so I am sure that the generated xml is correct. I have spoken with the web service developer; there are no log entries created by the web service when I submit the full xml string, so I suspect the failure is in the Apex application.
Thanks,
Christine
I should add that once I have nested tags in the xml, I get the Oracle no data found error ("<header xmlns=""> <stdXmlVer>2.0</stdXmlVer> <sendingUnit>10</sendingUnit> </header>"). I f I do not have nested tags in the xml ("<notification>[email protected]</notification> <creationDate>2011-12-20</creationDate>"), I get the web service response (error).
Edited by: ChristineD on Dec 20, 2011 9:54 AMOk, I think I'm getting closer to thinking this all the way through. When I have used clobs in the past, I've always used the DBMS_CLOB package. I use this to create a temp clob and then make the above calls. I had to go find an example in my own code to remember all of this. So, here is another suggestion... feel free to disregard all the previous code snippets..
declare
cursor build_data is
select u_catt_request_buid,u_catt_request_name,u_catt_cassette_buid,u_catt_cassette_name
,u_project_name,u_sub_project,replace(u_nominator,'ERROR ','') u_nominator
,replace(replace(u_going_to_vqc,'Yes','true'),'No','false') u_going_to_vqc
,u_promoter,u_cds,u_terminator
,u_primary_trait,u_source_mat_prvd,u_pro_resistance_1,u_vector_type
,nvl(u_my_priority,'Medium') u_my_priority
,replace(replace(u_immediate_trafo,'Yes','true'),'No','false') u_immediate_trafo
,replace(replace(u_new_bps_cmpnt,'Yes','true'),'No','false') u_new_bps_cmpnt
,u_compnt_name,u_new_cmpt_desc,initcap(u_target_crop) u_target_crop,u_corn_line
,u_plant_selection,u_num_of_ind_events,u_num_plants_per_event,u_molecular_quality_events
,replace(replace(u_field,'Yes','true'),'No','false') u_field
,u_t1_seed_request,u_potential_phenotype,u_submission_date
,u_sequence_length,u_trait,u_frst_parent,u_frst_parent_vshare_id,u_cds_vshare_id
,constructid,cassetteid,description
from temp_constructs_lims
order by constructid,description;
v_xml_info varchar2(350);
v_xml_header varchar2(1000);
v_xml_data clob;
v_xml_footer varchar2(50);
v_create_date varchar2(10);
v_scientist_name v_users.full_name%type;
v_scientist_email v_users.email_address%type;
v_primas_code construct.fkprimas%type;
v_nominator_name v_nominators.full_name%type;
v_file_length number;
v_xml_body varchar2(32767); --added by AustinJ
v_page_item varchar2(32767); --added by AustinJ
begin
-- initialize variables
v_create_date := to_char(sysdate,'YYYY-MM-DD');
--v_xml_data := null; --commented out by AustinJ
dbms_lob.createtemporary( v_xml_data, FALSE, dbms_lob.session ); --added by AustinJ
dbms_lob.open( v_xml_data, dbms_lob.lob_readwrite ); --added by AustinJ
-- get name and email address
begin
select full_name,email_address
into v_scientist_name,v_scientist_email
from v_users
where ldap_account = :F140_USER_ID;
exception when no_data_found then
v_scientist_name := '';
v_scientist_email := '';
v_scientist_name := 'Test, Christine';
v_scientist_email := '[email protected]';
end;
-- set up xml file
if :OWNER like '%DEV%' then
v_xml_info := '
<?xml version="1.0" encoding="utf-8"?>
<exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="deService"
xsi:schemaLocation="deService http://mycompany.com/webservices/apexdataexchange/schemas/RTPCATT.xsd">
else
v_xml_info := '
<?xml version="1.0" encoding="utf-8"?>
<exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="deService"
xsi:schemaLocation="deService http://mycompanyprod.com/webservices/apexdataexchange/schemas/RTPCATT.xsd">
end if;
-- populate xml header records
v_xml_header := '<header xmlns="">
<stdXmlVer>2.0</stdXmlVer>
<sendingUnit>'||:P36_UNIT_NUMBER||'</sendingUnit>
<sendingPerson>'||v_scientist_name||'</sendingPerson>
<notification>'||v_scientist_email||'</notification>
<creationDate>'||v_create_date||'</creationDate>
</header>
<entities xmlns="">
for rec in build_data loop
begin
-- get primas code for current construct
select fkprimas
into v_primas_code
from construct
where constructid = rec.constructid;
exception when no_data_found then
v_primas_code := null;
end;
begin
-- get nominator name for current construct
select full_name
into v_nominator_name
from v_nominators
where nominator_id = rec.u_nominator;
exception
when no_data_found then
v_nominator_name := null;
when invalid_number then
v_nominator_name := catt_pkg.full_name_from_user_id(p_user_id => rec.u_nominator);
v_nominator_name := 'Test, Christine';
end;
v_xml_body := '
<Construct>
<requestBUID>'||rec.u_catt_request_buid||'</requestBUID>
<requestName>'||rec.u_catt_request_name||'</requestName>
<cassetteBUID>'||rec.u_catt_cassette_buid||'</cassetteBUID>
<cassetteName>'||rec.u_catt_cassette_name||'</cassetteName>
<scientist>'||v_scientist_name||'</scientist>
<projectNumber>'||v_primas_code||'</projectNumber>
<subProject>'||rec.u_sub_project||'</subProject>
<comments>'||rec.description||'</comments>
<nominator>'||v_nominator_name||'</nominator>
<goingToVqc>'||rec.u_going_to_vqc||'</goingToVqc>
<primaryTrait>'||rec.u_primary_trait||'</primaryTrait>
<sourceMatPrvd>'||rec.u_source_mat_prvd||'</sourceMatPrvd>
<prokaryoticResistance>'||rec.u_pro_resistance_1||'</prokaryoticResistance>
<vectorType>'||rec.u_vector_type||'</vectorType>
<priority>'||rec.u_my_priority||'</priority>
<immediateTrafo>'||rec.u_immediate_trafo||'</immediateTrafo>
<newComponent>'||rec.u_new_bps_cmpnt||'</newComponent>
<componentName>'||rec.u_compnt_name||'</componentName>
<newComponentDescription>'||rec.u_new_cmpt_desc||'</newComponentDescription>
<targetCrop>'||rec.u_target_crop||'</targetCrop>
<Line>'||rec.u_corn_line||'</Line>
<plantSelection>'||rec.u_plant_selection||'</plantSelection>
<numOfIndEvents>'||rec.u_num_of_ind_events||'</numOfIndEvents>
<numOfPlantsPerEvent>'||rec.u_num_plants_per_event||'</numOfPlantsPerEvent>
<molecularQualityEvents>'||rec.u_molecular_quality_events||'</molecularQualityEvents>
<toField>'||rec.u_field||'</toField>
<potentialPhenotype>'||rec.u_potential_phenotype||'</potentialPhenotype>
</Construct>
'; --modified by AustinJ
dbms_lob.writeappend( v_xml_data, length(v_xml_body), v_xml_body); --added by AustinJ
end loop;
-- complete xml data
v_xml_footer := '
</entities>
</exchange>
-- complete submission data
v_page_item := null;
v_page_item := v_xml_info||v_xml_header||wwv_flow.do_substitutions(wwv_flow_utilities.clob_to_varchar2(v_xml_data))||v_xml_footer; --added by AustinJ
:P36_XML_SUBMISSION := trim(v_page_item); --added by AustinJ
dbms_lob.close( v_xml_data); --added by AustinJ
if v_xml_data is not null then
dbms_lob.freetemporary(v_xml_data); --added by AustinJ
end if; --added by AustinJ
end;This code will use the Database to construct your clob and then convert it back to a varchar2 for output to your webservice. This makes more sense to me now and hopefully you can follow what the process is doing.
You don't technically need the two varchar2(36767) variables. I used two for naming convention clarity sake. You could use just one multipurpose variable instead.
If you have any questions, just ask. I'll help if I can.
Austin
Edited by: AustinJ on Dec 20, 2011 12:17 PM
Fixed spelling mistakes. -
Attach an xml to a pdf using ADS
Hi all,
I have a scenario where we are sending a Base64 encoded PDF (a bill) and the corresponding xml data from SAP backend on level 4.6C to PI 7.1. In PI we should attach the xml data to the PDF. I have already succeeded to do this using iText but we have a requirement to do this with ADS instead. In Netweaver Developer Studio I created an example project where I am reading a PDF as a byte array, also reading an XML file and try to attach the XML to the PDF using the ADS api. The project successfully built in NWDS but when I am running the project it failes.
I am using standard code to attach the xml stream to the pdf, the error message is thrown when the following line is executed:
IWDPDFDocument document = context.execute();
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.impl.PDFDocumentAccessibleContextWDImpl.execute(PDFDocumentAccessibleContextWDImpl.java:99)
at com.eon.xi.dijnet.base64.PdfWithAttachment.addAttachmentWithSap(PdfWithAttachment.java:129)
at com.eon.xi.dijnet.base64.PdfWithAttachment.main(PdfWithAttachment.java:218)
Caused by: java.lang.NullPointerException
at com.sap.tc.webdynpro.services.sal.deployment.core.DeployableObjectInternal.getSystemDeployableObjectName(DeployableObjectInternal.java:53)
at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.AdobeFormHelper.<clinit>(AdobeFormHelper.java:115)
... 3 more
Is it the problem with the PDF that it is not an Interactive Form?
Or the problem is simply that I am trying to run the project on my local machine where ADS is not available?
Thanks for your help.
Pal
Edited by: Pal Somogyi on Oct 17, 2010 10:30 PM
Edited by: Pal Somogyi on Oct 18, 2010 11:44 AMHi Pal,
There is a requirement to generate an Adobe Form using SAP Interactive forms, and then, send this PDF to a non-SAP system using Base-64 encoding. The receiving system will decode this file and re-generate a PDF.
I have heard that this could be done in the PI layer, using the Conversion Agent.
Another approach which I can think of is convert PDF to binary and then use the cl_http_utility=>encode_base64 to convert binary to base64.
You have mentioned that you have had to send a base 64 encoded pdf. Could you pelase guide me through the process?
Thanks,
Preethi. -
Code to translate xml data into html using jaxp ?
Hi all !!
Could you please send me code to translate xml data into html using jaxp
i am sending my xml file and xsl file
its urgent
my xml file is :
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="scenario.xsl"?>
<scenarioReport>
<node name="node1">
<netObjId>124 </netObjId>
<result>undefined</result>
<report>The cell is 124.</report>
<action>qsdsqdqsd </action>
</node>
<node name="node 3">
<netObjId>124 </netObjId>
<result>undefined</result>
<report>Result is unresolved because ...</report>
<action>No action</action>
</node>
<node name="node 2">
<netObjId>124 </netObjId>
<result>undefined</result>
<report>qsdqsdqs </report>
<action>qsdsqd</action>
</node>
<node name="node 5">
<netObjId>124 </netObjId>
<result></result>
<report> </report>
<action> </action>
</node>
<node name="node 4">
<netObjId>124 </netObjId>
<result></result>
<report> </report>
<action></action>
</node>
</scenarioReport>
my xsl file is::
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<h2> Scenario Report</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Nodename</th>
<th align="left">netObjId</th>
<th align="left">Result</th>
<th align="left">Report</th>
<th align="left">Action</th>
</tr>
<xsl:for-each select="scenarioReport/node">
<tr>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="netObjId"/></td>
<td bgcolor="#ffffff "><xsl:value-of select="result"/></td>
<td><xsl:value-of select="report"/></td>
<td><xsl:value-of select="action"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>Must be something wrong with your XSL.
However apparently it was so urgent that you didn't have the time to look at what you posted. They just "fixed" the forum software and apparently it doesn't escape HTML that you type in any more. Or stuff that looks like HTML, either. So your post was unreadable.
If your deadline hasn't passed, try reposting that code surrounded by [pre] and [/pre]. -
How to Pass XML Data to a PDF Form and Load it into form fields
I have xml Form data in a string. I would like open a programatically launch a pdf document and pass the xml data as one of the parameters and this xml data needs to load all the form fields.
Any Idea as to how this can be done?I have the same requirement as Daminu, but from the research I have been doing it seems your reply is only partially true.
If your PDF is an XFA PDF form, with Reader Extensions enabled, and you want to keep the Reader Extensions functionality for a user to use after your programmatic manipulation, then neither of these tools will work (FDFToolkit or iText).
Upon the user opening the file once it has been programmatically modified, the user will see the following:
From what I have read, this requirement can only be fullfilled by use of LiveCycle Reader Extensions Server? Please confirm? -
How to pass xml data as objects into Database using store procedures
Hi All,
I don't have much knowledge on store procedure,can anybody help how to pass the xml as objects in Database using store procedure.
My Requirement is I have a table with three fields EMPLOYEE is table name and the fields are EMP_ID,EMP_TYPE AND EMP_DET,I have to insert the employees xml data into corresponding fields in the table.
Input Data
<ROWSET>
<ROW>
<EMP_ID>7000</EMP_ID>
<EMP_TYPE>TYPE1</EMP_TYPE>
<EMP_DET>DEP</EMP_DET>
<ROW>
<ROW>
<EMP_ID>7000</EMP_ID>
<EMP_TYPE>TYPE2</EMP_TYPE>
<EMP_DET>DEP2</EMP_DET>
<ROW>
<ROW>
<EMP_ID>7000</EMP_ID>
<EMP_TYPE>TYPE3</EMP_TYPE>
<EMP_DET>DEP3</EMP_DET>
<ROW>
<ROWSET>
So each row values has to inserted into resp fields in the table.
Regards
ManiDo you have a similar structure in your stored procedure ?
In that case you can simply call the procedure from soa using db adapter and do a mapping to assign the values. -
Jdev 11g, Passing data between pages using data control
Hi,
I'm fairly new to Jdev, J2EE, and ADF. I created a project using the tutorial "Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces" (found here: http://www.oracle.com/technology/obe/obe11jdev/11/ejb/ejb.html).
Data model part seems to work fine. I am able to connect to the database and print out a record using the sample client.
Now I'm trying to build the web front end for it. I started using a data control and ADF to make the components. I built a search page by dragging and dropping my method from the data control onto a form. I set the action on the form to go to a detail page which I put a database node from my table product_group. My thinking was the user would put in the id and then be taken to the next page that has the detail on it.
When I ran the page though the search page seemed to execute fine but the detail page came up blank. There were no runtime errors. I think data is not being passed to the next page.
This is the code for the form on the search page:
<af:form>
<af:panelFormLayout>
<af:inputText value="#{bindings.p_id.inputValue}"
label="#{bindings.p_id.hints.label}"
required="#{bindings.p_id.hints.mandatory}"
columns="#{bindings.p_id.hints.displayWidth}"
maximumLength="#{bindings.p_id.hints.precision}"
shortDesc="#{bindings.p_id.hints.tooltip}">
<f:validator binding="#{bindings.p_id.validator}"/>
<af:convertNumber type="number"/>
</af:inputText>
<af:commandButton actionListener="#{bindings.queryProdGroupFindByID.execute}"
text="Search ID"
disabled="#{!bindings.queryProdGrouptestFindByID.enabled}"
action="search"/>
</af:panelFormLayout>
</af:form>
This is the detail page:
<af:form>
<af:panelFormLayout>
<af:panelLabelAndMessage label="#{bindings.description.hints.label}">
<af:outputText value="#{bindings.description.inputValue}"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.id.hints.label}">
<af:outputText value="#{bindings.id.inputValue}">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.id.format}"/>
</af:outputText>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.status.hints.label}">
<af:outputText value="#{bindings.status.inputValue}"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.storeId.hints.label}">
<af:outputText value="#{bindings.storeId.inputValue}"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.type.hints.label}">
<af:outputText value="#{bindings.type.inputValue}">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.type.format}"/>
</af:outputText>
</af:panelLabelAndMessage>
</af:panelFormLayout>
</af:form>
I guess what I'm asking is how does data get passed to the detail page using a data control? Also if anyone has an online book about data controls and how they work I'd appreciate that too. Too much magic going on.
Thanks in advance.
Edited by: user2936931 on May 3, 2009 5:15 PMI went to the bindings tab for my search.jspx page and found in the 'executables' table queryProdGroupFindByIDIterator. I looked in the properties for that and 'CacheResults' is set to '<default>true'. Next page still looks blank. I changed it to straight up 'true' and that didn't work either.
If I'm in the right place I guess it must be something else? -
Pass/retrieve data to PDF form using php
Hi
We are trying to build an application that goes like this.
Web based application. Document template is uploaded. User can open the template, fill in data, and save the form. PHP , Mysql
We are stuck at the stage where we need to pass some data via php into the form and then extract the filled in data from the form via php.
Does anyone have a solution to this.
Thanks
Sam
zhhealthcareTry googling "iText".
iText is JAVA based, and is capable of creating and manipulating FDF data.
For a Microsoft .net version, check out "iTextSharp", or "FDFToolkit.net"
Hope this helps... -
I have a series of 26 PDFs that are all different forms to be filled out during a real estate short sale. Each form is unique but there are several pieces of data that need to be repeadidly entered (i.e. client's name is on every single form normally multiple times.) Is there a way that I can connect the form data between each PDF so that when I fill in the data on one form it auto populates the form of the other PDFs?
I know how to do this within a single PDF (Just name the different fields the same and it copies the contents of that form box to all of the others) but I was hoping to be able to keep these PDFs seperate as normally only about half of the forms are actually needed.
Thank you for your help in advance.Why don't you store the user's information in an ACCESS database table, and pre-populate the PDF from the datasource using a 3rd party form tool.
Tools clients will need:
Internet access
PDF Reader
Tools developer will need:
iText (PHP/JAVA), iTextSharp (.net), or FDFToolkit.net (.net)
MS Access
(PHP Editor, Notepad or Visual Studio)
For more information:
http://www.fdftoolkit.net/ -
Catch / know XML Data of PDF Form (without do XML submit)
Is it possible from within a PDF form, using JS get / know XML data of the current form?
I need to get the same XML data that would be generated with "export data" feature of Adobe Professional.
Thx!Thanks Paul
But this is not exactly what I need.
I need to do something like:
var xml= xfa.host.exportData("", false);
and not really export the XML.
¿Is possible? ¿any idea?
Thanks! -
Best way to pass secure data between servers
Hello,
In the not to distant future my company wants to expand our
site to include a single sign-on, this will be made possible with
the 3rd party group that handles our customer info. Can someone
enlighten me as the most secure method of transferring user data
between these locations?
What has been proposed is to pass the login from our site to
the 3rd party, if successful pass back certain data, display and
possibly update on our site and then pass this back to the 3rd
party server.
Is CFLogin the most powerful method for login? I've used
query checks in the past, is that adequate or is CFLogin much
better? Any pointers are appreciated."Is CFLogin the most powerful method for login? I've used
query checks
in the past, is that adequate or is CFLogin much better?"
Neither, CFLogin is really just a specific purpose IF block.
Code
within the opening and closing <cflogin...> tags is run
when a user is
not logged in with the <cfloginuser...> tag. Inside
this block one
still needs to validate the credentials provided by the user,
often with
a query check.
The <cflogin...><cfloginuser...> combination
provides an easy to
interpret and use mechanism to run conditional code and
persist a user
login state from request to request. It is basically
equivalent to ones
own <cfif...> logic combined with session data for the
user state.
Under the hood it is using the same mechanisms.
I usually prefer to roll my own solution because I often want
to store
more state data about a user then is allowed with the
<cfloginuser...>
tag and the related getAuthUser() and isUserInRole()
functions. -
WSRP - Pass Custom Data between Consumer and Producer
Hello All,
I am having a couple of queries with respect to Custom Data Transfer. Consider I have a Map of values which I need to transfer between both Consumer and Producer.
For eg: the map that Consumer sends would contain "firstName", "lastName", etc... On the other hand Producer needs to do some business function based on the data and add more values to the map like "rewardPoint" etc....
On Consumer Side:
I have choice to use Backing File or IGetMarkupInterceptor to implement the preInvoke to pass the data using SimpleStateHolder.
Question: I am not able to send a simple Serializable POJO Object... I can only send primitive / default java objects like Strings, Maps of String etc. Is my understanding correct?
On Producer side:
I am able to receive the Custom Data from request. No problems. Now how to send more data from Producer to consumer. I need to add the "rewardPoints" into the map and send back.
My understanding is that if the Producer puts any values into StateHolder objects, Consumer will receive it in IGetMarkupResponseContext object in the Interceptor's postInvoke method.
Question: How do I get a handle to the IGetMarkupResponseContext object @ Producer end???
Question: Do I need to write some interceptors on Producer end? If so which file I need to use?
Any help / pointers would be greatly appreciated.
Thanks,
PazHi All,
I tried to set the data in the producer using the following command
SimpleStateHolder stateSimpleOuterReq = (SimpleStateHolder)request.getAttribute(MarkupRequestState.KEY);;
if (stateSimpleOuterReq == null) {
SimpleStateHolder state = new SimpleStateHolder();
state.addParameter("name", "data1");
request.setAttribute(MarkupResponseState.KEY, state);
I am not able to retrieve the same in consumer.
The above is a WSRP struts request.
I also tried setting the data by unwrapping the request in producer and still value is null in consumer :-(
HttpServletRequest requestq = (HttpServletRequest)((HttpServletRequestWrapper) request).getRequest();
SimpleStateHolder stateSimpleReq1 = (SimpleStateHolder)requestq.getAttribute(MarkupRequestState.KEY);
if (stateSimpleReq1 == null) {
SimpleStateHolder state = new SimpleStateHolder();
state.addParameter("name", "data1");
requestq.setAttribute(MarkupRequestState.KEY, state);
Please help me in resolving the issue. Correct me if i am doing anything wrong.
Thanks
T. Deena
Edited by: user11261911 on 12/06/2009 19:49 -
in form xml data showing perfectly but when i
converted into pdf and stored on desk top, xml data is not showing in the form(because no xml connection in form) how i can view the xml data in pdfform.in form xml data showing perfectly but when i
converted into pdf and stored on desk top, xml data is not showing in the form(because no xml connection in form) how i can view the xml data in pdfform. -
Xml data from database using jdbc
I should get the xml data from database. Is this scenario possible using jdbc adapter ? If possible, how can I get it ?. Plz help me
I suppose that probably, xml data are stored in a BlobImage Field.
You can use a Stored Procedure on Database Side, to select and put out the xml data structured in output fields or structures.
From JDBC Sender channel, you can call the SP, that raise out a Structure formatted like the XML Data stored in Xml Database field.
In your opinion, this should be a possible way to achieve this issue?
Maybe you are looking for
-
I've been trying to burn CDs since getting the new iTunes 7 and after i press burn CD, it will look like it's working until it starts to burn the first song on the playlist, and it simply says "Canceling Burn Disk this may take a minute or two" and t
-
I need help...how dom i create a sound clip on my itunes libary?
-
IDVD encoding errors when attempting to burn slide show to DVD.
iDVD fails to burn disk and fails with encoding error. Have attempted to use best, good, and professional modes of encoding to no avail.
-
IPhoto 2.0.1 Crashes When Burning a CD
iPhoto is crashing just after the disk image is created and mounted and before the burn actually begins. I tried restarting my Mac; same result. I rescued the disk image file from the Trash and used Toast to burn it (although I guess I could have use
-
NForce networking and Thomson SpeedTouch 510
I have an computer with ASUS motherboard. It have an nForce chipset. The network dies somtmes. How to fix it? EDIT: root@Litronit:/home/elis# /etc/rc.d/network restart :: Stopping Network [FAIL] :: Starting Network [BUSY] Error, eth0: ioctl SIOCGIFHW