IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Service Component Architecture programming > SCA programming techniques

Overriding the generated Service Component Architecture implementation

Sometimes, the conversion the system creates between a Java™ code and a Service Data Object (SDO) may not meet your needs. Use this procedure to replace the default SCA implementation with your own.

Verify that you have generated the Java to Web Services Definition Language (WSDL) type conversion using either IBM Integration Designer or the genMapper command.

You override a generated component that maps a Java type to a WSDL 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

  1. Locate the generated component. The component is named java_classMapper.component.
  2. Edit the component using a text editor.
  3. 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 DataObject javatodata_setAccount_output(Object myAccount) {

		// 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.java2Data(myAccount);

}


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 WebSphere Integration Designer or generate an enterprise archive (EAR) file using the serviceDeploy command.

SCA programming techniques