Sometimes, the conversion the system creates between a Service Data Object (SDO) and a
Java™ type
object may not meet your needs. Use this procedure to replace the default implementation with your
own.
Before you begin
Make sure that you have generated the WSDL to Java type conversion using either
IBM® Integration
Designer or the genMapper
command.
About this task
You override a generated component that maps a WSDL type to a Java type by replacing the
generated code with code that meets your needs. Consider using your own map if you have defined your
own Java
classes. Use this procedure to make the changes.
Procedure
-
Locate the generated component.
The component is named
java_classMapper.component.
-
Edit the component using a text editor.
-
Comment out the generated code and provide your own method.
Do not change the file name that contains the component implementation.
Example
This is an example of a generated component to
replace: private Object datatojava_get_customerAcct(DataObject myCustomerID,
String integer)
{
// You can override this code for custom mapping.
// Comment out this code and write custom code.
// You can also change the Java type that is passed to the
// converter, which the converter tries to create.
return SDOJavaObjectMediator.data2Java(customerID, integer) ;
}
What to do next
Copy the component and other files to the directory in which the containing module resides,
and either wire the component in IBM Integration
Designer or generate an enterprise archive
(EAR) file using the serviceDeploy command.