Try OpenEdge Now
skip to main content
Managed Adapters Guide
Web Service Managed Adapter : Using the Web Service Adapter : Configuring the Web Service Adapter : Reviewing information on WSDL details : Generating Java classes for Web Service parameters
 
Generating Java classes for Web Service parameters
When dealing with complex data types (as discussed in Dealing with complex data types), you can use the Web Service adapter to generate Java classes with the serializer (and deserializer) information. You must use a Common resource project with the Web Service adapter, in order to generate the Java classes.
To generate Java class using a Common Resource project:
1. Select the Common Resource project in the Project Explorer view, then click Tools > Managed Adapters. The Managed Adapter Browser tool appears.
2. Create a copy of the generic WebService adapter. For the copied Web service adapter, click Configure. The Web Service Adapter Configurator dialog box appears.
3. Enter the WSDL URL, shown in Figure 22, then click Go.
4. For the GetInfo operation, click the Types and Mapping tab (see Figure 22).
a. Select the Java Input and Output option.
b. Click Generate classes (enabled only for Common Resource projects). The Generate classes dialog box appears.
c. Modify the package name, if required. Select the Generate helper classes for serialization checkbox to generate the serializer helper classes.
d. Click OK. On refreshing the common resource project, the generated classes are available in the Business Objects folder.
5. You can use the generated classes as an object dataslot in the BP Server or Web application. To enable this, you must add the Common Resource project as a dependent project to the BP Server or Web application.
a. In the Project Explorer view, select the project to which you want to add the Common Resource project.
b. From Project menu, click Properties, then click Java Build Path > Projects.
c. Add the common resource project to the build path, then click OK.
6. In the above BP Server (or Web application) project, create the Object dataslot, which can be used as input (or output) to the Web service.
7. Publish the projects to the Business Process Server, in order to make the Object dataslot classes available at runtime.
8. Perform this step only if you are using JBoss (Embedded or Enterprise version) application server. After publishing the projects to the Business Process Server, the ClassNotFound exception occurs at runtime as the published bean classes cannot locate the axis classes.
a. Stop the Business Process Server, if running.
b. Create a JAR file (example, bo.jar) containing all the classes generated by the Common Resource project. Copy the JAR file to the OEBPS_Home\lib folder.
c. Delete the common resource classes. published in the OEBPS_Home\ebmsapps\common\bo\classes folder.
d. Edit and save the OEBPS_Home\jboss\server\ejbServer\conf\jboss-service.xml file as follows:
*Add the JAR file name with comma (in this case, bo.jar,) as a new line after the axis.jar, line.
e. Start the BP Server and reinstall the BP Server (or Web application) project containing the Object dataslot.