Examples of SushiResource


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

    public void testInsertResourcePropertiesCallback() throws XmlException, ResourceException,
            ResourceContextException
    {
        m_resourceContext = new SushiResourceContext();
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( m_callback );

        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + "0" + "</foo:Ebi>" );
View Full Code Here

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

    public void testInsertResourcePropertiesFailedCallback() throws XmlException, ResourceException,
            ResourceContextException
    {
        m_resourceContext = new SushiResourceContext();
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( new ThrowsCallback() );

        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + "0" + "</foo:Ebi>" );
View Full Code Here

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

        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();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.IKA );
        resourceProp.setCallback( m_callback );
        deleteResourceProperty( SushiPropertyQNames.IKA );
        GetResourcePropertyResponseDocument.GetResourcePropertyResponse getResourcePropertyResponse = getResourceProperty(
                SushiPropertyQNames.OHTORO );
        assertNotNull( getResourcePropertyResponse );
View Full Code Here

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

        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();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.IKA );
        resourceProp.setCallback( new ThrowsCallback() );
        try
        {
            deleteResourceProperty( SushiPropertyQNames.IKA );
        }
View Full Code Here

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

        m_resourceContext = new SushiResourceContext();
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );

        //setup callback on resource prop
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );
        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + newValue + "</foo:Ebi>" );
        updateResourceProperty( new XmlObject[]{xBean} );
View Full Code Here

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

            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 );
        final QName[] propNames = new QName[]{SushiPropertyQNames.EBI, SushiPropertyQNames.IKA};
        GetMultipleResourcePropertiesResponseDocument.GetMultipleResourcePropertiesResponse response = getMultipleResourceProperties( propNames );
        XmlObject[] propElems = XmlBeanUtils.getChildElements( response );
        assertNotNull( propElems );
View Full Code Here

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

                XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
        String value = XmlBeanUtils.getValue( ebiPropElems[0] );
        assertEquals( "9", value );

        //setup callback to modify resource prop
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );

        queryResourcePropertiesResponse = queryResourceProperties( "*" );

        ebiPropElems = XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
View Full Code Here

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

    {
        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 );
        resourceProp.setCallback( callback );
        // send GetRP request and make sure prop got updated by callback.refreshProperty()
        GetResourcePropertyResponseDocument.GetResourcePropertyResponse response = getResourceProperty( SushiPropertyQNames.EBI );
        XmlObject[] ebiPropElems = XmlBeanUtils.getChildElements( response, SushiPropertyQNames.EBI );
        assertNotNull( ebiPropElems );
View Full Code Here

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

            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 );
        final QName[] propNames = new QName[]{SushiPropertyQNames.EBI, SushiPropertyQNames.IKA};
        GetMultipleResourcePropertiesResponseDocument.GetMultipleResourcePropertiesResponse response = getMultipleResourceProperties( propNames );
        XmlObject[] propElems = XmlBeanUtils.getChildElements( response );
        assertNotNull( propElems );
View Full Code Here

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

                XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
        String value = XmlBeanUtils.getValue( ebiPropElems[0] );
        assertEquals( "9", value );

        //setup callback to modify resource prop
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );

        queryResourcePropertiesResponse = queryResourceProperties( "*" );

        ebiPropElems = XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
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.