Package org.xmlsoap.schemas.ws.x2003.x03.addressing

Examples of org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument$Factory


  /* (non-Javadoc)
   * @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


        CLIENT_CONFIG_EPR = InteropRequestUtils.getEndpointReference(new URL(WEATHER_STATION_CLIENT_CONFIG_EPR_URL));
    }

    public void testGetConfiguredWeatherStation()
    {
        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

    }

    public void testDemo() throws Exception
    {
        EndpointReferenceDocument weatherStationEprDoc = WEATHER_STATION_1_EPR_DOC;
        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();
View Full Code Here

        //todo assert we get both relationships
    }

    public void testSetWeatherStation() throws Exception
    {
        EndpointReferenceDocument weatherStationEprDoc = WEATHER_STATION_2_EPR_DOC;
        EndpointReferenceDocument clientConfigEpr = CLIENT_CONFIG_EPR;
        SetResourcePropertiesDocument setResourcePropertiesDocument = SetResourcePropertiesDocument.Factory.newInstance();
        SetResourcePropertiesDocument.SetResourceProperties setResourceProperties = setResourcePropertiesDocument.addNewSetResourceProperties();
        UpdateType update = UpdateType.Factory.newInstance();
        WeatherStationReferenceDocument weatherStationReferenceDocument = WeatherStationReferenceDocument.Factory.newInstance();
        weatherStationReferenceDocument.setWeatherStationReference(weatherStationEprDoc.getEndpointReference());
        XmlBeanUtils.addChildElement(update, weatherStationReferenceDocument);
        setResourceProperties.setUpdateArray(new UpdateType[]{update});
        XmlObject addResponse = InteropRequestUtils.sendRequest(setResourcePropertiesDocument, "http://wsdmdemo.org/service/weather-station-dir/SetResourceProperties", new XmlBeansEndpointReference(clientConfigEpr.getEndpointReference()));

    }
View Full Code Here

    }

    public void testAddWeatherStation()
    {
        EndpointReferenceDocument weatherStationEprDoc = WEATHER_STATION_2_EPR_DOC;
        //addweatherstation
        AddWeatherStationDocument addWeatherStationDocument = AddWeatherStationDocument.Factory.newInstance();
        org.wsdmdemo.service.weatherStationDir.AddWeatherStationDocument.AddWeatherStation addWeatherStation = addWeatherStationDocument.addNewAddWeatherStation();

        addWeatherStation.setEndpointReference(weatherStationEprDoc.getEndpointReference());
        XmlObject addResponse = InteropRequestUtils.sendRequest(addWeatherStationDocument, "http://wsdmdemo.org/service/weather-station-dir/AddWeatherStation", WEATHER_STATION_DIR_SERVICE_URL);
    }
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 )
      {
View Full Code Here

    private static EndpointReference createEpr(String filesystemUrl)
    {
        XmlBeansEndpointReference epr = null;
        try
        {
            EndpointReferenceDocument eprdoc = (EndpointReferenceDocument) XmlObject.Factory.parse(new URL(filesystemUrl));
            epr = new XmlBeansEndpointReference(eprdoc.getEndpointReference());
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

    private static EndpointReference createEpr(String filesystemUrl)
    {
        XmlBeansEndpointReference epr = null;
        try
        {
            EndpointReferenceDocument eprdoc = (EndpointReferenceDocument) XmlObject.Factory.parse(new URL(filesystemUrl));
            epr = new XmlBeansEndpointReference(eprdoc.getEndpointReference());
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

   {
      if ( m_dialect.equals( AddressingConstants.NSURI_ADDRESSING_SCHEMA ) )
      {
         if ( metadata instanceof EndpointReferenceDocument )
         {
            EndpointReferenceDocument metadataReferenceDoc = (EndpointReferenceDocument) metadata;
            metadata = createMetadataReferenceDocument( metadataReferenceDoc.getEndpointReference(  ) );
         }
         else
         {
            LOG.error( "Error resolving MetadataEntry - dialect was " + m_dialect + ", but document at location "
                       + m_location + " was not of type {" + m_dialect + "}EndpointReference" );
         }
      }
      else if ( m_dialect.equals( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) )
      {
         if ( metadata instanceof org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument )
         {
            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

    private static EndpointReference createEpr(String filesystemUrl)
    {
        XmlBeansEndpointReference epr = null;
        try
        {
            EndpointReferenceDocument eprdoc = (EndpointReferenceDocument) XmlObject.Factory.parse(new URL(filesystemUrl));
            epr = new XmlBeansEndpointReference(eprdoc.getEndpointReference());
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument$Factory

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.