Overview
This article will help you migrate Web services applications developed for JBoss v4 to Apache Geronimo. This article is part of a series of migration articles covering different types of applications migration.
This article provides some details on the differences between these two application servers as well as a detailed step-by-step migration procedure for porting Web services applications from JBoss v4 to Apache Geronimo v1 (milestone build M5). To define a common starting point (the source environment) we provide steps for deploying the sample Search a Phone Directory Web services application into the JBoss source environment. Then you will be guided through the application migration and deployment process onto Apache Geronimo.
This article is organized in the following sections:
- Web Services implementation analysis
- Sample application
- The JBoss environment
- The Geronimo environment
- Step-by-step migration
- Summary
Web Services implementation 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 of these two servers and plan for migration accordingly.
Features |
JBoss v4 |
Geronimo |
---|---|---|
Web services engine |
Currently uses Apache Axis. However, JBoss plans to implement its own engine in the near future. |
Uses Apache Axis. |
Document/literal Web services |
Runs server and Web client endpoints generated according to Java Web services specification. |
Runs server and Web client endpoints generated according to Java Web services specification. However, it requires that an element defined in the XML schema and representing request message of an operation has exactly the same name as the operation. |
The described Geronimo requirement for names of request elements and operations is be illustrated by the following example where names which must be the same are marked with bold:
The following example illustrates the requirement from Geronimo of having the same name the request elements. Look for the three occurences of myOperation".
<wsdl:definitions targetNamespace="http://myService.com/service" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://myService.com/service" xmlns:types="http://myService.com/service/types"> <wsdl:types> <xsd:schema targetNamespace="http://myService.com/service/types"> <xsd:element name="myOperation">...</xsd:element> <xsd:element name="myOperationResponse">...</xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="myOperationRequest"> <wsdl:part element="types:myOperation" name="parameters"/> </wsdl:message> <wsdl:message name="myOperationResponse"> <wsdl:part element="types:myOperationResponse" name="result"/> </wsdl:message> <wsdl:portType name="myServicePortType"> <wsdl:operation name="myOperation"> <wsdl:input message="tns:myOperationRequest" name="myOperationRequest"/> <wsdl:output message="tns:myOperationResponse" name="myOperationResponse"/> </wsdl:operation> </wsdl:portType> ... </wsdl:definitions>
Sample application
This article contains the Search a Phone Directory Web services application to demonstrate migrating from JBoss to Geronimo. The application implements both server and Web-client sides of a simple service which searches through a phone directory. A user works with the Web-client to test the application. He specifies a search criterion and receives the search results.