Package org.xmlsoap.schemas.ws._2004._08.addressing

Examples of org.xmlsoap.schemas.ws._2004._08.addressing.EndpointReferenceType


    public void testRawNotify() throws Exception {
        ReceiverComponent receiver = new ReceiverComponent();
        jbi.activateComponent(receiver, "receiver");

        // START SNIPPET: notify
        EndpointReferenceType consumer = createEPR(ReceiverComponent.SERVICE, ReceiverComponent.ENDPOINT);
        wsnBroker.subscribe(consumer, "myTopic", null, true);

        Element body = parse("<hello>world</hello>");
        wsnBroker.notify("myTopic", body);
        // END SNIPPET: notify
View Full Code Here


        Document doc = builder.parse(is);
        return doc.getDocumentElement();
    }

    protected EndpointReferenceType createEPR(QName service, String endpoint) {
        EndpointReferenceType epr = new EndpointReferenceType();
        epr.setAddress(new AttributedURIType());
        epr.getAddress().setValue(service.getNamespaceURI() + "/" + service.getLocalPart() + "/" + endpoint);
        return epr;
    }
View Full Code Here

      handleNotify(notify);
    }
   
  protected void handleNotify(Notify notify) {
    for (NotificationMessageHolderType messageHolder : notify.getNotificationMessage()) {
            EndpointReferenceType producerReference = messageHolder.getProducerReference();
            AbstractPublisher publisher = getPublisher(producerReference);
            if (publisher != null) {
              publisher.notify(messageHolder);
            }
    }
View Full Code Here

  }
 
  protected abstract String createAddress();

    public static EndpointReferenceType createEndpointReference(String address) {
        EndpointReferenceType epr = new EndpointReferenceType();
        AttributedURIType addressUri = new AttributedURIType();
        addressUri.setValue(address);
        epr.setAddress(addressUri);
        return epr;
    }
View Full Code Here

    public void testNotify() throws Exception {
        ReceiverComponent receiver = new ReceiverComponent();
        jbi.activateComponent(receiver, "receiver");

        EndpointReferenceType consumer = createEPR(ReceiverComponent.SERVICE, ReceiverComponent.ENDPOINT);
        wsnBroker.subscribe(consumer, "myTopic", null);

        wsnBroker.notify("myTopic", parse("<hello>world</hello>"));
        // Wait for notification
        Thread.sleep(150);
View Full Code Here

    public void testRawNotify() throws Exception {
        ReceiverComponent receiver = new ReceiverComponent();
        jbi.activateComponent(receiver, "receiver");

        // START SNIPPET: notify
        EndpointReferenceType consumer = createEPR(ReceiverComponent.SERVICE, ReceiverComponent.ENDPOINT);
        wsnBroker.subscribe(consumer, "myTopic", null, true);

        Element body = parse("<hello>world</hello>");
        wsnBroker.notify("myTopic", body);
        // END SNIPPET: notify
View Full Code Here

        Document doc = builder.parse(is);
        return doc.getDocumentElement();
    }

    protected EndpointReferenceType createEPR(QName service, String endpoint) {
        EndpointReferenceType epr = new EndpointReferenceType();
        epr.setAddress(new AttributedURIType());
        epr.getAddress().setValue(service.getNamespaceURI() + "/" + service.getLocalPart() + "/" + endpoint);
        return epr;
    }
View Full Code Here

    this.resolver = resolveWSA(endpoint);
    this.client = client;
  }

  public static EndpointReferenceType createWSA(String address) {
    EndpointReferenceType epr = new EndpointReferenceType();
    AttributedURIType attUri = new AttributedURIType();
    attUri.setValue(address);
    epr.setAddress(attUri);
    return epr;
  }
View Full Code Here

            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
                return endpoints[0];
            }
        }
        AttributedQName portTypeType = consumerReference.getPortType();
        if (portTypeType != null) {
            QName portType = portTypeType.getValue();
            ServiceEndpoint[] endpoints = context.getEndpoints(portType);
            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
                return endpoints[0];
            }
View Full Code Here

            QueryExpressionType selector,
            @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

TOP

Related Classes of org.xmlsoap.schemas.ws._2004._08.addressing.EndpointReferenceType

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.