Passing null values to the attributes of a CAF operation
Hi,
In CAF I am trying to fetch data through Web Service. For this I need to pass null value for the attributes of the operation.If I set the value to null it gives me missing parameter as the error.
Can anyone tell me how to pass null values to the attributes of a CAF operation?
Hi Xavier,
Declare the two variables of type if_wd_contex_node for e.g. lv_node and if_wd_context_element for e.g. lv_element. Now in the first one lets say lv_node get the refrence of dynamically created node like:
lv_node = wd_context->get_child_node('<node name>').
Then get the refrence of element like:
lv_element = lv_node->get_element( ). (You can also pass index as parameter check the method API)
then just set the value of attribute you want like:
lv_element->set_attribute( exporting name = '<attribute name>' value = '<your value>').
Regards,
Neha
Similar Messages
-
How do I pass a null value to the reportDocument?
I'm using CR 2008 and VS 2005.
I am using a stored procedure as the datasource for one of my report, which we run using the C# API. The stored procedure is expecting a NULL in certain cases and I find I cannot pass a NULL with my current code:
// Here I get the parameter
// If we are dealing with an empty string or a NULL value, let's give it
// a value of a space so that Crystal's DLLs don't choke.
if ((value.Length == 0) || (value == "NULL"))
value = " ";
arrParams.Add(value);
Object strParam = arrParams<i>;
this.reportDocument1.SetParameterValue(num, strParam);
The stored procedure parameter type is INT so in the report it shows up as NUMBER.
How do I get a NULL value to the stored procedure?
Thanks.See if this does the trick:
Dim crParameterDiscreteValue As New CrystalDecisions.Shared.ParameterDiscreteValue()
crParameterDiscreteValue.Value = Nothing
C# would look something like;
CrystalDecisions.Shared.ParameterDiscreteValue crParameterDiscreteValue;
crParameterDiscreteValue = new CrystalDecisions.Shared.ParameterDiscreteValue();
crParameterDiscreteValue.Value = null;
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup -
How can I pass a value to the command prompt?
I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?
Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
There are also overloaded forms of exec(),
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
Another lower level approach that does not require extension associations to be quite as well set up is:
Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
Note that
rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
Start the script with #!bash or whatever the interpreter's name is.
Mark the script file itself with the executable attribute.
Alternatively start the script interpreter, e.g.
Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}"; -
Passing null value to a Date field in OPA
Hi,
We are using Determinations server of OPA.
I have created OPA web service proxy classes and using java client class for calling methods of OPA web service.
Webcenter calls OPA web service for validating business logic. There is a Date field in OPA which is not mandatory, if web service is called with date value, logic is working fine, else if we pass null value or ignore setting Date value all conclusion of the rule is becoming false.
for example :
If agreement exists, pass agreement expiry date.
Setting Input attributes if date is not null:
global.setAGREEMENTEXPDATE(new DateAttributeType());
global.getAGREEMENTEXPDATE().setDateVal(xmlGrogerianCalendar);
if there is no agreement, pass null for agreement expiry date
we are not setting Date attribute and sending request to the server
Is it need to pass Attribute if it is not mandatory and has no value?
If yes, how to pass null value?
Please help on this.
Thanks,
SriAll optional parameters needs to be send to the OPA Determination Server, if value is not known then that attribute should be set to the "Uncertain" value as shown below.
global.setAGREEMENTNUMBER(new TextAttributeType());
global.getAGREEMENTNUMBER().setUncertainVal(new UncertainValue());
Thanks,
Sri -
Need help Take out the null values from the ResultSet and Create a XML file
hi,
I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
null values to XML File. When i run the program it works alright and adds the null and not null values to
the file. But when i pass the boolean value to take out the null values it would not take it out and adds
the null and not null values.
Please look at the code i am posing. I am showing step by step where its not adding the null values.
Any help is always appreciated.
Thanks in advance.
============================================================================
Frame1 Class
============
public class Frame1 extends JFrame{
private JPanel contentPane;
private XQuery xQuery1 = new XQuery();
private XYLayout xYLayout1 = new XYLayout();
public Document doc;
private JButton jButton2 = new JButton();
private Connection con;
private Statement stmt;
private ResultSetToXML rstx;
//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
//Component initialization
private void jbInit() throws Exception {
//setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
contentPane = (JPanel) this.getContentPane();
xQuery1.setSql("");
xQuery1.setUrl("jdbc:odbc:SCANODBC");
xQuery1.setUserName("SYSDBA");
xQuery1.setPassword("masterkey");
xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
contentPane.setLayout(xYLayout1);
this.setSize(new Dimension(400, 300));
this.setTitle("Frame Title");
xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
jButton2.setText("Get XML from DB");
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch(java.lang.ClassNotFoundException ex) {
System.err.print("ClassNotFoundException: ");
System.err.println(ex.getMessage());
try {
con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
stmt = con.createStatement();
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jButton2_actionPerformed(e);
contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
void jButton2_actionPerformed(ActionEvent e) {
try{
OutputStream out;
XMLOutputter outputter;
Element root;
org.jdom.Document doc;
root = new Element("PINFO");
String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
ResultSet rs = stmt.executeQuery(query);
/*===========This is where i am passing the ResultSet and boolean=======
===========value to either add the null or not null values in the file======*/
rstx = new ResultSetToXML(rs,true);
} //end of try
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
======================================================================================
ResultSetToXML class
====================
public class ResultSetToXML {
private OutputStream out;
private Element root;
private XMLOutputter outputter;
private Document doc;
// Constructor
public ResultSetToXML(ResultSet rs, boolean checkifnull){
try{
String tagname="";
String tagvalue="";
root = new Element("pinfo");
while (rs.next()){
Element users = new Element("Record");
for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
tagname= rs.getMetaData().getColumnName(i);
tagvalue=rs.getString(i);
System.out.println(tagname);
System.out.println(tagvalue);
/*============if the boolean value is false it adds the null and not
null value to the file =====================*/
/*============else it checks if the value is null or the length is
less than 0 and does the else clause in the if(checkifnull)===*/
if(checkifnull){
if((tagvalue == null) || tagvalue.length() < 0 ){
users.addContent((new Element(tagname).setText(tagvalue)));
else{
users.addContent((new Element(tagname).setText(tagvalue)));
else{
users.addContent((new Element(tagname).setText(tagvalue)));
root.addContent(users);
out=new FileOutputStream("c:/XMLFile.xml");
doc = new Document(root);
outputter = new XMLOutputter();
outputter.output(doc,out);
catch(IOException ioe){
System.out.println(ioe);
catch(SQLException sqle){Can someone please help me with this problem
Thanks. -
How to pass a value from the report to a form ( BIT OF URGENT ).
Hi,
I had created a "Form on a Table with Report" on the report I had remove the edit link and set one of the column feilds that functionality. Now I want to know how to pass that value that is clicked ( having hyper link ) on to the form where it runs a SQL query and then displays the reuslts on the form.
Illustrating with an example.
I am having these following columns on the report ( these are the results for the join statement )
JOBNUM JOBNAME DEPTNUMBER SAL EMPNO LNAME FNAME
In the above JOBNUM is having Hyper link as I removed the edit image.
Now this is area I am having problem. When the user clicked on the JOBNUM then on form it should display 20 other columns( pulled from 5 other tables ) which are related to that particualr JOBNUM.
Anybody give me a solution in which area I have to include my SQL statement and how to pass that selected value to that SQL statement.
Cheers,
KrishnaHi Ron,
I am doing exaclty what you have suggested me but no luck. I started changing the DEMO_CUSTOMERS application to my requirements.The report is working fine and on the report I have created a page attribute to the Hyper linked column and linked that to the page 2 and assign that attribute with #JOBNUM#.
I am able to pass that value on to form when I click on the JOBNUM. But the problem is I am not able to pass that value into the SQL query so that my query pulls 20+ columns on to the Form ( which is second page ).
Small clarification... On the form region it is said FORM NAME and type is HTML is that is the way the APEX was designed or does it need to say region type as FORM.
Thanks for your help in advance.
Cheers,
Krishna. -
How can I get null values for the later weeks
Hi All,
When I execute this code I get the records till current week.
How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
Thanks,
Vikram
DECLARE
v_query VARCHAR2(4000);
TYPE ref_cursor IS REF CURSOR;
v_refcur ref_cursor;
v_sum NUMBER;
v_id NUMBER;
v_name VARCHAR2(1000);
v_weeknum NUMBER;
v_pernum NUMBER;
v_numOfWeeks NUMBER := 5;
BEGIN
v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
FROM s_postn) postn_tbl
WHERE lvl_6_id = 5767
AND fiscal_year = 2008
AND b.week_num < 4
AND b.period_num = 3
AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
ORDER BY postn_tbl.postn_name, b.week_num';
OPEN v_refcur FOR v_query;
LOOP
FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
EXIT WHEN v_refcur%notfound;
dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
END LOOP;
END;
This is the output when I execute this code.
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W2 COMM CNTRL TAM 216 12561.4
P3W3 COMM CNTRL TAM 216 2027.1
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
This is the output I'd like to get
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W4 COMM CNTRL ISAM 213
P3W5 COMM CNTRL ISAM 213
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W4 COMM CNTRL ISAM 273
P3W5 COMM CNTRL ISAM 273
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W4 COMM CNTRL TAM 213
P3W5 COMM CNTRL TAM 213
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W4 COMM CNTRL TAM 273
P3W5 COMM CNTRL TAM 273
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
P3W4 Damon Walters
P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PMSure, in a Single SQL ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>-- Start Of Test Data --
satyaki>with week_tab
2 as
3 (
4 select 1 period_num, 1 week_num, 10 bkg1 from dual
5 union all
6 select 1, 2, 40 from dual
7 union all
8 select 1, 3, 30 from dual
9 union all
10 select 1, 2, 20 from dual
11 union all
12 select 1, 1, 10 from dual
13 union all
14 select 1, 1, 20 from dual
15 union all
16 select 1, 3, 10 from dual
17 union all
18 select 2, 1, 15 from dual
19 union all
20 select 2, 2, 20 from dual
21 union all
22 select 2, 3, 10 from dual
23 union all
24 select 2, 1, 15 from dual
25 union all
26 select 2, 2, 30 from dual
27 union all
28 select 2, 3, 20 from dual
29 )
30 -- End Of Test Data --
31 select period_num,
32 week_num,
33 (
34 select sum(week_tab.bkg1)
35 from week_tab
36 where period_num = m.period_num
37 and week_num = m.week_num
38 group by week_num, period_num
39 ) sum_bkg1
40 from (
41 select dum.week_num,
42 wk.period_num
43 from (
44 select 1 week_num from dual
45 union all
46 select 2 from dual
47 union all
48 select 3 from dual
49 union all
50 select 4 from dual
51 union all
52 select 5 from dual
53 ) dum ,
54 (
55 select distinct period_num
56 from week_tab
57 ) wk
58 ) m;
PERIOD_NUM WEEK_NUM SUM_BKG1
1 1 40
1 2 60
1 3 40
1 4
1 5
2 1 30
2 2 50
2 3 30
2 4
2 5
10 rows selected.
Elapsed: 00:00:00.48
satyaki>Regards.
Satyaki De. -
How to Pass Parameter/Value to the second page????
Hi,
I am trying to display same popup window when I click on ADD,UPDATE and VIEW buttons. I don’t have any problem in displaying the popup when I click on ADD and UPDATE button but with VIEW button I wanted to display the popup at read only mode. In order to do that I have created a bean with session scope and set a ‘SetActionListener‘on VIEW button and set ‘from’ property to true and ‘to’ property to "#{IndividualSummaryDetails.readOnlyAddress}". I could not pass the value of readOnlyAddress to the popup. How can I pass the value of readOnlyAddress to the popup?
This value becomes true when I click on view button. If I pass that value to the popup then I can set the read only property of the fields on the popup with that value. So that the fields become read only.
Here is my View button
<af:commandButton text="#{CoreProperties['Global.commandButton.View']}"
windowHeight="450" windowWidth="600"
useWindow="true"
action="dialog:FromIndividualSummaryDetailsToAddress"
id="justView">
<af:setActionListener from="#{true}"
to="#{IndividualSummaryDetails.readOnlyAddress}"/>
Here is my Bean
public class IndividualSummaryDetails {
private Boolean readOnlyAddress;
public IndividualSummaryDetails() {
readOnlyAddress = true;
public Boolean isReadOnlyAddress() {
return readOnlyAddress;
public void setReadOnlyAddress(Boolean readOnlyAddress) {
this.readOnlyAddress = readOnlyAddress;
This value becomes true when I click on view button. If I pass that value to the popup then I can set the read only property of the fields on the popup with that value. So that the fields become read only.
Message was edited by:
V.PirabaWe need to use portlet events for sending parameters across different pages.
Following documents can give you insight on this :
1. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/PRIMER.PORTLET.PARAMETERS.EVENTS.HTML
2. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/DESIGNING.PAGES.USING.PDKJAVA.SAMPLE.EVENT.WEB.PROVIDER.HTML
-AMJAD. -
Passing multiple values to the QUERY BDOC parameter?
hi All,
Below is my Query BDOC Anchor Before Query Execute even handler... I'm trying to pass multiple values to the bq.Z_PartnerFunction query parameter... i.e.
PARTNER_FCT in( '00000012','ZDIVMGR','ZAREADR')
is it possible without creating new Query Bdoc ?
====================================
Private Sub aempchoicewinTCWSearchTAnchor_beforeQueryExecute(ByRef bq As BusinessQuery, ByRef cancel As Boolean)
If Not bq Is Nothing Then
If sWcDummy = "Yes" Then
bq.WcDummy = sWcDummy
End If
bq.Z_PartnerFunction = "00000012"
If ctrlZ_Territory.Value <> "" Then
bq.PRNB_TerrID = "*" & ctrlZ_Territory.Value
End If
End If
End Sub
================================
Thanks in advance
HetalHi,
it looks that you already enhanced the query BDoc because you have a new query parameter bq.Z_PartnerFunction, right?
To which BDoc parameter is this BQ parameter mapped? And how looks the related where clause?
For a single filter normally a "=" operator is used. Therefore your example with "in" won't work.
If these three partner functions are fixed then you might hardcoded them directly in the where clause (supposed the BDoc is not used somewhere else where you don't want to have this filter).
Or you might add 3 new BDoc parameters, add 3 new where clauses using a disjunction for them (and using an embracing bracket). In this case always all these 3 BQ parameters need to be filled (or all stay empty) to avoid a SQL syntax error.
Regards,
Wolfhard -
Passing different values to the same servlet
Hi,
Is there a way to pass different values to the same servlet?
Background:
I have a database that I query to acquire a list of customers, then I show each customer as a link, that when clicked will show details of that customer. (The customer table is dynamic so I can't create a new page for each customer)
When using JSP what I do is
//Do query database
while (rst.next())
String cust = rst.getString ("cust");
out.write("<a href = \"cust2.jsp?cust=" + cust + " \" >" + cust + "</a> ");
}Then on the cust2.jsp. I will use
String str = request.getParameter ("cust");to acquire the customer to get details of.
Is there a way to do the same using servlets?
I could swap to JSP when creating this particular part of the project but it won't look good and it would help me learn a few things when there is another way.I want to know if there is a way to pass a variable from a webpage link like in my JSP example using servlets.
Here is what I wanted to do:
I have a webpage that contains customer names and each name has a link to the same servlet (let's say the link is famia/servb). I want servb to show detailed information about the customer my visitor clicked in the webpage.
The logic I was thinking is to pass a variable to this servlet, then I can use that variable to know which customer should I query in my database. So that I can show the details to my users.
Here lies my problem, I don't know how I can pass this variable, or even know which customer my visitor clicked. I can't use a new servlet for each client since the customer is in a database and if my customer base grows then I would need to create a lot more web page that does the same thing.
The JSP example I gave is how I will be coding it if I am using JSP, but now I am using servlets. So I was wodnering if there is a way to do this using servlet. Or should I stay with using JSP for this particular logic and just call servb after the JSP page acquired the variable.
I'm trying not to use "<original URL> + ? + <variable> = <value>" (eg: http://www.famia.net/customer?cust=famia) as the means for passing the variable. (or in the example as a means of passing variable cust with value famia) -
Passing variable values to the navigation block
Hi WAD Experts,
I have a requirement regarding passing variable values to the navigation block. User requirement is first give the selections on the selection screen and then after executign output should display in browser. In the output page we have a navigation block. So when user gives selections those selections should also populate in the navigation block. Your help will be appreciated.
Prasad.Hi,
if your variable is 'Changeable at Query Navigation' the chosen values will appear in the Navigationblock.
Variables which are 'Not Changeable at Query Navigation'
will not appear.
You can set this Property when you create a Variable.
Kind Regards,
Alican Polat -
Hi ,
Facing strange issue in Xpath debatching in Orchestration.
Getting following error in construct shape:
The part 'part' of message 'Message_In_Copy' contained a null value at the end of the construct block
Code inside the construct block:
sXpath = System.String.Format("/*[local-name()='Customers' and namespace-uri()='http://Debatch.Customer']/*[local-name()='Customer' and namespace-uri()='http://Debatch.Customer' and position()={0}]", nLoopCount);
System.Diagnostics.Debug.WriteLine(sXpath);
Message_In_Copy= xpath(Message_In, sXpath);
Schema used:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Debatch.Customer" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Debatch.Customer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Customers">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Customer">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="id" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Can anyone help me out ? to identify the root cause for above issue.
Thanks,
Kind Regards,
girsh
girishkumar.aI agree with Shankycheil here, querying XPath will return XMLNode and thus can't be assigned to XMLNode.
But for debatching in Orchestration using Xpath is not a very good idea.
Because using XPATH loads the complete message in memory(XML Structure) and then performs processing.
This approach is always prone to throwing Out of Memory exception and low in performance also.
Therefore I would suggest you to perform debatching by calling XML Disassembler(XMLReceive) pipeline.
As pipeline works with Stream it will have better performance and you will also get complete control over the messages.
Refer the below samples for debatching using XML Receive pipeline within Orchestration.
Comparrison between XPATH and ReceivePipeline for Debatching:-
De-batching within an orchestration using XPath or calling a pipeline
Debatching within Orchestration using Pipeline-
http://tech-findings.blogspot.in/2013/07/debatchingsplitting-xml-message-in.html
https://jeremyronk.wordpress.com/2011/10/03/how-to-debatch-into-an-orchestration-with-a-pipeline/
Thanks,
Prashant
Please mark this post accordingly if it answers your query or is helpful. -
How to put the null value at the last of a select list
Hello,
I have a select list with a null value, I want the null value to be the last value in the list. It always appears in the top of the list, Desc and Asc order is not working.
Thank you in advance!
Edited by: Najla on Apr 1, 2013 10:37 PMHi,
Edited by: Howard (... in Training) on Apr 2, 2013 1:xx PM
The statement - I don't think it is possible to arrange the order of the null option in a select list.- is close. You can't control the order of the Null value if you add the Null value through the GUI. However, it can be added and controlled as part of a SELECT ...
One way is to add NULL to the "SELECT". Here the Yes/No are hard-coded but they could have been selected from a table:
select d, r from
select 'YES' d, 'Y' r from dual
union all
select 'No' d, 'N' r from dual
union all
select Null d, '<Null>' r from dual
) order by 1 desc NULLS lastHoward -
Restricting Null Values in the report
Hi All,
I have a aggregated feild displayed in the bottom of the report and sorted on the report on that field to show me top results.
When I try to run the report, Null values are coming first in the report (Displayed as NaN).
I want to restrict these null values from the report.
Please guide me on this.
Thanks in advance,
Imtiaz.Okay. If you are using sum, you could use the following: <?sum(Petrofac-ECRevenue[.!=''])?>
ensure that the path to the element is correct. Are you using a syntax like <?sum(current-group()/Petrofac-ECRevenue)?>
Send me an email to [email protected] with your xml data and RTF if you can't make it work. -
Placing null values in the database
Hi
I'm using a PreparedStatement object to try to input a null value in the database. I'm using the following code :
pstmt = connection.prepareStatement("INSERT INTO Conditions (Deal,ConditionDate,Condition ) VALUES (?,?,?)");
pstmt.setString(1,"aDealName");
pstmt.setNull(2,Types.TIMESTAMP);
pstmt.setString(3,"aCondition");
pstmt.executeUpdate();
and I get the "SQL Data type out of range" error message.
Does anyone know what might be the problem?
Thanks for any help
LGSHi
Sorry for the lack of info.
I am using Microsoft Access 2000, the JDBC-ODBC driver v.4.00.6019
and my TableModel class is as follows:
public class MyTableModel2 extends AbstractTableModel
private Connection conn;
private Vector rows,columnHeads,firstColumn,columnTypes,columnWidths;
private Validation validate;
private String query;
private int numColumns;
String tableType;
String [] columnNamesFrontPage = {"Deal","Spread","Next Event Date","Closing Date"};
String [] columnNamesCommentsPage = {"Date","Input By","Spread","Comment"};
String [] columnNamesTimetable = {"Date","Event"};
String [] columnNamesConditionsTable = {"Date","Condition"};
private DBase2 db2;
private String tableName,primKeyColName;
public MyTableModel2 ()
{} //Empty Constructor
public MyTableModel2 ( Connection dbConn,String aQuery,String table)
conn = dbConn;
rows = new Vector();
columnHeads = new Vector();
query = aQuery;
tableType = table;
firstColumn = new Vector();
db2 = new DBase2 (dbConn);
columnTypes = new Vector();
columnWidths = new Vector();
validate = new Validation();
}//End of Constructor
public int getColumnCount ()
return columnHeads.size();
}//End of Method
public int getRowCount ()
return rows.size();
}//End of Method
public Object getValueAt(int aRow, int aColumn)
Vector row = (Vector)rows.elementAt(aRow);
return row.elementAt(aColumn);
}//End of Method
public String getColumnName (int column)
String columnName = "";
if(tableType == null)
columnName = columnHeads.get(column).toString();
else if (tableType == "FrontPage")
columnName = columnNamesFrontPage [column];
else if (tableType == "CommentsPage")
columnName = columnNamesCommentsPage [column];
else if (tableType == "Timetable")
columnName = columnNamesTimetable [column];
else if (tableType == "ConditionsTable")
columnName = columnNamesConditionsTable [column];
return columnName;
}//End of Method
public void query()
try {
Statement statement = conn.createStatement();
ResultSet rs = statement.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
tableName = rsmd.getTableName(1);
Integer i2;
boolean moreRecords = rs.next();
for (int i = 1; i <= rsmd.getColumnCount(); ++i)
if (i == 1)
primKeyColName = rsmd.getColumnName(i);
else
columnHeads.addElement(rsmd.getColumnName(i));
if (rsmd.getColumnTypeName(i).equals("DATETIME"))
i2 = new Integer (8);
else
int i1 = rsmd.getColumnDisplaySize(i);
i2 = new Integer (i1);
columnWidths.add(i2);
String colTypeName = rsmd.getColumnTypeName(i);
columnTypes.addElement(colTypeName);
//JOptionPane.showMessageDialog(null,"Column Width="+i2,"Column Types ",JOptionPane.INFORMATION_MESSAGE);
do {
rows.addElement( getNextRow (rs,rsmd));
while (rs.next() );
catch ( SQLException sqlex )
sqlex.printStackTrace();
}//End of Method
private Vector getNextRow( ResultSet rs, ResultSetMetaData rsmd )
throws SQLException
Vector currentRow = new Vector();
for ( int i = 1; i <= rsmd.getColumnCount(); ++i )
Object o = rs.getObject(i);
if (o == null)
String emptyCell = "";
currentRow.addElement(emptyCell);
else if(o.getClass().toString().equalsIgnoreCase("class java.sql.Timestamp") )
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy");
String formatted = sdf.format(o);
currentRow.addElement(formatted);
else
if (i == 1)
firstColumn.addElement(o);
else
currentRow.addElement(o);
return currentRow;
}//End of Method
public void refresh ()
rows.clear();
firstColumn.clear();
try {
Statement statement = conn.createStatement();
ResultSet rs = statement.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
boolean moreRecords = rs.next();
do {
rows.addElement( getNextRow (rs,rsmd));
while (rs.next() );
catch ( SQLException sqlex )
sqlex.printStackTrace();
this.fireTableDataChanged();
}//End of Method
public boolean isCellEditable (int row, int col)
return true;
}//End of Class
public void setValueAt(Object value, int row, int col)
String objToString = value.toString();
int columnWidth = Integer.parseInt(columnWidths.elementAt(col).toString());
if(objToString.length() > columnWidth)
validate.errorMessageDisplay("Maximum column width is "+columnWidth+" characters - Please retype","INPUT ERROR");
else if (columnTypes.elementAt(col).toString().equals("DATETIME") && validate.validDateInput(objToString) == false)
validate.errorMessageDisplay("Date is required in form dd/mm/yy - Please retype","INPUT ERROR");
else if (columnTypes.elementAt(col).toString().equals("DOUBLE") && validate.validNumberInput(objToString) == false)
validate.errorMessageDisplay("This column will accept numbers only - Please retype","INPUT ERROR");
else
//JOptionPane.showMessageDialog(null,columnTypes.elementAt(col).toString(),"Column Name ",JOptionPane.INFORMATION_MESSAGE);
Vector rowA = (Vector)rows.elementAt(row);
rowA.setElementAt(value,col);
fireTableCellUpdated(row, col);
String newInput = value.toString();
int id = Integer.parseInt(firstColumn.elementAt(row).toString());
String colName = columnHeads.elementAt(col).toString();
String query = "UPDATE "+tableName+" SET "+colName+" = '"+newInput+"' WHERE "+primKeyColName+" = "+id+"";
db2.modifyDatabase(query);
refresh();
}//End of Method The method in which I am using PreparedStatement is:
public void updateConditionsTable (String aDealName, String aCondition)
int result = 0;
try
pstmt = connection.prepareStatement("INSERT INTO Conditions (Deal,ConditionDate,Condition )"+
" VALUES (?,?,?)");
// pstmt = connection.prepareStatement("INSERT INTO Conditions (Deal,ConditionDate,Condition )"+
// " VALUES (?,?,?)");
pstmt.setString(1,aDealName);
pstmt.setNull(2,Types.INTEGER);
pstmt.setString(3,aCondition);
pstmt.executeUpdate();
catch (SQLException sqlex ) {
//sqlex.printStackTrace();
String output = "YOUR INPUT IS NOT VALID - PLEASE TRY AGAIN\n";
output = output + sqlex.toString();
JOptionPane.showMessageDialog(null,output,"SQL Error",JOptionPane.INFORMATION_MESSAGE);
//return result;
}//Closes Method Once again, thanks for any help
Maybe you are looking for
-
Error while creating presentation variable in Dashboard prompts.
Hi Team I have been going through the guidelines and procedures to create a presentation variable to use it in the dashboard prompt ( mentioned in the previous blogs ) .I followed the below link : http://oraclebi.blog.com/example-of-presentation-vari
-
ICloud doesn't work with numbers
I d like to Share my Files in numbers on my iPad 1 with the iPad 2 which Belongs to my wife by unsing iCloud . We are using the Same Apple id and have switched on iCloud and back up. But we Get no Files for Sharing with iCloud. Any help for this issu
-
Can you EXPORT A PDF file as an attachment in an Email to 1,000 subscribers
Wish to send a PDF file to a group of subscribers ( 1,000 + ) thru an email attachment
-
Programming on a Macbook?
Hey guys! I am pretty new to the Mac universe, so please bear with me. The other day in class, I was talking with a fellow classmate about how I like my Macbook, and I started showing him the basic features (multi-touch pad, iWork, iLife, etc) and he
-
Vertical Column Selection in Safari
In FireFox, in an online table, one can select a vertical column of items by holding down the Cmd key and left-clicking and dragging the mouse cursor down the column. This is handy for selecting a group of files for downloading. The column can be sel