Hi all, I am having problem creating an array using object.Factory.newInstance() method. This is what I am trying to do
I've an xml element and xmlbean generated object is called Rule. I need to create an array of Rule to use it in xmlbean genereated method setRuleArray(Rule[] args) I can't use Rule[] rule = new Rule[1]; Because when I try to use rule's methods like Rule[0].setId(1); I get a NullPointerException And I don't know how to use the Factory.newInstance() method to create an array Basically I would like to do something like the following Rule[] ruleArray = something here that creates the rule array; ruleArray[0].setId(1); someObj.setRuleArray(ruleArray); Any suggestions? Thank you Shahzad Qureshi Systems Analyst/Programmer Applications Directorate, CIOB Environment Canada [email protected]

