Developing OTDs for Application Adapters

enableUnmarshalValidation(boolean enable) Method

The enableUnmarshalValidation(boolean enable) method causes the OTD to validate data flow during an unmarshal call.

Table 1–1 enableUnmarshalValidation(boolean enable) Method

Syntax 

Throws 

Examples 

void enableUnmarshalValidation(boolean enable) 

None. 

// enable validation during unmarshal 

// call to unmarshal may raise an exception if content is not compatible 

byte[] content = ... 

OTD_1.enableUnmarshalValidation(true); 

OTD_1.unmarshal(content); 

// disable validation during unmarshal 

// call to unmarshal will not raise data-related exceptions 

// instead, data-related exceptions may/will occur when 

// accessing specific nodes with invalid data. 

byte[] content = ... 

OTD_1.enableUnmarshalValidation(false); 

OTD_1.unmarshal(content)