copySOAPHeaderBlock_NoDataSource(factory, targetParent, sourceSHB);
return;
}
// If copying is destructive, then copy the OM tree
OMDataSourceExt sourceDS = (OMDataSourceExt) ds;
if (sourceDS.isDestructiveRead() ||
sourceDS.isDestructiveWrite()) {
copySOAPHeaderBlock_NoDataSource(factory, targetParent, sourceSHB);
return;
}
// Otherwise create a copy of the OMDataSource
OMDataSourceExt targetDS = ((OMDataSourceExt) ds).copy();
SOAPHeaderBlock targetSHB =
factory.createSOAPHeaderBlock(sourceSHB.getLocalName(),
sourceSHB.getNamespace(),
targetDS);
targetParent.addChild(targetSHB);