Package org.apache.ws.resource.properties

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


    }

    public void testDeleteResourcePropertiesFailedCallback() throws ResourceException, ResourceContextException,
            XmlException
    {
        m_resourceContext = new SushiResourceContext();
        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ika xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + "my favorite!" + "</foo:Ika>" );
        insertResourceProperty( new XmlObject[]{xBean} );
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
View Full Code Here


     */
    public void testUpdateResourcePropertiesCallback() throws ResourceException, ResourceContextException,
            XmlException
    {
        String newValue = "99";
        m_resourceContext = new SushiResourceContext();
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );

        //setup callback on resource prop
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
View Full Code Here

        assertTrue( callback.updateWasInvoked() );
    }

    public void testUpdateOpenContent() throws XmlException
    {
        m_resourceContext = new SushiResourceContext( true );
        insertXsdAnyPropElem();
        assertPropHasOneElemWithGivenValue( SushiPropertyQNames.FUGU, INITIAL_PROP_VALUE_FUGU );
        XmlObject anyXBean = createXsdAnyPropElem();
        final String newValue = "yummy!";
        XmlBeanUtils.setValue( anyXBean, newValue );
View Full Code Here

     */
    public void testUpdateResourceProperty()
            throws XmlException
    {
        final String newValue = "99";
        m_resourceContext = new SushiResourceContext();
        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + newValue + "</foo:Ebi>" );
        updateResourceProperty( new XmlObject[]{xBean} );
        assertPropHasOneElemWithGivenValue( SushiPropertyQNames.EBI, newValue );
View Full Code Here

    /**
     * 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

    /**
     * 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

    /**
     * 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

     * DOCUMENT_ME
     */
    public void testGetMultipleResourcePropertiesCallback()
            throws Exception
    {
        m_resourceContext = new SushiResourceContext();
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );
View Full Code Here

    /**
     * DOCUMENT_ME
     */
    public void testQueryResourceProperties() throws Exception
    {
        m_resourceContext = new SushiResourceContext();
        QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse queryResourcePropertiesResponse = queryResourceProperties( "*" );
        XmlObject[] allPropElems = XmlBeanUtils.getChildElements( queryResourcePropertiesResponse );
        assertNotNull( allPropElems );
        assertTrue( allPropElems.length == 8 );
    }
View Full Code Here

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

TOP

Related Classes of org.apache.ws.resource.properties.SushiResourceContext

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.