Archive for the tag 'NetBeans'

Feb 27 2008

Creating SOAP Web Services with NetBeans 6

In this blog i will show you, how easily you can create Web Services with NetBeans 6. In further postings i will discuss how to manipulate the SOAP Message before the Web Service Operation is called.

For this example i am using JAX-WS 2.1 with NetBeans 6.0 .

Web Services Description Language (WSDL)

There are many ways how to get starting with Web Services. One variant is beginning with the creation of the WSDL. First, you must know what the Web Service should do. You have to consider what is the input and output of each Web Service Operation. In our example we have only one Operation, named as “getcalculateValues“. The input are two numbers, the result is only the sum of both.

Technorati Tags: Java, NetBeans, soap, web services

69 responses so far

Feb 22 2008

Open existing projects in NetBeans 6

Published by under Java,NetBeans

In this blog-entry i will show you, how to open and work with existing NetBeans 6 -projects. I was forced to write this, because while most of my projects here are created with NetBeans 6. Now watch how easily you can use NetBeans 6 for being productive.
For example, i am using the project “Hibernate with Guice“, you can read this blog-entry here.

1. Installing NetBeans 6

NetBeans IDE is open-source and free and runs on Windows, Linux, Mac OS X and Solaris.
Installation Instructions:

2. Open an existing project

On the menu, navigate to File->Open Project
Open project in NetBeans

Choose the existing project and open it.
Open existing projects in NetBeans 6 part 2

If you see the following error message, don’t get in panic, there are only missing references to needed libraries.
Open existing projects in NetBeans 6 part 3

Click on close. Now let us fix this problem. Make a rightclick on the project-name and select Properties.
NetBeans Project properties

You will now see the Project Properties window. On the left side, navigate to Libraries. In the Compile-Tab, the missing libaries are now visible.
NetBeans Project properties missing libraries

The next thing to do, is to clean up this mess. Just remove all libraries from the Compile-Tab. You can easily do this if you mark one library with the left mouse button and then press STRG + A together.
NetBeans Project properties remove missing libraries

Hit the remove button to clear the list.
NetBeans Project properties missing libraries are removed

The next step is to add the missing libraries. If you have downloaded them, click on Add JAR/Folder, navigate to the directory where the JARs are located, and add them all.
NetBeans Project properties add missing libraries

Close the Project Properties Window. Everything just have to look fine. The Project-Name is now in bold black and not anymore in bold red. Expand the project, you can see all included packages and libraries.
Netbeans projects view

3. Build and run the project

This is very easy. Make a rightclick on the projectname, choose Clean and Build.
Clean and build project in Netbeans

You can see the generated Output in the Output-console.
NetBeans generated output

Run the application by pressing F6 or make a rightclick on the project-name and choose Run
NetBeans run project

That’s it, you have successfully opened an existing project.

3. Working with NetBeans

To explore the java-code, you can navigate through the projects-view or through the file-view.
NetBeans project and file views

To open a file, just doubleclick on the name.

You need more functions? Go to Tools->Plugins.
NetBeans plugins

A huge list of available plugins appears. More plugins are available at

Installed NetBeans plugins

Enjoy playing around with NetBeans, you will see it makes fun to work with it.

All the SY0-101 and N10-003 professionals are of the view that before you write 642-812 or 70-431, you should figure out your preferences amongst 350-030 and 220-602.

Technorati Tags: Java, NetBeans, projects

3 responses so far

Feb 21 2008

Hibernate with Guice – Part II

Welcome back to Part II about using Hibernate with Guice. If you just stepped in, i recommend first to read Part I here.

Part II – Adding Guice to the Hibernate-Application

This application uses Guice’s Dependency Injection to create the HibernateConnection-instance and the OrdersDAO-instance. You can see that HibernateUtil don’t need STATICs anymore. Access to HibernateUtil is wrapped through a HibernateConnection which is created in a ConnectionProvider as a Singleton. Providers are acting as Factories in creating and returning Objects.

Technorati Tags: google guice, Hibernate, Java, mysql, NetBeans

5 responses so far

Feb 21 2008

Hibernate with Guice – Part I

Published by under Guice,Hibernate,Java

In this Blog you will see how to add Google-Guice functionality to a Hibernate-Application. In Part I i will introduce a simple Hibernate-Application. In Part II you can see how this Application will be transformed for using Guice.

This was my first attempt working with Guice, so i think there are many points which can be improved.

But first for these peoples who doesn’t know what is Guice, Guice is a new lightweight Java 5 Dependency Injection Framework. It is working with Annotations. You should not compare Guice with Spring. Guice focus is on Dependency Injection, where Spring has become popular in the Java community as an alternative, replacement, or even addition to the Enterprise JavaBean model. Google produced Guice for one of their biggest applications – AdWords!

Download-links to all files are available at the end of this posting. Comments are included in the source-listings.

Technorati Tags: google guice, Hibernate, Java, mysql, NetBeans

5 responses so far

« Newer Entries