Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

anchortop
top This article will help you migrate Web services applications developed for JBoss v4.0.5 to Apache Geronimo 1.1. This is part of a series of migration articles covering different types of applications migration from JBoss to Apache Geronimo application server.

...

Web Services implementation analysis Anchor analysis analysis

Web services implementation may vary from one vendor to another. The purpose of this section is to provide comparison of JBoss and Apache Geronimo features which are used in the implementation of the sample application described further in this article. You can use the information below to identify the differences between these two servers and plan for migration accordingly.

...

The following example illustrates the requirement from Geronimo of having the same name the request elements. Look for the three occurrences of "myOperation".

...

Back to Top

Sample application Anchorsamplesample

This article contains the Search a Phone Directory Web services application to demonstrate Web services migration from JBoss to Geronimo. The application implements both server and Web-client sides of a simple service which searches through a phone directory. The user works with the Web-client to test the application. The user specifies a search criterion and receives the search results.

...

Back to Top

The JBoss enviroment Anchorjbossjboss

This section shows you how and where the sample JBoss reference environment was installed so you can map this scenario to your own implementation.

...

After extracting the zip file, a phonebook directory is created. From now on this directory will be referred as <phonebook_home>. In the <phonebook_home>/config directory open the build.properties file and edit the geronimo.home as given in below.

...

...

From a command prompt or shell go to the <phonebook_home> directory and run the ant jboss command. This will create the WAR file and place it directly into the <phonebook_home>/releases/jboss directory.

In addition to the compiled Java classes and the previously mentioned WSDL and JAXP-RPC mapping files the WEB-INF directory of the archive contains standard web.xml and webservices.xml deployment descriptors and a descriptor specific to JBoss jboss-web.xml. The JBoss deployment descriptor is illustrated in below.

...

...

Since this sample application does not use any resources, no features specific to JBoss, this file just provides the context root for the application. This path is optional and in case of such a simple descriptor you can build and deploy the application even without it.

...

Back to Top

The Geronimo enviroment Anchor geronimogeronimo

Download and install Geronimo from the following URL:

...

The release notes available there provide clear instructions on system requirements and how to install and start Geronimo. Throughout the rest of this article we will refer to the Geronimo installation directory as <geronimo_home>.

...

...

If you are planning to run JBoss and Geronimo on the same machine consider to change the default service ports on, at least, one of these servers.

...

Download and install Geronimo from the following URL:
http://geronimo.apache.org/downloads.html

Back to Top

Step-by-step migration Anchor migration migration

As it was described in the beginning of this article, Geronimo does not allow an XML schema element representing request message of an operation to have a name different from the name of the operation. Hence if your WSDL defines unsupported names you need to correct the WSDL and generate or re-generate required Java classes. This may require manual modification of classes implementing endpoint of the Web service depending on your coding approach.

The Search a Phone Directory Web services sample application uses WSDL names convention supported by both servers. Therefore the only thing that you need to do prior to deploy the application on Geronimo is to replace the deployment descriptor specific to JBoss with one specific to Geronimo. The geronimo-web.xml file is located in the <phonebook_home>/web/WEB-INF directory and its contents is listed below.

...

...

Build the sample application

...

You should see the same JSP page of the application as you tested when running the Web services sample on JBoss.

Back to Top

Summary Anchorsummarysummary

This article showed how to migrate a Web services application that uses document/literal encoding from JBoss to Apache Geronimo. It showed that if the WSDL document follows the widely accepted naming conventions then the migration will take minimum effort or even the very same application could be redeployed on any of the servers without any changes at all.