Examples of SushiResourceContext


Examples of org.apache.ws.resource.properties.SushiResourceContext

    /**
     * DOCUMENT_ME
     */
    public void testQueryWithInvalidExpr() throws Exception
    {
        m_resourceContext = new SushiResourceContext();
        try
        {
            QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse response = queryResourceProperties( "\\/\\/\\/\\/\\/" );
            fail( response != null ? "Expected fault, but received response." : null );
        }
View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

    }

    public void testQueryOpenContent() throws XmlException
    {
        m_resourceContext = new SushiResourceContext();
        insertXsdAnyPropElem();
        QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse queryResourcePropertiesResponse = queryResourceProperties( "*" );
        XmlObject[] allPropElems = XmlBeanUtils.getChildElements( queryResourcePropertiesResponse );
        assertNotNull( allPropElems );
        assertEquals( 9, allPropElems.length );
View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

     */
    public void testQueryResourcePropertiesCallback()
            throws ResourceException,
            ResourceContextException
    {
        m_resourceContext = new SushiResourceContext();

        //build callback obj
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );

View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

    /**
     * Tests that a GetRP request for an existing prop returns a GetRPResponse elem containing that prop.
     */
    public void testGetExistingProp()
    {
        m_resourceContext = new SushiResourceContext();
        GetResourcePropertyResponseDocument.GetResourcePropertyResponse response = getResourceProperty( SushiPropertyQNames.IKA );
        XmlObject[] ebiPropElems = XmlBeanUtils.getChildElements( response, SushiPropertyQNames.IKA );
        assertNotNull( ebiPropElems );
        assertEquals( 1, ebiPropElems.length );
        assertEquals( "mamamia", XmlBeanUtils.getValue( ebiPropElems[0] ) );
View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

    /**
     * Tests that a GetRP request for a non-existing optional prop returns an empty GetRPResponse elem.
     */
    public void testGetNonexistingOptionalProp()
    {
        m_resourceContext = new SushiResourceContext();
        GetResourcePropertyResponseDocument.GetResourcePropertyResponse response = getResourceProperty( SushiPropertyQNames.UNI );
        XmlObject[] uniPropElems = XmlBeanUtils.getChildElements( response, SushiPropertyQNames.UNI );
        assertNotNull( uniPropElems );
        assertEquals( 0, uniPropElems.length );
    }
View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

     * Tests that a GetRP request for an invalid prop QName throws a fault exception,
     * wether or not the RP doc permits open content.
     */
    public void testGetInvalidProp()
    {
        m_resourceContext = new SushiResourceContext( true );
        assertGetRequestForInvalidPropThrowsFault();
        m_resourceContext = new SushiResourceContext( false );
        assertGetRequestForInvalidPropThrowsFault();
    }
View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

     * invokes a {@link org.apache.ws.resource.properties.ResourcePropertyCallback} if one is registered for the
     * requested property.
     */
    public void testGetPropertyTriggersCallback() throws Exception
    {
        m_resourceContext = new SushiResourceContext();
        // create and register callback object
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

    /**
     * DOCUMENT_ME
     */
    public void testGetMultiExistingProps()
    {
        m_resourceContext = new SushiResourceContext();
        final QName[] propNames = new QName[]{SushiPropertyQNames.EBI, SushiPropertyQNames.IKA};
        GetMultipleResourcePropertiesResponseDocument.GetMultipleResourcePropertiesResponse response = getMultipleResourceProperties( propNames );
        XmlObject[] propElems = XmlBeanUtils.getChildElements( response, null );
        assertNotNull( propElems );
        assertEquals( propNames.length, propElems.length );
View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

    /**
     * DOCUMENT_ME
     */
    public void testGetMultiWithAllInvalidPropNames()
    {
        m_resourceContext = new SushiResourceContext( true );
        assertGetMultiRequestThrowsFault( new QName[]{BOGUS_PROP_NAME, ANOTHER_BOGUS_PROP_NAME} );
        m_resourceContext = new SushiResourceContext( false );
        assertGetMultiRequestThrowsFault( new QName[]{BOGUS_PROP_NAME, ANOTHER_BOGUS_PROP_NAME} );
    }
View Full Code Here

Examples of org.apache.ws.resource.properties.SushiResourceContext

    /**
     * DOCUMENT_ME
     */
    public void testGetMultiWithSomeInvalidPropNames()
    {
        m_resourceContext = new SushiResourceContext( true );
        assertGetMultiRequestThrowsFault( new QName[]{SushiPropertyQNames.OHTORO, BOGUS_PROP_NAME} );
        m_resourceContext = new SushiResourceContext( false );
        assertGetMultiRequestThrowsFault( new QName[]{SushiPropertyQNames.OHTORO, BOGUS_PROP_NAME} );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.