Examples of ResourceProperty


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

        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} );
        assertPropHasOneElemWithGivenValue( SushiPropertyQNames.EBI, newValue );
View Full Code Here

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

    {
        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 );
        assertEquals( propNames[0], XmlBeanUtils.getName( propElems[0] ) );
View Full Code Here

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

        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 );
        assertNotNull( ebiPropElems );
View Full Code Here

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

        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 );
        assertEquals( 1, ebiPropElems.length );
View Full Code Here

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

   throws ResourceContextException,
          ResourceException
   {
      JobPropertiesDocument jobPropDoc           = getJobPropDoc( instance );
      PrinterPortResource   printerResource      = (PrinterPortResource) getResourceContext(  ).getResource(  );
      ResourceProperty      printerJobProperties =
         printerResource.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.JOB_PROPERTIES );
      printerJobProperties.add( jobPropDoc );
   }
View Full Code Here

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

   private void incrementQueueCount(  )
   throws ResourceException,
          ResourceContextException
   {
      PrinterPortResource printerResource      = (PrinterPortResource) getResourceContext(  ).getResource(  );
      ResourceProperty    printerJobProperties =
         printerResource.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.QUEUED_JOB_COUNT );
      XmlInteger          queued               = (XmlInteger) printerJobProperties.get( 0 );
      BigInteger          bigIntegerValue      = queued.getBigIntegerValue(  );
      int                 count                = bigIntegerValue.intValue(  );
      count++;
      queued.setBigIntegerValue( BigInteger.valueOf( count ) );
   }
View Full Code Here

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

     */
    public GetResourcePropertyResponseDocument getResourceProperty( GetResourcePropertyDocument requestDoc )
    {
        GetResourcePropertyResponseDocument responseDoc = createResponseDocument();
        QName propName = requestDoc.getGetResourceProperty();
        ResourceProperty prop = getProperty( propName );
        addPropertyToResponse( prop, responseDoc.getGetResourcePropertyResponse() );
        return responseDoc;
    }
View Full Code Here

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

        {
            LOG.debug( MSG.getMessage( Keys.GET_RP_REQ, requestDoc.toString() ) );
        }
        GetResourcePropertyResponseDocument responseDoc = createResponseDocument();
        QName propName = requestDoc.getGetResourceProperty();
        ResourceProperty prop = getProperty( propName );
        addPropertyToResponse( prop, responseDoc.getGetResourcePropertyResponse() );
        return responseDoc;
    }
View Full Code Here

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

         throws Exception
   {
      XmlBeansResourcePropertyMetaData metaData =
            new XmlBeansResourcePropertyMetaData( EndpointReferenceDocument.type.getElementProperty( EPR_TYPE_QNAME ), false );
      m_resourcePropSet.add( metaData.create( m_resourcePropSet ) );
      ResourceProperty resourceProp = m_resourcePropSet.get( EPR_TYPE_QNAME );
      assertNotNull( resourceProp );
      assertEquals( EPR_TYPE_QNAME,
            resourceProp.getMetaData().getName() );
   }
View Full Code Here

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

   public void testCreate()
         throws Exception
   {
      XmlBeansResourcePropertyMetaData metaData =
            new XmlBeansResourcePropertyMetaData( EndpointReferenceDocument.type.getElementProperty( EPR_TYPE_QNAME  ), false );
      ResourceProperty resourceProp = metaData.create( m_resourcePropSet );
      assertNotNull( resourceProp );
      assertEquals( EPR_TYPE_QNAME,
            resourceProp.getMetaData().getName() );
   }
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.