Package com.acme.purchaseOrder.x2005.x08

Examples of com.acme.purchaseOrder.x2005.x08.PurchaseOrderType


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

      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

TOP

Related Classes of com.acme.purchaseOrder.x2005.x08.PurchaseOrderType

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.