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 Service Component Architecture (SCA) class implementation with your own.

Make sure that you have generated the Java™ to Web Services Definition Language (WSDL) type conversion using either WebSphere® Integration Developer 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.
  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.

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);


}
Copy the component and other files to the directory in which the containing module resides, and either wire the component in WebSphere Integration Developer or generate an enterprise archive (EAR) file using the serviceDeploy command.
Related concepts
SCA to Java bridge
Related tasks
Calling WSDL interfaces from Java references
Calling Java interfaces from WSDL references
Overriding a Services Data Object to Java conversion
Related reference
Java to XML conversion

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.