Computerized WorldComputerized WorldDiscussion on latest News and Events in my computerized world Articles
Chrome or Firefox - which browser to choose?
2008-09-04 15:14:00 Chrome is the newest baby in browser family or the next competitor in browser war. What ever it is, Google released their browser named Chrome. But Mozilla Firefox is the most popular browser in the world right now and Google was the major supporter for Firefox. Even while supporting it, they have built their own browser free and open source. Here we are looking at the two browsers and trying to compare them to decide whether to switch to the new one or not leaving our old but fascinating friend Firefox?Interesting features1. One Process per each tabTab is not another thread running inside the browser process; there is a separate process per tab. Even if one tab crashes, the rest of the tabs will be running as nothing happened; which was not available in Firefox. This is one of the most interesting features.2. New tab is filled with useful linksFor a new tab in Firefox, you can load a predefined page, a blank page or a predefined set of page links (using an extension). But you would... More About: News , Tools , Tech
Better use
2008-09-03 13:42:00 Spring configuration xml is used for defining the wiring between different object. It has the following format. <beans> <bean id=".." class="..."> ... </bean> ...<beans>Classes specified in the configuration file will be instantiated by Spring container. And those objects will be bound with each other accordingly. Any java class specified under attribute named "class" will be instantiated. There is no much limitations on the classes that can be used for this here. It does not need to be a Java Bean. It can be any POJO (plan old java object). The only requirement is that this class must be possible to instantiate.So why does this tags are named <beans> and <bean>? This seems to be misleading.In Spring one way of binding objects is using the beaness of java classes. But that is not that only way to bind them together, constructor can be used to bind objects. So if configuration file used tags as follows, it would be more mea... More About: Tech , Opinion , Spring
Google Web Toolkit (GWT) & Servlets - Web application tutorial
2008-09-02 14:20:00 Google Web Toolkit (GWT) and Java Servlets used in one web application. This tutorial will take you though the steps of developing a simple web application with Google Web Toolkit and J2EE Servlet Technology. The application will have a servlet on server side and one web page.PrerequisitesBetter to be familiar with developing web applications with J2EE/ServletsKnowledge on deploying a web application into Tomcat web serverSystem RequirementsJDK installedApache Tomcat web server (download, any other web server can be used)GWT (download)In brief, GWT is a framework for developing Ajax based web pages with Java. All the HTML page content will be written as Java classes and converted into a set of Javascript files. For more information on GWT, refer to official site here. http://code.google.com/webtoolkit/Introdu ctionIn this tutorial we will create a simple web application which has one page. When a user clicks a button, web page content will be updated without refreshing or leaving th... More About: Tutorial , Web Application
Is Partitioning a hard disk into multiple drives bad?
2008-08-27 13:59:00 Hard disk partitioning is almost a must, according to what I have heard so far from my colleagues and other professionals (may be same for you). I am used to partition a hard disk at least to three drives; "C" for OS (Operating System), "D" for programs and "E for other files like documents, archives. But I got a chance to read some material on hard drive performance and it completely argued my partitioning practices.When considering the speed in reading a file from hard drive following are two important points related to partitioning.1. Files in outer tracks are readable much fasterIt is a well known theory in hard disk read/writes that performance is much higher in outer tracks compared to inner tracks.2. When partitioning a hard disk, the first partition is created in the outer tracksIn creating partitions, the first partition is created in the outer most tracks while each new partition is created in inner tracks than the previous. So the partitions in a hard disk would look as t... More About: Hardware , Windows , Tech , Opinion , Disk
Cellspacing vs cellpadding - Table attributes comparison
2008-08-21 14:43:00 In HTML Table s (<table>) there are two attributes named, cellpadding and cellspacing. What is the different between cellpadding and cellspacing? Both these are capable of creating some empty space inside a table.cellspacing : space between cellscellpadding : space between the cell border and it's contentLook at the diagram to clarify this further. As the word "cellspacing" suggests, it denotes the spacing between cells; it is something easy to remember. "cellpadding" keyword can be considered in relation to the "padding" attribute in HTML/CSS; padding is used to denote the space between the content and border of box type elements. Following is a simple code example to demonstrate the difference.<table cellspacing="15px" cellpadding="20px" bgcolor="#00EE00" width="300px"> <tr> <td bgcolor="#339966"> <div style="background:#FFFFFF;"> Cell 1 ... More About: Web Design , Tech , Comparison
Cellspacing vs cellpadding - Table attributes comparison
2008-08-21 14:43:00 In HTML Table s (<table>) there are two attributes named, cellpadding and cellspacing. What is the different between cellpadding and cellspacing? Both these are capable of creating some empty space inside a table.cellspacing : space between cellscellpadding : space between the cell border and it's contentLook at the diagram to clarify this further. As the word "cellspacing" suggests, it denotes the spacing between cells; it is something easy to remember. "cellpadding" keyword can be considered in relation to the "padding" attribute in HTML/CSS; padding is used to denote the space between the content and border of box type elements. Following is a simple code example to demonstrate the difference.<table cellspacing="15px" cellpadding="20px" bgcolor="#00EE00" width="300px"> <tr> <td bgcolor="#339966"> <div style="background:#FFFFFF;"> Cell 1 ... More About: Web Design , Tech , Comparison
If Michael Phelps is a country himself alone
2008-08-18 14:07:00 What if Michael Phelps is a country himself alone rather than representing United States of America? Michael Phelps has already gathered 8 Gold medals in Beijing Olympics 2008 including 3 relays. Most of the participating countries happened to go back empty hand, so many players are participating knowing they are not up to the level of winning a medal. But consider this man, he's breaking world records in most appearances. If he is playing himself alone as a separate country named "Phelps" he would still have 5 Gold medals and ranked as 11th country in Beijing Olympic medal table. Around 200 countries will be behind him. Medal table would look as follows.RankCountry Gold1China352USA14 (19-Phelps)3Australia11.....11Phelps5He is creating new history with a set of world records and we are really proud to see such a person in this planet. We doubt any one living right now in this planet will be able to witness another performance like this in their lifetime. If they could, it will be a... More About: News , Sports
If Michael Phelps is a country himself alone
2008-08-18 14:07:00 What if Michael Phelps is a country himself alone rather than representing United States of America? Michael Phelps has already gathered 8 Gold medals in Beijing Olympics 2008 including 3 relays. Most of the participating countries happened to go back empty hand, so many players are participating knowing they are not up to the level of winning a medal. But consider this man, he's breaking world records in most appearances. If he is playing himself alone as a separate country named "Phelps" he would still have 5 Gold medals and ranked as 11th country in Beijing Olympic medal table. Around 200 countries will be behind him. Medal table would look as follows.RankCountry Gold1China352USA14 (19-Phelps)3Australia11.....11Phelps5He is creating new history with a set of world records and we are really proud to see such a person in this planet. We doubt any one living right now in this planet will be able to witness another performance like this in their lifetime. If they could, it will be a... More About: News , Sports
[Cricket] Most wickets in debut Test series - World record by Ajantha Mendi
2008-08-11 05:13:00 Most wickets by a player in his debut 3-match Test series; a 60+ years old world record has been broken. By whom? By Sri Lankan newly found precious mystery spinner Ajantha Mendis. He produced this new world record yesterday, 2008-08-10 with the wicket of Sachin Tendulkar, another master of cricket. Up to now, he has got 25 wickets in this series, and he has passed the 24 wickets record held by English bawler named Alec Bedser. Ajantha Mendis has so many variations, and so difficult to read from the hand. Most of the Indian batsmen are still struggling to play against him while he is improving with his variations and accuracy.In the current India-Sri Lanka Test series he played in all 3 matches (and 6 innings) and performed fabulously. Still he is bawling in the 2nd inning of the last Test match and 5 more wickets are left in Indian team. So we wish Mendis to get some more wickets out of those and improve his record into an untouchable one in history.Well done Menda.Update:Ajantha a... More About: Cricket , News , Sports , World , World Record
[Cricket] Most wickets in debut Test series - World record by Ajantha Mendi
2008-08-11 05:13:00 Most wickets by a player in his debut 3-match Test series; a 60+ years old world record has been broken. By whom? By Sri Lankan newly found precious mystery spinner Ajantha Mendis. He produced this new world record yesterday, 2008-08-10 with the wicket of Sachin Tendulkar, another master of cricket. Up to now, he has got 25 wickets in this series, and he has passed the 24 wickets record held by English bawler named Alec Bedser. Ajantha Mendis has so many variations, and so difficult to read from the hand. Most of the Indian batsmen are still struggling to play against him while he is improving with his variations and accuracy.In the current India-Sri Lanka Test series he played in all 3 matches (and 6 innings) and performed fabulously. Still he is bawling in the 2nd inning of the last Test match and 5 more wickets are left in Indian team. So we wish Mendis to get some more wickets out of those and improve his record into an untouchable one in history.Well done Menda.Update:Ajantha a... More About: Cricket , News , Sports , World , World Record
[Cricket] Most wickets in debut Test series - World record by Ajantha Mendi
2008-08-11 05:13:00 Most wickets by a player in his debut 3-match Test series; a 60+ years old world record has been broken. By whom? By Sri Lankan newly found precious mystery spinner Ajantha Mendis. He produced this new world record yesterday, 2008-08-10 with the wicket of Sachin Tendulkar, another master of cricket. Up to now, he has got 25 wickets in this series, and he has passed the 24 wickets record held by English bawler named Alec Bedser. Ajantha Mendis has so many variations, and so difficult to read from the hand. Most of the Indian batsmen are still struggling to play against him while he is improving with his variations and accuracy.In the current India-Sri Lanka Test series he played in all 3 matches (and 6 innings) and performed fabulously. Still he is bawling in the 2nd inning of the last Test match and 5 more wickets are left in Indian team. So we wish Mendis to get some more wickets out of those and improve his record into an untouchable one in history.Well done Menda.Update:Ajantha a... More About: Cricket , News , Sports , World , World Record
Verify calling Javascript function available to avoid runtime errors
2008-08-07 13:55:00 Do you want to verify whether a Javascript function exists before calling it to avoid runtime errors? With Javascript we used to call Javascript functions. But sometimes our Javascript code tend to throw runtime errors and showing then on the browser. For this there can be several reasons including; incorrect function names or invalid .js file names causing some functions not loaded into your web page. Javascript has the ability to check this. For that we can use the typeof keyword, and check whether that is of 'function' type or not.Generally we will be calling a Javascript function without checking whether it exists. Following code shows how we would call a function.function callClient(){ myTestFunction();}If the function named myTestFunction() is not available, the browser will show an error message at runtime. But we can check whether this method is available even before calling it, avoiding the errors. Following code snippet checks the existence before calling a function.f... More About: Tech , Calling , Errors , Avoid
Verify calling Javascript function available to avoid runtime errors
2008-08-07 13:55:00 Do you want to verify whether a Javascript function exists before calling it to avoid runtime errors? With Javascript we used to call Javascript functions. But sometimes our Javascript code tend to throw runtime errors and showing then on the browser. For this there can be several reasons including; incorrect function names or invalid .js file names causing some functions not loaded into your web page. Javascript has the ability to check this. For that we can use the typeof keyword, and check whether that is of 'function' type or not.Generally we will be calling a Javascript function without checking whether it exists. Following code shows how we would call a function.function callClient(){ myTestFunction();}If the function named myTestFunction() is not available, the browser will show an error message at runtime. But we can check whether this method is available even before calling it, avoiding the errors. Following code snippet checks the existence before calling a function.f... More About: Tech , Calling , Errors , Avoid
Verify calling Javascript function available to avoid runtime errors
2008-08-07 13:55:00 Do you want to verify whether a Javascript function exists before calling it to avoid runtime errors? With Javascript we used to call Javascript functions. But sometimes our Javascript code tend to throw runtime errors and showing then on the browser. For this there can be several reasons including; incorrect function names or invalid .js file names causing some functions not loaded into your web page. Javascript has the ability to check this. For that we can use the typeof keyword, and check whether that is of 'function' type or not.Generally we will be calling a Javascript function without checking whether it exists. Following code shows how we would call a function.function callClient(){ myTestFunction();}If the function named myTestFunction() is not available, the browser will show an error message at runtime. But we can check whether this method is available even before calling it, avoiding the errors. Following code snippet checks the existence before calling a function.f... More About: Tech , Calling , Errors , Avoid
Write Java with JDK 1.5 features and run on JRE 1.4
2008-08-06 14:33:00 Have you being writing your Java code on Java 1.5 (JDK 1.5) with new features like auto boxing, generics and enums? And suddenly realized that your customer's servers are still using Java 1.4 (JRE 1.4)? This is not a surprise since most of the customers are not in a position to take a risk and try the newer versions as they are running live/online businesses. But as professionals in the software development field, we have to move with the latest/stable versions available in the market. That's where the conflict occurs.Now you must deploy your Java 1.5 codes into a 1.4 Java runtime environment (even may be 1.3 or 1.2). Even if the Java code has not used any of the new features of Java 1.5, you still can not run your code in 1.4 JRE as the runtime throws an error saying "java.lang.UnsupportedClassVersionError". Compile 1.5 codes for 1.4 JVMJava compiler provides an option to specify the target JVM of the generated classes like 1.5, 1.4, and 1.3 as follows.public class MyClass { pu... More About: News , Tools , Tech , Features
Write Java with JDK 1.5 features and run on JRE 1.4
2008-08-06 14:33:00 Have you being writing your Java code on Java 1.5 (JDK 1.5) with new features like auto boxing, generics and enums? And suddenly realized that your customer's servers are still using Java 1.4 (JRE 1.4)? This is not a surprise since most of the customers are not in a position to take a risk and try the newer versions as they are running live/online businesses. But as professionals in the software development field, we have to move with the latest/stable versions available in the market. That's where the conflict occurs.Now you must deploy your Java 1.5 codes into a 1.4 Java runtime environment (even may be 1.3 or 1.2). Even if the Java code has not used any of the new features of Java 1.5, you still can not run your code in 1.4 JRE as the runtime throws an error saying "java.lang.UnsupportedClassVersionError". Compile 1.5 codes for 1.4 JVMJava compiler provides an option to specify the target JVM of the generated classes like 1.5, 1.4, and 1.3 as follows.public class MyClass { pu... More About: News , Tools , Tech , Features
Write Java with JDK 1.5 features and run on JRE 1.4
2008-08-06 14:33:00 Have you being writing your Java code on Java 1.5 (JDK 1.5) with new features like auto boxing, generics and enums? And suddenly realized that your customer's servers are still using Java 1.4 (JRE 1.4)? This is not a surprise since most of the customers are not in a position to take a risk and try the newer versions as they are running live/online businesses. But as professionals in the software development field, we have to move with the latest/stable versions available in the market. That's where the conflict occurs.Now you must deploy your Java 1.5 codes into a 1.4 Java runtime environment (even may be 1.3 or 1.2). Even if the Java code has not used any of the new features of Java 1.5, you still can not run your code in 1.4 JRE as the runtime throws an error saying "java.lang.UnsupportedClassVersionError". Compile 1.5 codes for 1.4 JVMJava compiler provides an option to specify the target JVM of the generated classes like 1.5, 1.4, and 1.3 as follows.public class MyClass { pu... More About: News , Tools , Tech , Features
Java: Numbers only String by removing non numeric characters
2008-07-31 14:05:00 With Java , deleting non numeric characters (letters, symbols etc) from a string to produce a numbers-only String is a common requirement in web applications, as application users are used to insert numeric values with non-numeric characters. For example a phone number will be entered with (-) characters like;650-212-5710. A price value may be entered with (,) characters like;12,500.00In Java, java.lang.Character class has a method; isDigit() which can be used to identify whether a character is a digit or not. Following method can be used for extracting a numbers-only string.public static String getOnlyNumeric s(String str) { if (str == null) { return null; } StringBuffer strBuff = new StringBuffer(); char c; for (int i = 0; i < str.length() ; i++) { c = str.charAt(i); if (Character.isDigit(c)) { strBuff.append(c); } } return strBuff.toString();}Calling above method with any String will return a numbers-onl... More About: Tech , Characters , Numbers
Java: Numbers only String by removing non numeric characters
2008-07-31 14:05:00 With Java , deleting non numeric characters (letters, symbols etc) from a string to produce a numbers-only String is a common requirement in web applications, as application users are used to insert numeric values with non-numeric characters. For example a phone number will be entered with (-) characters like;650-212-5710. A price value may be entered with (,) characters like;12,500.00In Java, java.lang.Character class has a method; isDigit() which can be used to identify whether a character is a digit or not. Following method can be used for extracting a numbers-only string.public static String getOnlyNumeric s(String str) { if (str == null) { return null; } StringBuffer strBuff = new StringBuffer(); char c; for (int i = 0; i < str.length() ; i++) { c = str.charAt(i); if (Character.isDigit(c)) { strBuff.append(c); } } return strBuff.toString();}Calling above method with any String will return a numbers-onl... More About: Tech , Characters , Numbers
Java: Numbers only String by removing non numeric characters
2008-07-31 14:05:00 With Java , deleting non numeric characters (letters, symbols etc) from a string to produce a numbers-only String is a common requirement in web applications, as application users are used to insert numeric values with non-numeric characters. For example a phone number will be entered with (-) characters like;650-212-5710. A price value may be entered with (,) characters like;12,500.00In Java, java.lang.Character class has a method; isDigit() which can be used to identify whether a character is a digit or not. Following method can be used for extracting a numbers-only string.public static String getOnlyNumeric s(String str) { if (str == null) { return null; } StringBuffer strBuff = new StringBuffer(); char c; for (int i = 0; i < str.length() ; i++) { c = str.charAt(i); if (Character.isDigit(c)) { strBuff.append(c); } } return strBuff.toString();}Calling above method with any String will return a numbers-onl... More About: Tech , Characters , Numbers
How to open a .war (web archive) or .jar (java archive) files
2008-07-30 14:14:00 With Java we generate .JAR files to bundle a set of resources. For J2EE web applications, we generate .WAR (Web Archive ) files for deployments. Both of these are ways of archiving a set of files.Both these .jar or .war archives are in zip format. So there are plenty of ways to open those files to read the content. One way would be to use any tool that you use to open/extract a .zip file. Next will be to use the Jar command itself.JAR CommandJAR (command) utility in Java can be used to open/extract these files as follows. Run following command from the folder where you need the content to be extracted by providing the path to the archive.jar xf <path-to-file>options:x - extract the filesf - file to extractjar xf myWebApp.warjar xf myProject.jarRelated : Open and read a file inside a war file of a web application with Java More About: Tech , Files
How to open a .war (web archive) or .jar (java archive) files
2008-07-30 14:14:00 With Java we generate .JAR files to bundle a set of resources. For J2EE web applications, we generate .WAR (Web Archive ) files for deployments. Both of these are ways of archiving a set of files.Both these .jar or .war archives are in zip format. So there are plenty of ways to open those files to read the content. One way would be to use any tool that you use to open/extract a .zip file. Next will be to use the Jar command itself.JAR CommandJAR (command) utility in Java can be used to open/extract these files as follows. Run following command from the folder where you need the content to be extracted by providing the path to the archive.jar xf <path-to-file>options:x - extract the filesf - file to extractjar xf myWebApp.warjar xf myProject.jarRelated : Open and read a file inside a war file of a web application with JavaHome More About: Tech , Files
How to open a .war (web archive) or .jar (java archive) files
2008-07-30 14:14:00 With Java we generate .JAR files to bundle a set of resources. For J2EE web applications, we generate .WAR (Web Archive ) files for deployments. Both of these are ways of archiving a set of files.Both these .jar or .war archives are in zip format. So there are plenty of ways to open those files to read the content. One way would be to use any tool that you use to open/extract a .zip file. Next will be to use the Jar command itself.JAR CommandJAR (command) utility in Java can be used to open/extract these files as follows. Run following command from the folder where you need the content to be extracted by providing the path to the archive.jar xf <path-to-file>options:x - extract the filesf - file to extractjar xf myWebApp.warjar xf myProject.jarRelated : Open and read a file inside a war file of a web application with Java More About: Tech , Files
Web Services with Apache Axis 1.4 Tutorial: server and client sides
2008-07-29 14:21:00 Web services are a handy method of integrating independent systems. Apache Axis is one of the best free tools available for implementing and deploying web services, and also for implementing the web service clients.In this article we will create a simple, but complete web service and a client for this service step-by-step. Article will be explanatory as much as possible to succeed you in implementing it yourself alone after completing this tutorial.PrerequisitesMust be familiar with Java Familiar with basics on a web server like TomcatSome knowledge in configuring Axis will be an added advantageSystem Configuration RequirementsWe will be discussing the configuration in brief as our scope is mainly on web services. (If Axis already configured, jump to implementation). If you find any issues on the configuration part, you can refer to Apache Axis site for troubleshooting. (But if you can not solve it yourself do not worry, post the issue under the comments section in this article, and ... More About: Services , Tutorial , Tech
Web Services with Apache Axis 1.4 Tutorial: server and client sides
2008-07-29 14:21:00 Web services are a handy method of integrating independent systems. Apache Axis is one of the best free tools available for implementing and deploying web services, and also for implementing the web service clients.In this article we will create a simple, but complete web service and a client for this service step-by-step. Article will be explanatory as much as possible to succeed you in implementing it yourself alone after completing this tutorial.PrerequisitesMust be familiar with Java Familiar with basics on a web server like TomcatSome knowledge in configuring Axis will be an added advantageSystem Configuration RequirementsWe will be discussing the configuration in brief as our scope is mainly on web services. (If Axis already configured, jump to implementation). If you find any issues on the configuration part, you can refer to Apache Axis site for troubleshooting. (But if you can not solve it yourself do not worry, post the issue under the comments section in this article, and ... More About: Services , Tutorial , Tech
Web Services with Apache Axis 1.4 Tutorial: server and client sides
2008-07-29 14:21:00 Web services are a handy method of integrating independent systems. Apache Axis is one of the best free tools available for implementing and deploying web services, and also for implementing the web service clients.In this article we will create a simple, but complete web service and a client for this service step-by-step. Article will be explanatory as much as possible to succeed you in implementing it yourself alone after completing this tutorial.PrerequisitesMust be familiar with Java Familiar with basics on a web server like TomcatSome knowledge in configuring Axis will be an added advantageSystem Configuration RequirementsWe will be discussing the configuration in brief as our scope is mainly on web services. (If Axis already configured, jump to implementation). If you find any issues on the configuration part, you can refer to Apache Axis site for troubleshooting. (But if you can not solve it yourself do not worry, post the issue under the comments section in this article, and ... More About: Services , Tutorial , Tech
Java2WDSL & WSDL2Java - java.util.Date not handled consistently
2008-07-16 14:28:00 Java2WSDL and WSDL2Java tools in Axis (1.4) are pretty handy tools. Those help you to generate a WSDL from a java class as well as generating stubs/skeletons from a WSDL. But if you are dealing with java.util.Date fields in your code, you must pay some attention.Java2WSDLConsider the following java interface which uses java.util.Date as a return type as well as a method parameter.public interface MyService { public java.util.Date getNextDate(); public void updateLastRun(java.util.Date date);}When the Java2WDSL tool generates a WSDL for a class with a Date field, it will represent java.util.Date fields as dateTime fields in WSDL. The generated WSDL file would look as follows.<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions targetNamespace="http://service" xmlns:apachesoap="http://xml.apache.org/x ml-soap" xmlns:impl="http://service" xmlns:intf="http://service" xmlns:soapenc="http://schemas.xmlsoap.org /soap/encoding/" xmlns:wsdl="h... More About: Java , Tech , Web Services
Java2WDSL & WSDL2Java - java.util.Date not handled consistently
2008-07-16 14:28:00 Java2WSDL and WSDL2Java tools in Axis (1.4) are pretty handy tools. Those help you to generate a WSDL from a java class as well as generating stubs/skeletons from a WSDL. But if you are dealing with java.util.Date fields in your code, you must pay some attention.Java2WSDLConsider the following java interface which uses java.util.Date as a return type as well as a method parameter.public interface MyService { public java.util.Date getNextDate(); public void updateLastRun(java.util.Date date);}When the Java2WDSL tool generates a WSDL for a class with a Date field, it will represent java.util.Date fields as dateTime fields in WSDL. The generated WSDL file would look as follows.<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions targetNamespace="http://service" xmlns:apachesoap="http://xml.apache.org/x ml-soap" xmlns:impl="http://service" xmlns:intf="http://service" xmlns:soapenc="http://schemas.xmlsoap.org /soap/encoding/" xmlns:wsdl="h... More About: Java , Tech , Web Services
Java2WDSL & WSDL2Java - java.util.Date not handled consistently
2008-07-16 07:28:00 Java2WSDL and WSDL2Java tools in Axis (1.4) are pretty handy tools. Those help you to generate a WSDL from a java class as well as generating stubs/skeletons from a WSDL. But if you are dealing with java.util.Date fields in your code, you must pay some attention.Java2WSDLConsider the following java interface which uses java.util.Date as a return type as well as a method parameter.public interface MyService { public java.util.Date getNextDate(); public void updateLastRun(java.util.Date date);}When the Java2WDSL tool generates a WSDL for a class with a Date field, it will represent java.util.Date fields as dateTime fields in WSDL. The generated WSDL file would look as follows.<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions targetNamespace="http://service" xmlns:apachesoap="http://xml.apache.org/x ml-soap" xmlns:impl="http://service" xmlns:intf="http://service" xmlns:soapenc="http://schemas.xmlsoap.org /soap/encoding/" xmlns:wsdl="h... More About: Java , Tech
Java Sorting: Comparator vs Comparable Tutorial
More articles from this author:2008-07-10 15:11:00 Java Comparators and Comparables? What are they? How do we use them? This is a question we received from one of our readers. This article will discuss the java.lang.Comparator and java.lang.Comparable in details with a set of sample codes for further clarifications.PrerequisitesBasic Java knowledgeSystem RequirementsJDK installedWhat are Java Comparators and Comparables?As both names suggest (and you may have guessed), these are used for comparing objects in Java. Using these concepts; Java objects can be sorted according to a predefined order.Two of these concepts can be explained as follows.ComparableA comparable object is capable of comparing itself with another object. The class itself must implements the java.lang.Comparable interface in order to be able to compare its instances.ComparatorA comparator object is capable of comparing two different objects. The class is not comparing its instances, but some other class?s instances. This comparator class must implement the java.lan... More About: Tutorial , Java , Tech , Sorting 1, 2, 3, 4, 5 |



