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

Examples of org.xmlsoap.schemas.ws.x2004.x08.addressing.ReplyToDocument


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

      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

        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

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

    */
   public EndpointReferenceType getEprForResource( ResourceKey key,
                                                   String      serviceUrl )
   {
      EndpointReferenceDocument eprDoc  = EndpointReferenceDocument.Factory.newInstance(  );
      EndpointReferenceType     epr     = eprDoc.addNewEndpointReference(  );
      AttributedURI             address = epr.addNewAddress(  );
      address.setStringValue( serviceUrl + "/" +SERVICE_NAME );
      ReferencePropertiesType refProps = epr.addNewReferenceProperties(  );

      XmlObject               xmlObject = XmlBeanUtils.addChildElement( refProps,
                                                                        key.getName(  ) );
      XmlBeanUtils.setValue( xmlObject,
                             key.getValue(  ).toString(  ) );
View Full Code Here

                                     PrinterPortResource  printerResource )
   {
      ++m_jobId;
       int jobId = (int)m_jobId;
       SimpleTypeResourceKey key = createResourceKey(jobId);
       EndpointReferenceType jobEpr = getEprForResource( key,
                                                        resourceContext.getBaseURL(  ) );
      JobPortResource       job    = new JobPortResource( jobEpr, jobId, jobName, origUserName, printerResource );
      job.init(  );
      add( key, job );     
      return job;
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws.x2004.x08.addressing.ReplyToDocument

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.