Package org.xmlsoap.schemas.ws.x2004.x09.policy

Examples of org.xmlsoap.schemas.ws.x2004.x09.policy.Policy


   {
      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


            RelationshipParticipantType relationshipParticipantType = relationshipType.addNewParticipant();
            relationshipParticipantType.setResourceId("urn:" + InteropConstants.WEATHERSTATION_KEY1);
            relationshipParticipantType.setRole("urn://parent");//uri
            EndpointReferenceType manageabilityEndpointReferenceType = relationshipParticipantType.addNewManageabilityEndpointReference();
            manageabilityEndpointReferenceType.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
            ReferencePropertiesType referencePropertiesType = manageabilityEndpointReferenceType.addNewReferenceProperties();
            XmlObject key1 = XmlBeanUtils.addChildElement(referencePropertiesType, qName);
            XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY1);

            RelationshipParticipantType relationshipParticipantType2 = relationshipType.addNewParticipant();
            relationshipParticipantType2.setResourceId("urn:" + InteropConstants.WEATHERSTATION_KEY2);//spec optional
            relationshipParticipantType2.setRole("urn://child1");//uri
            EndpointReferenceType manageabilityEndpointReferenceType2 = relationshipParticipantType.addNewManageabilityEndpointReference();
            manageabilityEndpointReferenceType2.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
            ReferencePropertiesType referencePropertiesType2 = manageabilityEndpointReferenceType2.addNewReferenceProperties();
            XmlObject key2 = XmlBeanUtils.addChildElement(referencePropertiesType2, qName);
            XmlBeanUtils.setValue(key2, InteropConstants.WEATHERSTATION_KEY2);

            resourceProperty.add(relationshipDocument);
View Full Code Here

   * @throws FaultException
   *
   */
  public void updateWsEpr() throws FaultException {
    XmlObject[] refreshDocArry = m_ResourceConfig.getResourceProperty(weatherStationReferenceQname);
    EndpointReferenceTypeImpl refreshDoc = (EndpointReferenceTypeImpl)refreshDocArry[0];
   
    if(m_ws!=null){
      m_ws.deleteObserver(m_messageObserver);     
    }
    m_ws = new ResourceStub(new XmlBeansEndpointReference(refreshDoc));
View Full Code Here

      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(  );
View Full Code Here

      //subscription ends are send to:
      s.setEndTo( eepr );

      //TODO check Calendar serializing
      ExpirationType expires = ExpirationType.Factory.newInstance(  );
      expires.setObjectValue( initialTerminationTime );
      s.setExpires( expires );

      //TODO multiple filters
      //XPathFilter
      if ( xf != null )
View Full Code Here

      //TODO multiple filters
      //XPathFilter
      if ( xf != null )
      {
         FilterType   filter = s.addNewFilter(  );
         java.net.URI uri = xf.getURI(  );
         if ( uri != null )
         {
            filter.setDialect( uri.toString(  ) );
         }

         filter.newCursor(  ).setTextValue( (String) xf.getExpression(  ) );
      }

      SubscribeResponseDocument.SubscribeResponse sresres = null;
      try
      {
View Full Code Here

   throws RemoteException
   {
      Subscription subscription = (Subscription) getResource(  );

      //build response
      GetStatusResponseDocument                   responseDom = GetStatusResponseDocument.Factory.newInstance(  );
      GetStatusResponseDocument.GetStatusResponse response = responseDom.addNewGetStatusResponse(  );

      //TODO check calendar
      response.setExpires( subscription.getTerminationTime(  ) );
      return ( responseDom );
   }
View Full Code Here

      }

      //send SubscriptionEnd Notification
      SubscriptionEndDocument                 sedom   = SubscriptionEndDocument.Factory.newInstance(  );
      SubscriptionEndDocument.SubscriptionEnd se      = sedom.addNewSubscriptionEnd(  );
      LanguageSpecificStringType              reasont = se.addNewReason(  );
      reasont.setStringValue( reason );
      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
View Full Code Here

    * @param terminationTime DOCUMENT_ME
    */
   public void setTerminationTime( java.util.Calendar terminationTime )
   {
      //TODO call SubscriptionManager
      RenewDocument       rdom = RenewDocument.Factory.newInstance(  );
      RenewDocument.Renew r = rdom.addNewRenew(  );
      r.setExpires( terminationTime );
      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
         SOAPMessage       soapm = mf.createMessage(  );

         //put XMLbean into SOAPBody
         soapm.getSOAPBody(  ).addDocument( (org.w3c.dom.Document) rdom.newDomNode(  ) );

         sconn.call( soapm,
                     getEndpointReference(  ) );
      }
      catch ( Exception e )
View Full Code Here

      Subscription subscription = (Subscription) getResource(  );

      //TODO why no ExpirationType
      org.apache.xmlbeans.XmlCalendar et = (org.apache.xmlbeans.XmlCalendar) body.getRenew(  ).getExpires(  );
      subscription.setTerminationTime( et );
      RenewResponseDocument               responseDom = RenewResponseDocument.Factory.newInstance(  );
      RenewResponseDocument.RenewResponse response = responseDom.addNewRenewResponse(  );

      //TODO response with new expirationType
      response.setExpires( subscription.getTerminationTime(  ) );

      return ( responseDom );
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws.x2004.x09.policy.Policy

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.