{
throw new InvalidInsertResourcePropertiesRequestContentFaultException( getNamespaceSet(), MSG.getMessage( Keys.ERROR_INSERT_ELEMS_NOT_HOMOGENOUS ) );
}
QName propName = XmlBeanUtils.getName( propElemsToBeInserted[0] );
ResourceProperty prop = getProperty( propName );
if(prop == null)
{
prop = createAnyProperty(propName);
getProperties().add(prop);
}
if(!prop.getMetaData().isAny())
{
throwFaultIfInsertionViolatesSchema( prop, propElemsToBeInserted );
}
throwFaultIfPropertyIsReadOnly( prop );
try
{
insertPropertyCallback( prop, propElemsToBeInserted );
}
catch ( RuntimeException re )
{
throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
}
Object[] oldValue = getValue( prop );
for ( int i = 0; i < propElemsToBeInserted.length; i++ )
{
try
{
prop.add( propElemsToBeInserted[i] );
}
catch ( MetaDataViolationException mdve )
{
throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), mdve );
}