Hints and tips for migrating Web services

Migration hints

If you are migrating your Web service or Web service components from earlier versions of this product, refer to the following hints and tips to improve your success.
  • Secure Web services are not migrated by the J2EE Migration Wizard when Web services are migrated from J2EE 1.3 to J2EE 1.4. The migration of secure Web services requires manual steps. After the J2EE migration, the secure binding and extension files must be migrated manually to J2EE 1.4 as follows:
    1. Double click on the webservices.xml file to open the Web Services editor.
    2. Select the Binding Configurations tab to edit the binding file.
    3. Add all the necessary binding configurations under the new sections Request Consumer Binding Configuration Details and Response Generator Binding Configuration Details.
    4. Select the Extension tab to edit the extension file.
    5. Add all the necessary extension configurations under the new sections Request Consumer Service Configuration Details and Response Generator Service Configuration Details.
    6. Save and exit the editor.
  • Web service EARs generated in earlier versions of the product may have a build error due to the Java™ compiler using J2SE 5.0 as its default JDK compliance level. The Java code generated by the older Web service wizards used enum as a package identifier which is a reserved keyword in J2SE 5.0. To resolve this issue:
    1. Select the affected Web service project, right-click and select Properties.
    2. Select Java Compiler from the list of properties.
    3. In the JDK Compliance section, change the Compiler compliance level to 1.4. Click OK.
  • Exception thrown: com.ibm.etools.webservice.deploy.core.WebserviceXMLException: Compilation error in *.jar

    Problem: An EAR file created and exported from the workspace fails to deploy on WebSphere® Application Server 6.1.x resulting in the following error: class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath

    Cause: When creating a project, the default JDK compiler is JDK 5.0. The WebSphere Application Server 6.1.x JDK level is 1.4. Java 1.4 creates class files labeled with version 48.0. Java 1.5 creates class files labeled with version 49.0. Java 1.4 cannot run class files labeled with version 49.0.

    Solution: Recompile the project containing the class using JDK 1.4 compiler by doing the following:
    1. Right click on the project and select Properties > Project Facets.
    2. Click Add/Remove Project Facets.
    3. Double-click Version for the second Java entry.
    4. Select 1.4 from the drop-down list.
    5. Click Finish > OK.
    6. Right click the project and select Properties > Java Compiler.
    You will see the complier compliance level has been changed to 1.4 7. Export the compiled EAR file and deploy on WebSphere Application Server 6.1.x - the deployment should be successful.

Feedback