Package org.w3.x2005.x08.addressing

Examples of org.w3.x2005.x08.addressing.EndpointReferenceType


    {
        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

            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

    */
   private XmlObject parseMetadata( MetadataDocument.Metadata metadata )
   {
      //check for MetadataReference...if its there, we're finished.
      XmlObject             result           = null;
      EndpointReferenceType metadataReferece = metadata.getReference(  );
      if ( metadataReferece != null )
      {
         MetadataReferenceDocument metadataReferenceDocument = MetadataReferenceDocument.Factory.newInstance(  );
         metadataReferenceDocument.setMetadataReference( metadataReferece );
         result = metadataReferenceDocument;
View Full Code Here

        return (CreationResponseDocument.CreationResponse) XmlBeanUtils.getChildElements(envelope.getEnvelope().getBody(), new QName(PrinterPortPropertyQNames.PRINTER_REFERENCE.getNamespaceURI(), "CreationResponse"))[0];
    }

    private void setJobURL(EnvelopeDocument envelope)
    {
        EndpointReferenceType jobRef = getJobEndpointReference(envelope);
        setJobURL(jobRef.getAddress().getStringValue());
    }
View Full Code Here

        setJobURL(jobRef.getAddress().getStringValue());
    }

    private EndpointReferenceType getJobEndpointReference(EnvelopeDocument envelope)
    {
        EndpointReferenceType jobRef = (EndpointReferenceType) XmlBeanUtils.getChildElements(getCreationResponse(envelope), JobPortPropertyQNames.JOB_REFERENCE)[0];
        return jobRef;
    }
View Full Code Here

        m_printerReferenceProperties = createPrinter.getPrinterReference().getReferenceProperties();
    }

    private void setPrinterURL(CreatePrinterResponseDocument.CreatePrinterResponse create)
    {
        EndpointReferenceType printerRef = (EndpointReferenceType) XmlBeanUtils.getChildElements(create, PrinterPortPropertyQNames.PRINTER_REFERENCE)[0];
        m_printerURL = printerRef.getAddress().getStringValue();
    }
View Full Code Here

         {
            org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument metadataReferenceDoc      =
               (org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument) metadata;
            XmlBeansEndpointReference                                             xmlBeansEndpointReference =
               new XmlBeansEndpointReference( metadataReferenceDoc.getEndpointReference(  ) );
            EndpointReferenceType                                                 epr =
               (EndpointReferenceType) xmlBeansEndpointReference.getXmlObject( AddressingConstants.NSURI_ADDRESSING_SCHEMA );
            metadata = createMetadataReferenceDocument( epr );
         }
         else
         {
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,
                                                                        new QName( "TODO" ) );
      XmlCursor               xmlCursor = xmlObject.newCursor(  );
      xmlCursor.setTextValue( String.valueOf( ls.getID(  ) ) );
      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
View Full Code Here

TOP

Related Classes of org.w3.x2005.x08.addressing.EndpointReferenceType

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.