Package org.apache.ws.resource.properties.faults

Examples of org.apache.ws.resource.properties.faults.SetResourcePropertyRequestFailedFaultException


            {
                insertResourceProperty( propElemsToBeInserted );
            }
            catch ( InsertResourcePropertyRequestFailedFaultException fault )
            {
                throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), fault.getFaultString() );
            }
            catch ( InvalidInsertResourcePropertiesRequestContentFaultException fault )
            {
                throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), fault.getFaultString() );
            }
        }

        DeleteType[] deleteElems = requestElem.getDeleteArray();
        for ( int i = 0; i < deleteElems.length; i++ )
        {
            try
            {
                deleteResourceProperty( deleteElems[i].getResourceProperty() );
            }
            catch ( DeleteResourcePropertyRequestFailedFaultException fault )
            {
                throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), fault.getFaultString() );
            }
        }

        UpdateType[] updateElems = requestElem.getUpdateArray();
        for ( int i = 0; i < updateElems.length; i++ )
        {
            XmlObject[] newPropElems = XmlBeanUtils.getChildElements( updateElems[i] );
            try
            {
                updateResourceProperty( newPropElems );
            }
            catch ( UpdateResourcePropertyRequestFailedFaultException fault )
            {
                throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), fault.getFaultString() );
            }
            catch ( InvalidUpdateResourcePropertiesRequestContentFaultException fault )
            {
                throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), fault.getFaultString() );
            }
View Full Code Here


        {
            insertPropertyCallback( prop, propElemsToBeInserted );
        }
        catch ( RuntimeException re )
        {
            throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
        }

        Object[] oldValue = getValue( prop );
        for ( int i = 0; i < propElemsToBeInserted.length; i++ )
        {
View Full Code Here

        {
            updatePropertyCallback( prop, newPropElems );
        }
        catch ( RuntimeException re )
        {
            throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
        }

        Object[] oldValue = getValue( prop );
        // TODO: we might need to clone the oldValue elems, since we might be destroying them when we call clear() below
        try
View Full Code Here

            {
                insertResourceProperty( propElemsToBeInserted );
            }
            catch ( InsertResourcePropertyRequestFailedFaultException fault )
            {
                throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), fault.getFaultString() );
            }
            catch ( InvalidInsertResourcePropertiesRequestContentFaultException fault )
            {
                throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), fault.getFaultString() );
            }
        }

        DeleteType[] deleteElems = requestElem.getDeleteArray();
        for ( int i = 0; i < deleteElems.length; i++ )
        {
            try
            {
                deleteResourceProperty( deleteElems[i].getResourceProperty() );
            }
            catch ( DeleteResourcePropertyRequestFailedFaultException fault )
            {
                throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), fault.getFaultString() );
            }
        }

        UpdateType[] updateElems = requestElem.getUpdateArray();
        for ( int i = 0; i < updateElems.length; i++ )
        {
            XmlObject[] newPropElems = XmlBeanUtils.getChildElements( updateElems[i] );
            try
            {
                updateResourceProperty( newPropElems );
            }
            catch ( UpdateResourcePropertyRequestFailedFaultException fault )
            {
                throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), fault.getFaultString() );
            }
            catch ( InvalidUpdateResourcePropertiesRequestContentFaultException fault )
            {
                throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), fault.getFaultString() );
            }
View Full Code Here

                                                                             + " " + propQName + " properties." );
      }

      if ( !isSetResourceProperty( propQName ) )
      {
         throw new SetResourcePropertyRequestFailedFaultException( "Cannot delete property " + propQName
                                                                   + " because it is not currently set." );
      }

      if ( isReadOnly( propQName ) )
      {
View Full Code Here

         currentPropXbeans = getPropertyXmlBeans( propQName );
      }
      catch ( Exception e )
      {
         e.printStackTrace(  );
         throw new SetResourcePropertyRequestFailedFaultException( "Failed to insert property " + propQName );
      }

      if ( !isLegalNumberOfProperties( propQName, currentPropXbeans.length + requestPropElems.length ) )
      {
         throw new InvalidSetResourcePropertiesRequestContentFaultException( "Invalid number of properties specified for insert - the schema mandates a minimum of "
View Full Code Here

         currentPropXBeans = getPropertyXmlBeans( propQName );
      }
      catch ( Exception e )
      {
         e.printStackTrace(  );
         throw new SetResourcePropertyRequestFailedFaultException( "Failed to update property " + propQName );
      }

      if ( currentPropXBeans.length == 0 )
      {
         throw new UnableToModifyResourcePropertyFaultException( "Property " + propQName
View Full Code Here

                                   boolean     update )
   throws Exception
   {
      if ( !update && isSetResourceProperty( propQName ) )
      {
         throw new SetResourcePropertyRequestFailedFaultException( "Cannot insert property " + propQName
                                                                   + " because it is already set." );
      }

      XmlObject newPropXmlBean = newPropXmlbeans[0];
View Full Code Here

      checkPropertyQNameIsValid( NameUtils.toQName( firstElemName ) );
      for ( int i = 1; i < propElems.length; i++ )
      {
         if ( propElems[i] == null )
         {
            throw new SetResourcePropertyRequestFailedFaultException( "You cannot pass a null property." );
         }

         if ( !firstElemName.equals( propElems[i].getElementName(  ) ) )
         {
            throw new InvalidResourcePropertyQNameFaultException( "All property elements in the request must have identical QNames." );
View Full Code Here

            newPropXmlbeans[i] = (XmlObject) getter.invoke( newPropXmlbeans[i],
                                                            new Object[0] );
         }
         catch ( Exception e )
         {
            throw new SetResourcePropertyRequestFailedFaultException( "Unable to insert property: " + propQName );
         }

         updated_xml_obj_list[( i + currentPropXbeans.length ) - 1] = newPropXmlbeans[i];
      }
View Full Code Here

TOP

Related Classes of org.apache.ws.resource.properties.faults.SetResourcePropertyRequestFailedFaultException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.