Package org.oasisOpen.docs.wsn.x2004.x06.wsnWSBrokeredNotification12Draft01

Examples of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBrokeredNotification12Draft01.RequiresRegistrationDocument$Factory


      }
   }

   private XmlBeansEndpointReference subscribe( boolean isWrapped )
   {
      SubscribeDocument           requestDoc = SubscribeDocument.Factory.newInstance(  );
      SubscribeDocument.Subscribe subscribe = requestDoc.addNewSubscribe(  );
      subscribe.setUseNotify( true );
      Calendar instance = Calendar.getInstance(  );
      instance.setTimeInMillis( instance.getTimeInMillis(  ) + 20000 );
      subscribe.setInitialTerminationTime( instance );
      org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumerRef =
View Full Code Here


        }
    }

    public EndpointReference subscribe( String consumerURL, QName topic ) throws FaultException
    {
        SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
        SubscribeDocument.Subscribe subscribe = requestDoc.addNewSubscribe();
        subscribe.setUseNotify(USE_WRAPPED_NOTIFICATIONS);
        Calendar instance = Calendar.getInstance();
        instance.setTimeInMillis(instance.getTimeInMillis() + 7200000);
        subscribe.setInitialTerminationTime( instance );
        org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumerRef = subscribe.addNewConsumerReference();
View Full Code Here

        }
    }

    private XmlBeansEndpointReference subscribe(boolean isWrapped)
    {
        SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
        SubscribeDocument.Subscribe subscribe = requestDoc.addNewSubscribe();
        subscribe.setUseNotify(true);
        Calendar instance = Calendar.getInstance();
        instance.setTimeInMillis(instance.getTimeInMillis() + 20000);
        subscribe.setInitialTerminationTime(instance);
        org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumerRef = subscribe.addNewConsumerReference();
View Full Code Here

    public org.apache.ws.addressing.EndpointReference getEPR() {
        return this.epr;
    }
   
    public org.apache.ws.pubsub.Subscription subscribe(NotificationConsumer notificationConsumer, SubscriptionEndConsumer subscriptionEndConsumer, TopicFilter tf, XPathFilter xf, Calendar initialTerminationTime, boolean UseNotify) {
       SubscribeDocument sdom = SubscribeDocument.Factory.newInstance();        
        SubscribeDocument.Subscribe s = sdom.addNewSubscribe();
        //subscription ends are send to:
        //TODO
       
        //notifications are send to:
        s.setConsumerReference((org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType)((XmlObjectWrapper)notificationConsumer.getEPR()).getXmlObject());
             
        //TODO check Calendar serializing
        s.setInitialTerminationTime(initialTerminationTime);
       
        //TODO multiple filters
        if(tf!=null){
            TopicExpressionType te = s.addNewTopicExpression();
            XmlCursor xc = te.newCursor();
            xc.toNextToken();
      xc.insertNamespace( "tns",tf.getNameSpace());
            te.newCursor().setTextValue((String)tf.getExpression());
            te.setDialect(tf.getURI().toString());
        }
       
        //create Subscription
        //add to local SubscriptionHome       
        org.apache.ws.notification.pubsub.Subscription ls = this.sH.create();        
        SubscribeResponseDocument.SubscribeResponse sresres=null;
        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) sdom.newDomNode());
            SOAPMessage subscribeResponse = sconn.call(soapm, epr.getAddress().toString());
            java.io.ByteArrayOutputStream os = new java.io.ByteArrayOutputStream();
            subscribeResponse.writeTo(os);
            EnvelopeDocument sres = EnvelopeDocument.Factory.parse(new java.io.ByteArrayInputStream(os.toByteArray()));
View Full Code Here

        }
    }

    public EndpointReference subscribe( String consumerURL, QName topic ) throws FaultException
    {
        SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
        SubscribeDocument.Subscribe subscribe = requestDoc.addNewSubscribe();
        subscribe.setUseNotify(USE_WRAPPED_NOTIFICATIONS);
        Calendar instance = Calendar.getInstance();
        instance.setTimeInMillis(instance.getTimeInMillis() + 20000);
        subscribe.setInitialTerminationTime( instance );
        org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumerRef = subscribe.addNewConsumerReference();
View Full Code Here

    }

    public static boolean invokeSubscribe(String consumerURL, String serviceEPRURL, String topicName)
    {
        QName topic = QName.valueOf(topicName);
        SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
        SubscribeDocument.Subscribe subscribe = requestDoc.addNewSubscribe();
        subscribe.setUseNotify(true);
        Calendar instance = Calendar.getInstance();
        instance.setTimeInMillis(instance.getTimeInMillis() + 2000000);
        subscribe.setInitialTerminationTime(instance);
        org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumerRef = subscribe.addNewConsumerReference();
View Full Code Here

    }

    public static boolean invokeSubscribe(String consumerURL, String serviceEPRURL, String topicName)
    {
        QName topic = QName.valueOf(topicName);
        SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
        SubscribeDocument.Subscribe subscribe = requestDoc.addNewSubscribe();
        subscribe.setUseNotify(true);
        Calendar instance = Calendar.getInstance();
        instance.setTimeInMillis(instance.getTimeInMillis() + 2000000);
        subscribe.setInitialTerminationTime(instance);
        org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumerRef = subscribe.addNewConsumerReference();
View Full Code Here

            sresres= sresdom.addNewSubscribeResponse();
            sresres.set(sres.getEnvelope().getBody());
          */

         //TODO handle faults
         SubscribeResponseDocument sresdom =
            SubscribeResponseDocument.Factory.parse( sres.getEnvelope(  ).getBody(  ).xmlText(  ) );
         sresres = sresdom.getSubscribeResponse(  );
      }
      catch ( Exception e )
      {
         e.printStackTrace(  );
      }
View Full Code Here

      for ( int i = 0; i < topics.length; i++ )
      {
         topics[i].addTopicListener( subscriptionTopicListener );
      }

      SubscribeResponseDocument                   subscribeResponseDoc =
         SubscribeResponseDocument.Factory.newInstance(  );
      SubscribeResponseDocument.SubscribeResponse subscribeResponse =
         subscribeResponseDoc.addNewSubscribeResponse(  );
      subscriptionEPR =
         (EndpointReferenceType) ( (XmlObjectWrapper) subscription.getEndpointReference(  ) ).getXmlObject(  );
      subscribeResponse.setSubscriptionReference( subscriptionEPR );
      return subscribeResponseDoc;
   }
View Full Code Here

            /*SubscribeResponseDocument sresdom = SubscribeResponseDocument.Factory.newInstance();
            sresres= sresdom.addNewSubscribeResponse();
            sresres.set(sres.getEnvelope().getBody());
             */
            //TODO handle faults
            SubscribeResponseDocument sresdom = SubscribeResponseDocument.Factory.parse(sres.getEnvelope().getBody().xmlText());
            sresres= sresdom.getSubscribeResponse();
        }catch(Exception e){
            e.printStackTrace();
        }   

        //set SubscritpionManager
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBrokeredNotification12Draft01.RequiresRegistrationDocument$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.