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

Examples of org.xmlsoap.schemas.ws.x2004.x08.eventing.SubscribeResponseDocument


    messagesJPanel1.setMessage(new WcmMessage(messageText, "","N"));
    try {
      NotificationMessageHolderType noteMess = getNotificationMessageHolder(messageText);     
      ManagementEventTypeImpl manEvt = parseManagementEvent(noteMess);       
      String optStatus = parseCurrentOperationalStatus(manEvt);
      EndpointReferenceType epr = parseSourceEpr(noteMess) ;
      //if(epr)
      System.out.println(""+epr.getAddress()+" Reports "+optStatus);
      updateStatusOfWs(epr,optStatus);
    } catch (XmlException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here


  public WsImpl(RelationshipTypeImpl relationship,String listenerURL,Observer observer){
    this.listenerURL=listenerURL;
    //this.topicQName=topicQName;
    this.observer=observer;
    RelationshipParticipantType participant = relationship.getParticipantArray(1);
    EndpointReferenceType eprt = participant.getManageabilityEndpointReferenceArray(0);
    AttributedURI eprtAddr = eprt.getAddress();
    String addr = eprtAddr.getStringValue();
    addr=addr.replaceAll("192\\.168\\.0\\.20","12\\.35\\.246\\.160");
    eprtAddr.setStringValue(addr);
    wsEpr=(EndpointReference)new XmlBeansEndpointReference(eprt);
    getNameFromEpr();   
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

    public void insertProperty(Object[] propElems) throws CallbackFailedException
    {
        if (propElems.length == 1)
        {
            //get the request epr
            EndpointReferenceType weatherStationEpr = (EndpointReferenceType) propElems[0];
            ResourcePropertySet resourcePropertySet = ((PropertiesResource) this).getResourcePropertySet();
            ResourceProperty resourceProperty = resourcePropertySet.get(WeatherClientConfigPropertyQNames.RELATIONSHIP);

            //define a relationship
            RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();
            RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());

            //add self as a participant
            RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
            XmlBeansEndpointReference xmlEpr = (XmlBeansEndpointReference) this.getEndpointReference();
            EndpointReferenceType configEndpointReferenceType = (EndpointReferenceType) xmlEpr.getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
            parentRelationshipParticipantType.setResourceId("urn:" + getID());
            parentRelationshipParticipantType.setRole(InteropConstants.PARENT_RELATION);//uri
            parentRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{configEndpointReferenceType});

View Full Code Here

        //add self as a participant
        RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
        WeatherStationDirResource resource = (WeatherStationDirResource) getResource();
        XmlBeansEndpointReference xmlEpr = (XmlBeansEndpointReference) resource.getEndpointReference();
        EndpointReferenceType dirEndpointReferenceType = (EndpointReferenceType) xmlEpr.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

        {
            //parse out the managementevent
            ManagementEventTypeImpl manEvt = parseManagementEvent(messageText);

            //here is the epr and the address of the source of the event....this is the weatherstation which caused the event.
            EndpointReferenceType sourceEpr = parseSourceEpr(manEvt);
            String sourceAddress = sourceEpr.getAddress().getStringValue();

            //get the current operational status.....
            String currentOperationalStatus = parseCurrentOperationalStatus(manEvt);

            //try again to get the available message ...this was to debug their end....
View Full Code Here

     */
    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

TOP

Related Classes of org.xmlsoap.schemas.ws.x2004.x08.eventing.SubscribeResponseDocument

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.