Posts

Writing a Web Service Client in Java using Eclipse IDE

Image
The steps involved in writing the Web Service Client will be as follows: a) Locate the service description in the form of WSDL for the web service in question. (Actually the first step is to search UDDI for the services. I am excluding this step here to simplify the process ) b) Once we have the WSDL document, most of the client code is auto-generated using the wsimport tool. c)   Run the client and invoke the web service. Now I will demonstrate the steps to write a Web Service client in Java using Eclipse IDE. This web service client is invoking the web services available at the url  "http://www.webservicex.net ”         1)       Go to the url : http://www.webservicex.net/ws/default.aspx              2)       Choose the web service you want to write the client for. I have chosen Computer Unit converter, which gi...

Web Services In Java- An Introduction

Image
As the name implies, a web service is a "service available on web". The main difference between a web application (which may also be called as a service available on web) and a Web service is that the website/web application is meant for humans as end users whereas a web service is meant for another application. A web service basically services the needs of an application running on another server which is network accessible.  The main advantage of Web Service is Interoperability, which means it is not any technology or platform specific. This means that a C# application running on  an Application Server A on a Windows machine can request for a web service written in Java and running on an Application Server B on a Linux machine. It may also happen that the web service host is an Application Server whereas the web service client is a mobile device having a network access to the host. Web Services are mainly of two types: SOAP based (JAX-WS specifi...

Book Review: The Contract by Zeenat Mahal

Image
  Title: The Contract Author: Zeenat Mahal Genre: Romance Source : A copy provided by author for review Synopsis: Shahira, a 30 year old single mom to an eight year old boy, and a school teacher by profession, gets a rather unusual marriage proposal from Hussain. That of a contract marriage -where she would be responsible for raising his 11 year old daughter and taking care of his mother, while him -the so called husband -will be globetrotting on his business. Concerned of her son's future and securing financial security for herself, she chose to accept it. Little did she realize that this is going to change her life for good! Discovery: I first happened to read the preview of the book when it was one of the nominations for “Book of the Month” in July 2014 on Indusladies.com. It was a promotional event by “Indireads” where they were giving away 5 free copies to the winners participating in the giveaway. Recently received a copy of the book, thanks to the author f...

Setting up EJB3 Development Environment with Eclipse and JBoss

Image
I gave up my 30 day Programming challenge   after a few days only, partly due to time-constraints and partly because the problems I had been working on didn't seem challenging enough.Learning EJB3 took a priority and I started on that path. Here on my blog I will share my journey as I progress on the path. The first step was picking up a good book. I had purchased EJB3 In Action long back, so planned to go with it.I had recently seen a review about the second edition of this book.I thought the second edition will be pretty much the same as the first one with a little bit of addition here and there about EJB 3.1.Don't know what motivated me to take a peek at the second edition, and that very moment I decided to start with the second edition only. Got a soft copy in mobi format, so that I can read it on Kindle app in my mobile and tab. I read through Chapter 1 which is kind of introduction or the 25000 feet view of EJB3. Once I started chapter 2, I felt the need to se...

Day# 5 of Java Programming Practice- Change the first letter of each word in a sentence to Uppercase.

Image
This problem also seemed simple and I didn't take much time to write this one. In fact I decided to move on to the next problem again today and post two of them together. But on reading the next problem I felt that I will be able to do it better once I am through with regular expressions. So, taking a break to read through the topic of regular expressions before diving into the next problem.   Here is the problem and my solution of the day. The problem is just to change the first letter of each word in a sentence to capital case.  

Day#4 of Java Programming Practice- Two Simple programs

Image
Today's program turned out to be quite simple , so I completed two of them. the first problem is to replace each letter of the string to its subsequent letter and change the case of all vowels in the resulting string to capital. All characters other than alphabets should be left as is. Here is my program and its output: The second program is to keep adding all numbers from 1 up to a given argument. Here is the program and its output: Closing this not so interesting day, will be back again tomorrow with something interesting hopefully.

Day#3 of Java Programming Practice- Longest word of a Sentence

Image
Today's problem is finding longest word of a sentence.The twist being, in case any of the words has punctuation marks, the punctuation should be ignored while calculating the length of that word. My first choice to separate each word in the sentence was by using a String Tokenizer, but when I looked in the documentation for the syntax, it told me that using split is a better idea. This twist of ignoring punctuation mark got me thinking , and this is the program I wrote along with the output. Though it gives correct output, I felt it to be an ugly version. I started looking on the net for a better solution, Though I didn't get an exact solution of this problem, I did get an interesting idea that helped in making the program look better. So here is the second version of my program.  This made me realize that I need to work on learning regular expressions properly. And the learning notes will certainly make it to a post on this blog.  Signing off for tod...