IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Defining and transforming data > Transforming data > Transforming data using a business object map > Mapping with XSD wildcards > The <any> element > Create custom maps using <any> elements

Mapping a concrete type to <any> target element

You can map a concrete type to a target <any> element.

In this map, the concrete type Customer is mapped to a target <any> element.

Use the following custom code snippet for copying the concrete type to the target:

// The specific type of variable Any_Customer is commonj.sdo.DataObject

// Variable AnyElemAny_xsd:any0 is represented as AnyElemAny_xsd$cany0
   ServiceManager serviceManager = new ServiceManager();
	Bofactory bofactory = (BOFactory)serviceManager.locateService("com/ibm/websphere/bo/BOFactory");

	BOXSDHelper xsdHelper = (BOXSDHelper)serviceManager.locateService("com/ibm/websphere/bo" );
// Move the Customer Complex Type to the xsd:any Output
// The global property globalElement3 corresponds to the Customer
// Complex Type. Use this same global property to set the target 	Property anyProp = Any.getInstanceProperty("globalElement3");
	DataObject Customer = (DataObject)Any.get("Customer");
	AnyElemAny.set(anyProp, Customer);

Create custom maps using <any> elements