Package org.xmlsoap.schemas.ws.x2004.x08.eventing

Examples of org.xmlsoap.schemas.ws.x2004.x08.eventing.RenewDocument$Renew


            {
                RelationshipParticipantType relationshipParticipantType = participantArray[j];
                EndpointReferenceType[] manageabilityEndpointReferenceArray = relationshipParticipantType.getManageabilityEndpointReferenceArray();
                for (int k = 0; k < manageabilityEndpointReferenceArray.length; k++)
                {
                    EndpointReferenceType endpointReferenceType = manageabilityEndpointReferenceArray[k];
                    ResourceStub resource = new ResourceStub(new XmlBeansEndpointReference(endpointReferenceType));
                    XmlObject[] resourceProperty = resource.getResourceProperty(WeatherstationPropertyQNames.FCCID);
                    assertTrue("Unable to invoke operation on resource.",resourceProperty.length == 1);
                }
            }
View Full Code Here


            QName qName = QName.valueOf("{" + WeatherstationPropertyQNames.FCCID.getNamespaceURI() + "}ResourceID");
            //add a participant
            RelationshipParticipantType relationshipParticipantType = relationshipType.addNewParticipant();
            relationshipParticipantType.setResourceId("urn:" + InteropConstants.WEATHERSTATION_KEY1);
            relationshipParticipantType.setRole("urn://parent");//uri
            EndpointReferenceType manageabilityEndpointReferenceType = relationshipParticipantType.addNewManageabilityEndpointReference();
            manageabilityEndpointReferenceType.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
            ReferencePropertiesType referencePropertiesType = manageabilityEndpointReferenceType.addNewReferenceProperties();
            XmlObject key1 = XmlBeanUtils.addChildElement(referencePropertiesType, qName);
            XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY1);

            RelationshipParticipantType relationshipParticipantType2 = relationshipType.addNewParticipant();
            relationshipParticipantType2.setResourceId("urn:" + InteropConstants.WEATHERSTATION_KEY2);//spec optional
            relationshipParticipantType2.setRole("urn://child1");//uri
            EndpointReferenceType manageabilityEndpointReferenceType2 = relationshipParticipantType.addNewManageabilityEndpointReference();
            manageabilityEndpointReferenceType2.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
            ReferencePropertiesType referencePropertiesType2 = manageabilityEndpointReferenceType2.addNewReferenceProperties();
            XmlObject key2 = XmlBeanUtils.addChildElement(referencePropertiesType2, qName);
            XmlBeanUtils.setValue(key2, InteropConstants.WEATHERSTATION_KEY2);

            resourceProperty.add(relationshipDocument);

            /*----------------- MOWS OperationalState props -----------------*/
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.CURRENTOPERATIONALSTATE);
            CurrentOperationalStateDocument currentOperationalStateDocument = CurrentOperationalStateDocument.Factory.newInstance();
            currentOperationalStateDocument.addNewCurrentOperationalState();
            resourceProperty.add(currentOperationalStateDocument);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTOPERATIONALSTATETRANSITION);
            LastOperationalStateTransitionDocument lastOperationalStateTransitionDocument = LastOperationalStateTransitionDocument.Factory.newInstance();
            StateTransitionType stateTransitionType = lastOperationalStateTransitionDocument.addNewLastOperationalStateTransition();
            stateTransitionType.addNewEnteredState();
            stateTransitionType.addNewPreviousState();
            stateTransitionType.setTime(Calendar.getInstance());
            stateTransitionType.setTransitionIdentifier("");
            resourceProperty.add(lastOperationalStateTransitionDocument);

            /*----------------- MOWS EndpointIdentification props -----------------*/
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.ENDPOINTREFERENCE);
            EndpointReferenceDocument endpointReferenceDocument = EndpointReferenceDocument.Factory.newInstance();
            EndpointReferenceType endpointReferenceType = endpointReferenceDocument.addNewEndpointReference();//temporary
            AttributedURI attributedURI = endpointReferenceType.addNewAddress();
            attributedURI.setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.BLACKBERRY_SERVICE_NAME);
            resourceProperty.add(endpointReferenceDocument);
            resourceProperty.addChangeListener(mowsIdentificationCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.ENDPOINTDESCRIPTIONS);
View Full Code Here

       
        SubscribeDocument sdom = SubscribeDocument.Factory.newInstance();
        SubscribeDocument.Subscribe s = sdom.addNewSubscribe();
       
        //create notifyTo EPR
        EndpointReferenceType nepr = (EndpointReferenceType)((XmlObjectWrapper)notificationConsumer.getEPR()).getXmlObject();
        //add ReferenceProperties
        ReferencePropertiesType refProps = nepr.addNewReferenceProperties();
        XmlObject xmlObject = XmlBeanUtils.addChildElement( refProps, ls.getResourceKey().getName());
        XmlCursor xmlCursor = xmlObject.newCursor();
        xmlCursor.setTextValue(ls.getResourceKey().getValue().toString());
        xmlCursor.dispose();
        //notifications are send to:
        DeliveryType delivery = s.addNewDelivery();
        delivery.setNotifyTo(nepr);
        if(UseNotify==true){
            delivery.setMode(WRAPPED_MODE_URI);
        }

       
        //create endto EPR
        EndpointReferenceType eepr = (EndpointReferenceType)((XmlObjectWrapper)subscriptionEndConsumer.getEPR()).getXmlObject();
        //add ReferenceProperties we already created
        eepr.setReferenceProperties(refProps);
        //subscription ends are send to:
        s.setEndTo(eepr);
       
        //TODO check Calendar serializing
        ExpirationType expires = ExpirationType.Factory.newInstance();
View Full Code Here

    * @return DOCUMENT_ME
    */
   public static boolean compare( RelationshipParticipantType firstParticipant,
                                  RelationshipParticipantType secondParticipant )
   {
      EndpointReferenceType firstEpr  = firstParticipant.getManageabilityEndpointReferenceArray( 0 );
      EndpointReferenceType secondEpr = secondParticipant.getManageabilityEndpointReferenceArray( 0 );
      if ( firstEpr.getAddress(  ).getStringValue(  ).compareTo( secondEpr.getAddress(  ).getStringValue(  ) ) != 0 )
      {
         return false;
      }

      XmlObject[] firstchildElems  = XmlBeanUtils.getChildElements( firstEpr.getReferenceProperties(  ) );
      XmlObject[] secondchildElems = XmlBeanUtils.getChildElements( secondEpr.getReferenceProperties(  ) );
      if ( firstchildElems.length != secondchildElems.length )
      {
         return false;
      }

View Full Code Here

   public static EndpointReferenceType createEpr( ResourceKey key,
                                                  String      serviceUrl,
                                                  String      serviceName )
   {
      EndpointReferenceDocument eprD    = EndpointReferenceDocument.Factory.newInstance(  );
      EndpointReferenceType     eprT    = eprD.addNewEndpointReference(  );
      AttributedURI             address = eprT.addNewAddress(  );
      address.setStringValue( serviceUrl + "/" + serviceName );
      ReferencePropertiesType refPropType = eprT.addNewReferenceProperties(  );
      if ( key != null )
      {
         XmlObject xmlObj = XmlBeanUtils.addChildElement( refPropType,
                                                          key.getName(  ) );
         XmlBeanUtils.setValue( xmlObj,
View Full Code Here

    {
        XmlObject[] capabilityElems = m_resource.getResourceProperty( ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
        assertContainsURI( capabilityElems, IdentificationCapability.URI );
        XmlObject eprPropElem = getSingleProperty( m_resource, IdentificationCapability.PROP_NAME_ENDPOINT_REFERENCE );
        assertTrue( eprPropElem instanceof EndpointReferenceType );
        EndpointReferenceType epr = (EndpointReferenceType) eprPropElem;
        assertTrue( "mows-xs:EndpointReference element is not valid", epr.validate() );
        String address = epr.getAddress().getStringValue();
        XmlObject epDescsPropElem = getSingleProperty( m_resource, IdentificationCapability.PROP_NAME_ENDPOINT_DESCRIPTIONS );
        assertTrue( epDescsPropElem instanceof EndpointDescriptionsDocument.EndpointDescriptions );
        EndpointDescriptionsDocument.EndpointDescriptions epDescs = (EndpointDescriptionsDocument.EndpointDescriptions)epDescsPropElem;
        assertTrue( "mows-xs:EndpointDescriptions element is not valid", epDescs.validate() );
        String[] wsdlURLs = epDescs.getDescriptionArray();
View Full Code Here

            {
                RelationshipParticipantType relationshipParticipantType = participantArray[j];
                EndpointReferenceType[] manageabilityEndpointReferenceArray = relationshipParticipantType.getManageabilityEndpointReferenceArray();
                for (int k = 0; k < manageabilityEndpointReferenceArray.length; k++)
                {
                    EndpointReferenceType endpointReferenceType = manageabilityEndpointReferenceArray[k];
                    ResourceStub resource = new ResourceStub(new XmlBeansEndpointReference(endpointReferenceType));
                    XmlObject[] resourceProperty = resource.getResourceProperty(WeatherstationPropertyQNames.FCCID);
                    assertTrue("Unable to invoke operation on resource.",resourceProperty.length == 1);
                }
            }
View Full Code Here

    public GetManageabilityReferencesResponseDocument getManageabilityReferences(GetManageabilityReferencesDocument request)
    {
        GetManageabilityReferencesResponseDocument getManageabilityReferencesResponseDocument = GetManageabilityReferencesResponseDocument.Factory.newInstance();
        GetManageabilityReferencesResponseDocument.GetManageabilityReferencesResponse getManageabilityReferencesResponse = getManageabilityReferencesResponseDocument.addNewGetManageabilityReferencesResponse();
        QName resourceKeyName = QName.valueOf("{" + WeatherstationPropertyQNames.FCCID.getNamespaceURI() + "}ResourceID");
        EndpointReferenceType endpointReferenceType = getManageabilityReferencesResponse.addNewManageabilityEndpointReference();
        AttributedURI attributedURI = endpointReferenceType.addNewAddress();
        attributedURI.setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
        ReferencePropertiesType referencePropertiesType = endpointReferenceType.addNewReferenceProperties();
        XmlObject key1 = XmlBeanUtils.addChildElement(referencePropertiesType, resourceKeyName);
        XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY1);

        EndpointReferenceType endpointReferenceType2 = getManageabilityReferencesResponse.addNewManageabilityEndpointReference();
        attributedURI = endpointReferenceType2.addNewAddress();
        attributedURI.setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
        referencePropertiesType = endpointReferenceType2.addNewReferenceProperties();
        key1 = XmlBeanUtils.addChildElement(referencePropertiesType, resourceKeyName);
        XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY2);

        return getManageabilityReferencesResponseDocument;
    }
View Full Code Here

            XmlBeanUtils.setValue(resourceKey, (String)m_resourceKey.getValue());
        }

        if(m_referenceParameters != null)
        {
        ReferenceParametersType referenceParametersType = endpointReferenceType.addNewReferenceParameters();
        addToProperties(referenceParametersType, m_referenceParameters);
        }
        return endpointReferenceType;
    }
View Full Code Here

      //create notifyTo EPR
      EndpointReferenceType nepr =
         (EndpointReferenceType) ( (XmlObjectWrapper) notificationConsumer.getEPR(  ) ).getXmlObject(  );

      //add ReferenceProperties
      ReferencePropertiesType refProps  = nepr.addNewReferenceProperties(  );
      XmlObject               xmlObject = XmlBeanUtils.addChildElement( refProps,
                                                                        new QName( "TODO" ) );
      XmlCursor               xmlCursor = xmlObject.newCursor(  );
      xmlCursor.setTextValue( String.valueOf( ls.getID(  ) ) );
      xmlCursor.dispose(  );
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws.x2004.x08.eventing.RenewDocument$Renew

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.