private void throwFaultIfInsertionViolatesSchema( ResourceProperty prop, XmlObject[] propElemsToBeInserted )
{
// TODO: probably need to check this for xsd:any to check for possible violations
if ( prop.getMetaData().getMaxOccurs() != -1 &&( prop.size() + propElemsToBeInserted.length ) > prop.getMetaData().getMaxOccurs() )
{
throw new InvalidInsertResourcePropertiesRequestContentFaultException( getNamespaceSet(), MSG.getMessage( Keys.ERROR_PROPERTY_INSERT_VIOLATES_SCHEMA,
( ( propElemsToBeInserted.length > 1 )
? "s" : "" ),
prop.getMetaData().getName() ) );
}
}