Package org.apache.ws.addressing

Examples of org.apache.ws.addressing.XmlBeansEndpointReference


    // TODO Auto-generated method stub
    return m_activeWeatherStation;
  }

  private EndpointReference getEpr(String URL, String Rid) throws XmlException{
    XmlBeansEndpointReference x=new XmlBeansEndpointReference(URL,AddressingConstants.NSURI_ADDRESSING_SCHEMA);
    if(Rid!=null)
      x.setReferenceProperties(new XmlObject[]{(XmlObject)XmlObject.Factory.parse("<svr:ResourceIdentifier xmlns:svr=\"http://wsdmdemo.org/service/weather-client-config\">"+Rid+"</svr:ResourceIdentifier>")});   
    return x;   
  }
View Full Code Here


     * @return Source EPR
     */
    private EndpointReferenceType parseSourceEpr(NotificationMessageHolderType noteMess)
    {
        
        return (EndpointReferenceType) new XmlBeansEndpointReference(noteMess.getProducerReference()).getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
       
    }
View Full Code Here

    m_listener.stop();
   
  }

  private EndpointReference getEpr(String URL, String Rid) throws XmlException{
    XmlBeansEndpointReference x=new XmlBeansEndpointReference(URL,AddressingConstants.NSURI_ADDRESSING_SCHEMA);
    if(Rid!=null)
      x.setReferenceProperties(new XmlObject[]{(XmlObject)XmlObject.Factory.parse("<svr:ResourceIdentifier xmlns:svr=\"http://wsdmdemo.org/service/weather-client-config\">"+Rid+"</svr:ResourceIdentifier>")});   
    return x;   
  }
View Full Code Here

  protected void setUp() throws Exception {
    super.setUp();
        weatherStationEprDoc = getEndpointReference( new URL( WEATHER_STATION_CONF_EPR_URL ) );
    //if ( DEBUG ) { System.out.println( "*** Using Weather Station EPR:\n" + weatherStationEprDoc ); }
        //m_service = new ServiceStub( new URL( WEATHER_STATION_CONFIG_URL ) );
        m_resource = new ResourceStub( new XmlBeansEndpointReference( weatherStationEprDoc.getEndpointReference() ) );
  }
View Full Code Here

            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

        RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();
        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

   * @see org.apache.interop.common.EprProvider#getEpr()
   */
  public EndpointReference getEpr(String endpointName) throws XmlException, IOException {
    URL eprURL = new URL(jTextFieldUrl.getText()+"/"+endpointName);
    EndpointReferenceDocument eprDoc=getEndpointReference(eprURL);
    XmlBeansEndpointReference epr=new XmlBeansEndpointReference(eprDoc.getEndpointReference());
    return epr;
  }
View Full Code Here

        EndpointReferenceDocument clientConfigEpr = CLIENT_CONFIG_EPR;

        //retrieve the epr for weather station 1 from wc
        GetResourcePropertyDocument getResourcePropertyDocument = GetResourcePropertyDocument.Factory.newInstance();
        getResourcePropertyDocument.setGetResourceProperty(WeatherClientConfigPropertyQNames.WEATHERSTATIONREFERENCE);
        XmlObject getResp = InteropRequestUtils.sendRequest(getResourcePropertyDocument, "http://wsdmdemo.org/service/weather-station-dir/GetResourceProperties", new XmlBeansEndpointReference(clientConfigEpr.getEndpointReference()));

    }
View Full Code Here

        EndpointReferenceDocument clientConfigEpr = CLIENT_CONFIG_EPR;

        //retrieve the epr for weather station 1 from wc
        GetResourcePropertyDocument getResourcePropertyDocument = GetResourcePropertyDocument.Factory.newInstance();
        getResourcePropertyDocument.setGetResourceProperty(WeatherClientConfigPropertyQNames.WEATHERSTATIONREFERENCE);
        XmlObject getResp = InteropRequestUtils.sendRequest(getResourcePropertyDocument, "http://wsdmdemo.org/service/weather-station-dir/GetResourceProperties", new XmlBeansEndpointReference(clientConfigEpr.getEndpointReference()));

        //assertTrue(getResp instanceof )
        //todo check its ws1

        getResourcePropertyDocument = GetResourcePropertyDocument.Factory.newInstance();
        getResourcePropertyDocument.setGetResourceProperty(WeatherStationPropertyQNames.TEMPERATURE);
        getResp = InteropRequestUtils.sendRequest(getResourcePropertyDocument, "http://wsdmdemo.org/service/weather-station-dir/GetResourceProperties", new XmlBeansEndpointReference(weatherStationEprDoc.getEndpointReference()));
        //todo assert

        /* //retrieve the metrics
         GetMultipleResourcePropertiesDocument getMultipleResourcePropertiesDocument = GetMultipleResourcePropertiesDocument.Factory.newInstance();
         GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties getMultipleResourceProperties = getMultipleResourcePropertiesDocument.addNewGetMultipleResourceProperties();
         QName[] metrics = {WeatherStationPropertyQNames.HUMIDITY, WeatherStationPropertyQNames.TEMPERATURE, WeatherStationPropertyQNames.VISIBILITY};
         getMultipleResourceProperties.setResourcePropertyArray(metrics);
         XmlObject getMultResp = InteropRequestUtils.sendRequest(getMultipleResourcePropertiesDocument,"http://wsdmdemo.org/service/weather-station-dir/GetMultipleResourceProperties",new XmlBeansEndpointReference(weatherStationEprDoc.addNewEndpointReference()));

         //pull again should be different
         XmlObject getMultResp2 = InteropRequestUtils.sendRequest(getMultipleResourcePropertiesDocument,"http://wsdmdemo.org/service/weather-station-dir/GetMultipleResourceProperties",new XmlBeansEndpointReference(weatherStationEprDoc.addNewEndpointReference()));
         */

        testgetRelationships();

        //check the OpStatus prop is PartiallyAvail .....also need to check notif
        getResourcePropertyDocument = GetResourcePropertyDocument.Factory.newInstance();
        getResourcePropertyDocument.setGetResourceProperty(WeatherStationPropertyQNames.OPERATIONALSTATUS);
        getResp = InteropRequestUtils.sendRequest(getResourcePropertyDocument, "http://wsdmdemo.org/service/weather-station-dir/GetResourceProperties", new XmlBeansEndpointReference(weatherStationEprDoc.getEndpointReference()));
        //todo check avail

        //recalibrate ws1
        RecalibrateDocument recalibrateDocument = RecalibrateDocument.Factory.newInstance();
        org.wsdmdemo.service.weatherStation.RecalibrateDocument.Recalibrate recalibrate = recalibrateDocument.addNewRecalibrate();
        XmlObject recalibResponse = InteropRequestUtils.sendRequest(recalibrateDocument, "http://wsdmdemo.org/service/weather-station-dir/Recalibrate", new XmlBeansEndpointReference(weatherStationEprDoc.getEndpointReference()));
        //todo assert not fault

        //check the OpStatus prop is PartiallyAvail .....also need to check notif
        getResourcePropertyDocument = GetResourcePropertyDocument.Factory.newInstance();
        getResourcePropertyDocument.setGetResourceProperty(WeatherStationPropertyQNames.OPERATIONALSTATUS);
        getResp = InteropRequestUtils.sendRequest(getResourcePropertyDocument, "http://wsdmdemo.org/service/weather-station-dir/GetResourceProperties", new XmlBeansEndpointReference(weatherStationEprDoc.getEndpointReference()));
        //todo check unavail


        //todo test notifs....???are there notifs anymore??
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.addressing.XmlBeansEndpointReference

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.