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

Examples of org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceDocument


     */
    private EndpointReferenceType parseSourceEpr(ManagementEventTypeImpl manEvt)
    {
        ComponentType sourceComponent = manEvt.getSourceComponent();
        ComponentAddressType sourceCompAddr = sourceComponent.getComponentAddressArray(0);
        EndpointReferenceType sourceEpr =
                (EndpointReferenceType) XmlBeanUtils.getChildElements(sourceCompAddr)[0];
        return sourceEpr;
    }
View Full Code Here


        RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());

        //add self as a participant
        RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
        XmlBeansEndpointReference dirEpr = (XmlBeansEndpointReference) getEndpointReference();
        EndpointReferenceType dirEndpointReferenceType = (EndpointReferenceType) dirEpr.getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
        parentRelationshipParticipantType.setResourceId(InteropConstants.DIR_RESOURCEID);
        parentRelationshipParticipantType.setRole(InteropConstants.PARENT_RELATION);//uri
        parentRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{dirEndpointReferenceType});

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

            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

TOP

Related Classes of org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceDocument

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.