Package axis.org.xmlsoap.schemas.ws._2003._03.addressing

Examples of axis.org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI


public class ActiveMQSubscriptionManager implements SubscriptionManager {

    private final ConcurrentHashMap subscriptions = new ConcurrentHashMap();

    public EndpointReferenceType register(ActiveMQSubscription subscription) {
        EndpointReferenceType reference = subscription.getConsumerReference();
        subscriptions.put(reference, subscription);
        return reference;
    }
View Full Code Here


    public void testSubscriptionPauseResume() throws Exception {

        Slot result = new Slot();
        ActiveMQNotificationBroker broker = createBroker(result);

        EndpointReferenceType subRef = addSubscription(broker);

        // The sub should be running and we should be getting notifed now.
        sendNotification(broker);

        List<NotificationMessageHolderType> subNotifyDoc = (List<NotificationMessageHolderType>) result.poll(2000);
View Full Code Here

    protected EndpointReferenceType addSubscription(ActiveMQNotificationBroker broker) throws Exception {
        // START SNIPPET: subscribe
        String topicName = TOPIC_NAME;
        TopicExpressionType topicExpression = new TopicExpressionType();
        topicExpression.getContent().add(topicName);
        EndpointReferenceType consumerReference = createReference();
        Boolean useNotify = Boolean.TRUE;
        QueryExpressionType precondition = null;
        QueryExpressionType selector = null;
        Object subscriptionPolicy = null;
        XMLGregorianCalendar terminationTime = null;
        EndpointReferenceType reference = broker.subscribe(consumerReference, topicExpression, useNotify, precondition,
                selector, subscriptionPolicy, terminationTime);
        // END SNIPPET: subscribe
        return reference;
    }
View Full Code Here

            assertNotNull("null: message[" + i + "]", message);
        }
    }

    protected EndpointReferenceType createReference() {
        return new EndpointReferenceType();
    }
View Full Code Here

            @WebParam(name = "SubscriptionPolicy", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            Object subscriptionPolicy,
            @WebParam(name = "InitialTerminationTime", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            XMLGregorianCalendar terminationTime) throws ResourceUnknownFault, SubscribeCreationFailedFault {
      EndpointReferenceType ref = new EndpointReferenceType();
      ServiceNameType sn = new ServiceNameType();
      sn.setPortName("myPort");
      ref.setServiceName(sn);
      return ref;
    }
View Full Code Here

    protected ServiceEndpoint findSubscriberEndpoint(ActiveMQSubscription subscribe) {
        EndpointReferenceType consumerReference = subscribe.getConsumerReference();
        if (consumerReference == null) {
            throw new NotificationException("No consumerReference specified for subscription: " + subscribe);
        }
        ServiceNameType serviceNameType = consumerReference.getServiceName();
        if (serviceNameType == null) {
            log.warn("No service name available for subscription: " + subscribe);
        }
        else {
            QName serviceName = serviceNameType.getValue();
            ServiceEndpoint[] endpoints = context.getEndpointsForService(serviceName);
            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
                return endpoints[0];
            }
View Full Code Here

    public void testCreateAndTerminateSequence() throws Exception {
        CreateSequenceType createArguments = new CreateSequenceType();

        EndpointReferenceType reference = new EndpointReferenceType();
        reference.setAddress(new AttributedURI());
        reference.getAddress().setValue("http://localhost/test/" + getClass().getName() + "/" + getName());
        createArguments.setAcksTo(reference);

        if (specifyExpires) {
            Expires expires = new Expires();
View Full Code Here

    */
   public void testBuildingNotificationMessages(  )
   throws Exception
   {
      EndpointReferenceType epr1 = EndpointReferenceType.Factory.newInstance(  );
      AttributedURI         uri = AttributedURI.Factory.newInstance(  );
      uri.setStringValue( "http://consumer" );
      epr1.setAddress( uri );
      EndpointReference       epr           = new XmlBeansEndpointReference( epr1 );
      TopicExpressionDocument topicExprType = null;
      try
      {
View Full Code Here


    private EndpointReferenceType build2003_03_EPR()
    {
        EndpointReferenceType endpointReferenceType = EndpointReferenceType.Factory.newInstance();
        AttributedURI attributedURI = endpointReferenceType.addNewAddress();
        attributedURI.setStringValue(m_address);

        if(m_portTypeQName != null)
        {
        AttributedQName attributedQName = endpointReferenceType.addNewPortType();
        attributedQName.setQNameValue(m_portTypeQName);
View Full Code Here

                                                            subscription.getSubscriptionId(  ) );

         if ( resource != null )
         {
            EndpointReference subscriptionEPR = resource.getEndpointReference(  );
            AttributedURI     address = returnEPR.addNewAddress(  );
            address.setStringValue( subscriptionEPR.getAddress(  ).toString(  ) );

            // Setup the port type
            AttributedQName portType = returnEPR.addNewPortType(  );
            portType.setQNameValue( QName.valueOf( subscriptionEPR.getPortType(  ).toString(  ) ) );
            ServiceNameType snt = returnEPR.addNewServiceName(  );
View Full Code Here

TOP

Related Classes of axis.org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI

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.