Package org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01

Examples of org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument


        return responseDoc;
    }

    private QueryResourcePropertiesResponseDocument createResponseDocument()
    {
        QueryResourcePropertiesResponseDocument responseDoc =
                QueryResourcePropertiesResponseDocument.Factory.newInstance();
        responseDoc.addNewQueryResourcePropertiesResponse();
        return responseDoc;
    }
View Full Code Here


        {
            LOG.debug( MSG.getMessage( Keys.QUERY_RP_REQ,
                    requestDoc.toString() ) );
        }

        QueryResourcePropertiesResponseDocument responseDoc = createResponseDocument();
        QueryExpressionType queryExprElem =
                requestDoc.getQueryResourceProperties().getQueryExpression();
        SOAPEnvelope envelope;
        try
        {
            envelope = getResourceContext().getSOAPMessage().getSOAPPart().getEnvelope();
        }
        catch ( SOAPException soape )
        {
            throw new JAXRPCException( MSG.getMessage( Keys.FAILED_TO_EXTRACT_SOAP_ENV, soape ) );
        }

        XmlBeansQueryExpression queryExpr = new XmlBeansQueryExpression( queryExprElem );

        refreshAllProperties();
        Object result = null;
        try
        {
            result = QUERY_ENGINE.executeQuery( queryExpr,
                    getProperties(),
                    envelope );
        }
        catch ( UnknownQueryExpressionDialectException uqede )
        {
            throw new UnknownQueryExpressionDialectFaultException( uqede.getDialect() );
        }
        catch ( QueryEvaluationErrorException qeee )
        {
            throw new QueryEvaluationErrorFaultException( qeee.getMessage() );
        }
        catch ( InvalidQueryExpressionException iqee )
        {
            throw new InvalidQueryExpressionFaultException( queryExpr );
        }

        QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse responseElem =
                responseDoc.getQueryResourcePropertiesResponse();
        if ( result.getClass().isArray() )
        {
            for ( int i = 0; i < Array.getLength( result ); i++ )
            {
                Object resultItem = Array.get( result, i );
View Full Code Here

        return responseDoc;
    }

    private QueryResourcePropertiesResponseDocument createResponseDocument()
    {
        QueryResourcePropertiesResponseDocument responseDoc =
                QueryResourcePropertiesResponseDocument.Factory.newInstance();
        responseDoc.addNewQueryResourcePropertiesResponse();
        return responseDoc;
    }
View Full Code Here

        QueryResourcePropertiesDocument doc = QueryResourcePropertiesDocument.Factory.newInstance();
        QueryResourcePropertiesDocument.QueryResourceProperties queryResourceProperties = doc.addNewQueryResourceProperties();
        QueryExpressionType queryExpressionType = queryResourceProperties.addNewQueryExpression();
        queryExpressionType.setDialect( dialect.toString() );
        XmlBeanUtils.setValue( queryExpressionType, xPathExpr );
        QueryResourcePropertiesResponseDocument queryResourcePropertiesResponseDocument = provider.queryResourceProperties( doc );
        QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse queryResourcePropertiesResponse =
                queryResourcePropertiesResponseDocument.getQueryResourcePropertiesResponse();
        return queryResourcePropertiesResponse;
    }
View Full Code Here

        {
            LOG.debug( MSG.getMessage( Keys.QUERY_RP_REQ,
                    requestDoc.toString() ) );
        }

        QueryResourcePropertiesResponseDocument responseDoc = createResponseDocument();
        QueryExpressionType queryExprElem =
                requestDoc.getQueryResourceProperties().getQueryExpression();
        SOAPEnvelope envelope;
        try
        {
            envelope = getResourceContext().getSOAPMessage().getSOAPPart().getEnvelope();
        }
        catch ( SOAPException soape )
        {
            throw new JAXRPCException( MSG.getMessage( Keys.FAILED_TO_EXTRACT_SOAP_ENV, soape ) );
        }

        XmlBeansQueryExpression queryExpr = new XmlBeansQueryExpression( queryExprElem );

        refreshAllProperties();
        Object result = null;
        try
        {
            result = QUERY_ENGINE.executeQuery( queryExpr,
                    getProperties(),
                    envelope );
        }
        catch ( UnknownQueryExpressionDialectException uqede )
        {
            throw new UnknownQueryExpressionDialectFaultException(NAMESPACE_SET, uqede.getDialect() );
        }
        catch ( QueryEvaluationErrorException qeee )
        {
            throw new QueryEvaluationErrorFaultException(NAMESPACE_SET, qeee.getMessage() );
        }
        catch ( InvalidQueryExpressionException iqee )
        {
            throw new InvalidQueryExpressionFaultException(NAMESPACE_SET, queryExpr );
        }

        QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse responseElem =
                responseDoc.getQueryResourcePropertiesResponse();
        if ( result.getClass().isArray() )
        {
            for ( int i = 0; i < Array.getLength( result ); i++ )
            {
                Object resultItem = Array.get( result, i );
View Full Code Here

        return responseDoc;
    }

    private QueryResourcePropertiesResponseDocument createResponseDocument()
    {
        QueryResourcePropertiesResponseDocument responseDoc =
                QueryResourcePropertiesResponseDocument.Factory.newInstance();
        responseDoc.addNewQueryResourcePropertiesResponse();
        return responseDoc;
    }
View Full Code Here

        super(oldValue, newValue);
    }

    protected XmlObject buildPropValueChangeNotifDocXmlBean( Object[] oldValue, Object[] newValue )
    {
        ResourcePropertyValueChangeNotificationDocument propValueChangeNotifDocXBean = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType propValueChangeNotifXBean = propValueChangeNotifDocXBean.addNewResourcePropertyValueChangeNotification();
        ResourcePropertyValueChangeNotificationType.OldValue oldValueXBean = propValueChangeNotifXBean.addNewOldValue();
        if ( oldValue != null )
        {
            for ( int i = 0; i < oldValue.length; i++ )
            {
View Full Code Here

        xmlCursor.toPrevToken();
        XmlObject object = xmlCursor.getObject();
        xString1 = (XmlString) object.set( xString2 );
        System.out.println( xString1 );

        ResourcePropertyValueChangeNotificationDocument resourcePropertyValueChangeNotificationDocument = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType resourcePropertyValueChangeNotificationType = resourcePropertyValueChangeNotificationDocument.addNewResourcePropertyValueChangeNotification();
        ResourcePropertyValueChangeNotificationType.OldValue oldValue = resourcePropertyValueChangeNotificationType.addNewOldValue();
        XmlCursor parentCursor = oldValue.newCursor();
        if ( parentCursor.toLastChild() )
        {
            parentCursor.toEndToken();
            parentCursor.toNextToken();
        }
        parentCursor.toEndToken();
        parentCursor.insertElement( new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd", "BaseFault" ));
        System.out.println( "BEFORE:\n" + oldValue.xmlText( new XmlOptions().setSaveOuter() ) );
        parentCursor.toPrevSibling();
        XmlObject childXBean = parentCursor.getObject();
        parentCursor.dispose();
        //BaseFaultDocument baseFaultDocument = BaseFaultDocument.Factory.newInstance( );
        //BaseFaultType baseFaultType = baseFaultDocument.addNewBaseFault();
        BaseFaultType baseFaultType = BaseFaultType.Factory.newInstance( );
        baseFaultType.setTimestamp( Calendar.getInstance( ) );
        childXBean.set( baseFaultType );
        System.out.println( "AFTER:\n" + oldValue.xmlText( new XmlOptions().setSaveOuter() ) );

        ResourcePropertyValueChangeNotificationDocument resourcePropertyValueChangeNotificationDocument1 = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType resourcePropertyValueChangeNotificationType1 = resourcePropertyValueChangeNotificationDocument.addNewResourcePropertyValueChangeNotification();
        ResourcePropertyValueChangeNotificationType.OldValue oldValue1 = resourcePropertyValueChangeNotificationType1.addNewOldValue();
        oldValue1.newCursor().setTextValue( "one" );
        System.out.println( resourcePropertyValueChangeNotificationDocument );
View Full Code Here

        return m_propValueChangeNotifDocXBean;
    }

    private ResourcePropertyValueChangeNotificationDocument buildPropValueChangeNotifDocXmlBean( Object[] oldValue, Object[] newValue )
    {
        ResourcePropertyValueChangeNotificationDocument propValueChangeNotifDocXBean = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType propValueChangeNotifXBean = propValueChangeNotifDocXBean.addNewResourcePropertyValueChangeNotification();
        ResourcePropertyValueChangeNotificationType.OldValue oldValueXBean = propValueChangeNotifXBean.addNewOldValue();
        if ( oldValue != null )
        {
            for ( int i = 0; i < oldValue.length; i++ )
            {
View Full Code Here

        super(oldValue, newValue);
    }

    protected XmlObject buildPropValueChangeNotifDocXmlBean( Object[] oldValue, Object[] newValue )
    {
        ResourcePropertyValueChangeNotificationDocument propValueChangeNotifDocXBean = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType propValueChangeNotifXBean = propValueChangeNotifDocXBean.addNewResourcePropertyValueChangeNotification();
        ResourcePropertyValueChangeNotificationType.OldValue oldValueXBean = propValueChangeNotifXBean.addNewOldValue();
        if ( oldValue != null )
        {
            for ( int i = 0; i < oldValue.length; i++ )
            {
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument

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.