ELizBeth 270005BAKK Visits (4005)
You must have faced quite a good amount of code generation issues if you are working on MDM Server v8 or v8.5. One of the main problems that I have faced was whenever we do not have a hold on the OOTB code generation technique. Say if you need to have OOTB TCRM
Errors logged during code generation
Errors occurred during execution
Error executing tag handler: java
Another problem which we face is, MDM does not support the Transient Object code generation in v8 or 8.5 Hence we have land up with no other option other than to create an Entity, its corresponding classes and will not be persisted. It would be used as a wrapper object. Therefore, your project may have unnecessary files which you may not use in MDM framework.
By this approach it helps the developer to have a strong hold on how your service description should be by writing your own WSDL and generating the java code based on the definition in the WSDL. Definitely, this approach would be challenging as it will not be as simple as clicking the Generate Code in the MDM Model Editor
RAD : 22.214.171.124
MDM : MDM Server v 8.5
WAS : v6.1
Creating Top-Down Web Service
Web services can be created using two methods: top-down development and bottom-up development. Top-down Web services development involves creating a Web service from a WSDL file.
When creating a Web service using a top-down approach, first you design the implementation of the Web service by creating a WSDL file. You can do this using the WSDL Editor. You can then use the Web services wizard to create the Web service and skeleton Java™ classes to which you can add the required code.
Although bottom-up Web service development may be faster and easier, the top-down approach is the recommended way of creating a Web service. By creating the WSDL file first you will ultimately have more control over the Web service, and can eliminate interoperability issues that may arise when creating a Web service using the bottom-up method.
The tools that help to generate the web service artifacts are WSDL2JAVA.bat and JAVA2WSDL.bat.
WSDL2JAVA generates the web service skeletons and the deployment descriptor templates against a WSDL. This is used for the top down approach
JAVA2WSDL generates WSDL from the Java class. This is used for bottom up approach.
This document helps you to create a top to down EJB implementation of Web Service for MDM services. It is quite simple to develop a web service with the help of Web Service editor that is available with the RAD.
By the end of this document, you will be able to create an ejb web service implementation from WSDL to invoke MDM services.
Note: We need to have manual effort to bring up the web service project structure in sync with the classes and the class names that gets generated with the help of MDM model editor.
RAD Preference Settings
Prior to developing the Web Service, you need to set certain Preferences in RAD.
1. Windows > Preferences > Web Services > Resource Management
Note: It is a good practice to select this option when you use utility JAR files or third party libraries, in order to avoid these loadable Java Classes that have to be regenerated.
Below are the steps which explain how to create a top down EJB web service implementation:-
Click Next > Generates the Web Service skeleton from the WSDL and publishes the project to the server
Note:- Start the server before generating the web service
i. Move the SearchBindingImpl to Proj
ii. Rename the below files:-
SearchBindingImpl -> SearchServiceBean
iii. ejb-jar.xml ->
a) Modify the mapping of
ix. If you have defined wrapper object in WSDL to hold any OOTB objects, make sure you create the BObj, Converter and Constructor for the same.