Tausif Farooqi

Greenhorn
+ Follow
since Mar 03, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tausif Farooqi

It actually works the way I had coded it. I was getting another error and I thought it was due to incorrect syntax.
Hi, I have a case in which the result of an Oracle function call needs to be an input parameter to a procedure call. Can I configure this in iBatis in one single call? Or do I have to first execute the function and then the stored procedure (2 separate calls)?. I was trying to do it the following way, but it did not work:



I tried searching online for any example/pointers, but couldn't find anything. Any help will be much appreciated.

Thanks,

T
Hi Bill, you were right about the String contatenation part! I changed the method to this:

And it runs nearly 400 times faster than the previous method! Thanks for the help!
[ December 14, 2008: Message edited by: Tausif Farooqi ]
Thanks for the suggestion Bill, but the problem is that I can't assume that the XML will be properly formatted as its coming from an external source. I can try putting line breaks between every adjecent ">" and "<" and try what you've suggested and see if it makes a difference.
I need to write a Java method that removes multiple occurences of a node (and its contents) from within an XML (supplied as a String).

Here's a sample of the XML



I need to remove all occurences of the element "OLifEExtension" and its contents. I've written a fairly simple method given below, it works but it is very inefficient and takes a lot of time if the XML is large (>=10 MB)



I've also tried regular expressions but can't figure one that works. I've tried the following:

1. <OLifEExtension[^>]+>.+?</OLifEExtension>
2. <OLifEExtension .*?>.*?</OLifEExtension>
3. <OLifEExtension[^>]+/>|<OLifEExtension[^>]+>.+</OLifEExtension>

None of the above regular expressions work. Instead of matching the first "OLifEExtension" element, it matches everything between the first opening "OLifEExtension" and the last ending "OLifEExtension" tag.

Can anyone please tell me a more efficient way of doing this or kindly provide me with a regular expression that will do the job for me?

Many many thanks in advance.
[ December 14, 2008: Message edited by: Tausif Farooqi ]
Hi,

Does anyone know if it is possible to set a default value for an element or attribute when we use Castor to marshal an object to XML? The objects that are marshalled to XMLs are fetched from a database. Some of the fields of these objects maybe NULL and hence their coresponding XML field/attribute is not printed in the XML. Is there a way to give a default value to such fields so that even if the database value is NULL it will display the default value in the XML (other than using a null check for all such fields in Java code)?

Thanks,

Tausif
I have found a way to accomplish this mapping, but it doesn't look correct, but the funny thing is that it works!! This is how I defined my <sql-query> element within the same hbm.xml:



So even if I dont "specifically" define an element or return-property for the "Annuity" object it correctly maps the columns to the correct "Annuity" properties.

Can anyone tell me if this is a bug or a feature?
Hi,

I'm having a bit of trouble trying to map a class with multiple level of nested components to a stored procedure. It is easy to map a class with a single level of component (using a number "return-columns" within a "return-property"). But I cannot do that if my class has a component inside another component. I cannot change the nesting within the class because I am constrained by a schema. Can anyone please let me know how to map such a class? Given below is a class definition which is similar to one I have (assuming that my stored proc returns the exact number of columns required):



[ October 08, 2007: Message edited by: Tausif Farooqi ]
[ October 08, 2007: Message edited by: Tausif Farooqi ]
Sorry, I posted the question too soon, I got the jar: com.ibm.ws.webservices.thinclient_6.1.0.jar
18 years ago
Can some one tell me which jar contains this class: com/ibm/wsspi/extension/ExtensionRegistryFactory?

Many thanks,

T
18 years ago