Package org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2

Examples of org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.NameDocument


        assertTrue( "ResetAt metadata attribute is not set", numSuccessfulRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numSuccessfulRequestsMetric.isSetDuration() );
        assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
        XmlObject serviceTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_SERVICE_TIME );
        assertTrue( serviceTimePropElem instanceof DurationMetric );
        DurationMetric serviceTimeMetric = ((DurationMetric)serviceTimePropElem);
        assertTrue( "Duration metadata attribute is not set", serviceTimeMetric.isSetDuration() );
        XmlObject maxResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
        assertTrue( maxResponseTimePropElem instanceof DurationMetric );
        DurationMetric maxResponseTimeMetric = ((DurationMetric)maxResponseTimePropElem);
        assertTrue( "Duration metadata attribute is not set", maxResponseTimeMetric.isSetDuration() );
        XmlObject lastResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
        assertTrue( lastResponseTimePropElem instanceof DurationMetric );
    }
View Full Code Here


        m_url = url;
    }

    protected EndpointReferenceType[] getManageabilityReferences() throws FaultException
    {
        GetManageabilityReferencesDocument requestDoc = GetManageabilityReferencesDocument.Factory.newInstance();
        requestDoc.addNewGetManageabilityReferences();
        XmlObject response = sendRequest( requestDoc, "http://xyz.com/action/GetManageabilityReferences", m_url);
        if ( ! ( response instanceof GetManageabilityReferencesResponseDocument.GetManageabilityReferencesResponse ) )
        {
            throw new FaultException( response.toString() );
        }
View Full Code Here

        assertContainsURI( capabilityElems, MetricsCapability.URI );
        XmlObject currentTimePropElem = getSingleProperty( m_resource, org.apache.ws.muws.v1_0.capability.MetricsCapability.PROP_NAME_CURRENT_TIME );
        assertTrue( currentTimePropElem instanceof XmlDateTime );
        XmlObject numRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_REQUESTS );
        assertTrue( numRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numRequestsMetric = ((IntegerCounter)numRequestsPropElem);
        long numRequests = numRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numRequestsMetric.isSetDuration() );
        XmlObject numFailedRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_FAILED_REQUESTS );
        assertTrue( numFailedRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numFailedRequestsMetric = ((IntegerCounter)numFailedRequestsPropElem);
        long numFailedRequests = numFailedRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numFailedRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numFailedRequestsMetric.isSetDuration() );
        XmlObject numSuccessfulRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_SUCCESSFUL_REQUESTS );
        assertTrue( numSuccessfulRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numSuccessfulRequestsMetric = ((IntegerCounter)numSuccessfulRequestsPropElem);
        long numSuccessfulRequests = numSuccessfulRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numSuccessfulRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numSuccessfulRequestsMetric.isSetDuration() );
        assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
        XmlObject serviceTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_SERVICE_TIME );
        assertTrue( serviceTimePropElem instanceof DurationMetric );
        DurationMetric serviceTimeMetric = ((DurationMetric)serviceTimePropElem);
        assertTrue( "Duration metadata attribute is not set", serviceTimeMetric.isSetDuration() );
View Full Code Here

     * @return Source EPR
     */
    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

     */
    private XmlObject buildManagementEvent(XmlObject event)
    {
        Situation situation = new SituationImpl(new CategoryImpl(MuwsConstants.SITUATION_OTHER));
        XmlBeansManagementEvent xme = new XmlBeansManagementEvent(situation);
        ManagementEventDocument mgmtEventDoc = (ManagementEventDocument) ((XmlObjectWrapper) xme).getXmlObject();
        ManagementEventType mgmtEvent = mgmtEventDoc.getManagementEvent();
        XmlBeanUtils.addChildElement(mgmtEvent, event);
        return mgmtEventDoc;
    }
View Full Code Here

    private XmlObject buildManagementEvent(XmlObject event)
    {
        Situation situation = new SituationImpl(new CategoryImpl(MuwsConstants.SITUATION_OTHER));
        XmlBeansManagementEvent xme = new XmlBeansManagementEvent(situation);
        ManagementEventDocument mgmtEventDoc = (ManagementEventDocument) ((XmlObjectWrapper) xme).getXmlObject();
        ManagementEventType mgmtEvent = mgmtEventDoc.getManagementEvent();
        XmlBeanUtils.addChildElement(mgmtEvent, event);
        return mgmtEventDoc;
    }
View Full Code Here

                    mgmtEventElems.length );
            mgmtEventElem = mgmtEventElems[0];
            assertTrue( "The SOAP Body did not contain an unwrapped ManagementEvent.",
                    mgmtEventElem instanceof ManagementEventType );
        }
        ManagementEventType mgmtEvent = (ManagementEventType) mgmtEventElem;
        return mgmtEvent;
    }
View Full Code Here

    messageText=hackAddNameSpace(messageText);
    System.out.println("Message Ends.");
    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);
View Full Code Here

    private ManagementEventTypeImpl parseManagementEvent(NotificationMessageHolderType noteMess)
            throws XmlException
    {
    
        XmlAnyTypeImpl mess = (XmlAnyTypeImpl) noteMess.getMessage();
        ManagementEventTypeImpl manEvt =
                (ManagementEventTypeImpl) XmlBeanUtils.getChildElements(mess)[0];
        return manEvt;
    }
View Full Code Here

      if(arryStuff.length==0)
        return "Black";
      NotifyDocument.Notify ele = (NotifyDocument.Notify) arryStuff[0];
      NotificationMessageHolderType noteMess = ele.getNotificationMessageArray(0);
      XmlAnyTypeImpl mess = (XmlAnyTypeImpl)noteMess.getMessage();
      ManagementEventTypeImpl manEvt = (ManagementEventTypeImpl)XmlBeanUtils.getChildElements(mess)[0];
      //manEvt.get
      ResourcePropertyValueChangeNotificationTypeImpl propChngEvt = (ResourcePropertyValueChangeNotificationTypeImpl)XmlBeanUtils.getChildElements(manEvt)[0];
      NewValue newValue = propChngEvt.getNewValue();
//      XmlObject complience = (XmlObject)XmlBeanUtils.getChildElements(newValue)[0];
     
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.NameDocument

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.