Posts

Showing posts from 2009

Soap request from JavaFX

I was searching on net to know how to send soap request from JavaFX. I could not get a straight answer. While looking at the JavaFX 1.0 API, I did find java.io.http.HttpRequest class to send HTTP asynchronous requests. The document says that you can invoke RESTful weservices through the class. Since HTTPRequest supports POST as a method for sending the request, I though of sending the SOAP message over HTTP. I wrote a simple utility class to facilitate the same and it did help me achieve my goal. The example is a simple class keping in mind that usually soap request are known through WSDL but we do mistakes while preparing a complete XML soap message. I would like to share some of the points for anyone trying the same. 1. Create a simple SoapRequest class as follows: public class SoapRequest extends HttpRequest{ 2. Define the variables to create xml tags, Soap envelop and body tags // xml header  var XML_HEADER:String = "";  // namespace for SOAP 1.1 message, this

Custom Exception with same name as JDK Exception

If I create an exception example IOException, will there be an conflict with the existion IOException of JDK? In a discussion the qustion popped up for a quick response and most us had it. But if someone has confusions, here is a quick explanation. Lets  create a custom exception IOException as stated below (IOException.java) package my.test; class IOException extends Exception { IOException() { super("MyIOException Has Raised"); } } Next lets create a test program to see what happens (TestException.java). package my.test; public class TestException { public static void main(String[] args) { try { throw new IOException(); } catch(IOException e) { System.out.println(e.getMessage()); } } } When we run the TestException.java file we get the following message: MyIOException Has Raised Now lets include an import statement to import java.io.IOException class. package my.test; import java.io.IOException; public class TestException { public static void main

My Baby had seizures

My kid is 1.5 years old now (on the date I was writing this blog). When he was around five months old, we noticed some shaky movement while he used to be on mother's feed. We were not sure of what we noticed when he had these movements for initial couple of times. But when we started noticing it for more regular intervals with frequency being once in 10 days, we took it seriously and made a video to show to our pediatrician. She suspected some sort of seizures. According to her, in infants deficiency of calcium may be a cause for this behavior. Since she did not wanted to take chances, doctor wanted to do all sorts of tests like EEG and other scary Brain tests. We were getting a bit tensed. We were searching for the relevant information on internet. There were lot of similar behaviors reported but very less remedies and directions. This was my primary reason to write this blog to share my experience to benefit to some extent, those parents who might be confused at this point in tim