C Code and Deploy your own Web Services

This appendix contains the topic:

C.1 Coding and Deploying Your Own Web Services

To code and deploy your own Web Services

  • Use the WebServiceBase_v4 and WebServiceBaseImpl_v4 classes to create custom web services

  • Both classes exist in the BaseJar.jar file

  • Extending one of the base classes (WebServiceBase_v4 and WebServiceBaseImpl_v4) gives you an RPGInvoke and Connection

  • Use the RPGInvoke to call an RPG program on the JDEdwards World system

  • Use the Connection to access the JDEdwards World database

  • Extend WebServiceBase_v4 when creating services that only require executing a JD Edwards World program

  • Extend WebServiceBaseImpl_v4 when creating a web service that requires database access

  • Refer to the source zip file for examples on how to create web services using the BaseJar.jar file

Deployment Profiles

The jar files required for the Web Services were configured in the previous procedure by adding the jar files to the World_Services folder and setting the server classpath to include these jars.

Figure C-1 Location of World Services folder

Description of Figure C-1 follows
Description of ''Figure C-1 Location of World Services folder''

In Jdeveloper, the individual projects only need to deploy those files that are required by the web service.

Figure C-2 Project Properties screen

Description of Figure C-2 follows
Description of ''Figure C-2 Project Properties screen''

  1. Highlight WebServices(WAR File) and then click Edit.

    Figure C-3 Edit WAR Deployment Profile Properties screen, General page

    Description of Figure C-3 follows
    Description of ''Figure C-3 Edit WAR Deployment Profile Properties screen, General page''

  2. Enter a path where you want your WAR file created.

    Figure C-4 Edit WAR Deployment Profile Properties screen, Filtering tab

    Description of Figure C-4 follows
    Description of ''Figure C-4 Edit WAR Deployment Profile Properties screen, Filtering tab''

  3. Under Web Files > Filters, select all files.

    Figure C-5 Edit WAR Deployment Profile Properties screen, Filter location in file structure

    Description of Figure C-5 follows
    Description of ''Figure C-5 Edit WAR Deployment Profile Properties screen, Filter location in file structure''

  4. Under WEB-INF/classes, only select the files specific to this service. The files under base are included in the BaseJar.jar, so they do not need to be included here.

    Figure C-6 Edit WAR Deployment Profile Properties screen Showing Merged Contents of the File folder

    Description of Figure C-6 follows
    Description of ''Figure C-6 Edit WAR Deployment Profile Properties screen Showing Merged Contents of the File folder''

  5. Under WEB-INF/lib no classes should be selected, these jars are either part of the WLS install or were included in the server classpath in the installation instructions above.