Package org.apache.ws.addressing

Examples of org.apache.ws.addressing.EndpointReference


   {
      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
      {
         topicExprType =
            (TopicExpressionDocument) XmlObject.Factory.parse( "<wsnt:TopicExpression xmlns:wsnt=\"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd\" Dialect=\"http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple\">fs:MountPointDirectory</wsnt:TopicExpression>" );
View Full Code Here


         {
            UnitResource myResource = new UnitResource(  ); //this will create the resource IF it is has default constructor
            myResource.setID( RESOURCE_ID );
            m_resource = myResource;
            myResource.init(  );
            EndpointReference epr = getEndpointReference( RESOURCE_ID );
            myResource.setEndpointReference( epr ); //make sure to set the EPR on your new instance
            add( myResource );
         }
         catch ( Exception e )
         {
View Full Code Here

      rs.setResourceHome( this );
      String id = (String) rs.getID(  );

      //TODO !!!!! woher kommt publisher epr url ??? HACK for tcpmon 12345-8080
      String            subscriptionAddress = "http://localhost:12345/axis/services/SubscriptionManager";
      EndpointReference subscriptionEPR = getEndpointReference( id );
      rs.setEpr( subscriptionEPR );
      addSubscription( rs );
      return rs;
   }
View Full Code Here

      }

      EndpointReferenceType subscriptionEPR = null;

      boolean               useNotify        = request.isSetUseNotify(  ) ? request.getUseNotify(  ) : true; // NOTE: we must set the default value ourselves, as XMLBeans does NOT do this for us
      EndpointReference     producerEPR      = getResource(  ).getEndpointReference(  );
      SubscriptionHome      subscriptionHome = null;
      try
      {
         subscriptionHome = (SubscriptionHome) new InitialContext(  ).lookup( SubscriptionHome.HOME_LOCATION );
      }
View Full Code Here

               {
                  msg = wrapMessageWithNotify( msg );
               }

               Document          dom         = toDomDocument( msg );
               EndpointReference consumerEPR = m_subscription.getConsumerReference(  );
               SOAPMessage       soapMsg     =
                  buildSOAPMessage( dom,
                                    (EndpointReferenceType) ( (XmlObjectWrapper) consumerEPR ).getXmlObject(  ) );
               EMITTER_POOL.execute( EmitterTask.createEmitterTask( soapMsg,
                                                                    new URL( consumerEPR.getAddress(  ).toString(  ) ) ) );
            }
         }
      }
   }
View Full Code Here

   {
      NotifyDocument                notifyDoc      = NotifyDocument.Factory.newInstance(  );
      NotifyDocument.Notify         notify         = notifyDoc.addNewNotify(  );
      NotificationMessageHolderType notifMsgHolder = notify.addNewNotificationMessage(  );
      notifMsgHolder.setMessage( msg );
      EndpointReference         producerEPR       =
         m_subscription.getProducerResource(  ).getEndpointReference(  );
      XmlBeansEndpointReference xBeansProducerEPR = ( (XmlBeansEndpointReference) producerEPR );
      notifMsgHolder.setProducerReference( (EndpointReferenceType) xBeansProducerEPR.getXmlObject( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) );
      TopicExpressionType topicExpr =
         (TopicExpressionType) ( (XmlObjectWrapper) m_subscription.getTopicExpression(  ) ).getXmlObject(  );
View Full Code Here

         subscription.setSelector( selector );
         subscription.setPrecondition( precondition );
         subscription.setPolicy( policy );
         subscription.init(  ); // initialize resource properties
         String            id              = (String) subscription.getID(  );
         EndpointReference subscriptionEPR = getEndpointReference( id );

         //do this here (rather than in find() ) since we need the EPR to be returned on the subscribe request.
         subscription.setEndpointReference( subscriptionEPR );
         add( subscription );
         return subscription;
View Full Code Here

        ResourceProperty identityProperty = getIdentityProperty(resource);
        if (identityProperty != null)
        {
            CreationNotificationDocument creationNotifDoc = CreationNotificationDocument.Factory.newInstance();
            CreationNotificationDocument.CreationNotification creationNotif = creationNotifDoc.addNewCreationNotification();
            EndpointReference epr = resource.getEndpointReference();
            if (epr != null && epr instanceof XmlBeansEndpointReference)
            {
                XmlBeansEndpointReference xBeansEPR = (XmlBeansEndpointReference) epr;
                XmlObject xBean = xBeansEPR.getXmlObject(org.apache.ws.addressing.v2004_08_10.AddressingConstants.NSURI_ADDRESSING_SCHEMA);
                if (xBean instanceof EndpointReferenceType)
View Full Code Here

            //create as many clients as requested...
            try
            {
                WeatherClientConfigResource myresource = (WeatherClientConfigResource) createInstance(key); //this will create the resource IF it is has default constructor. It also calls init() on the resource.
                //the next line will create an EPR
                EndpointReference epr = getEndpointReference(resourceContext.getBaseURL() + "/" + getServiceName().getLocalPart(), key, SPEC_NAMESPACE_SET.getAddressingNamespace());
                myresource.setEndpointReference(epr); //make sure to set the EPR on your new instance
                add(key, myresource); //make sure to add your instance to the underlying cache to be found in future requests using find(..)
            }
            catch (Exception e)
            {
View Full Code Here

                try
                {
                    WeatherStationResource myresource = (WeatherStationResource) createInstance(key); //this will create the resource IF it is has default constructor. It also calls init() on the resource.
                    myresource.setName(name);
                    //the next line will create an EPR
                    EndpointReference epr = getEndpointReference(resourceContext.getBaseURL() + "/" + getServiceName().getLocalPart(), key, SPEC_NAMESPACE_SET.getAddressingNamespace());
                    myresource.setEndpointReference(epr); //make sure to set the EPR on your new instance
                    add(key, myresource); //make sure to add your instance to the underlying cache to be found in future requests using find(..)
                }
                catch (Exception e)
                {
View Full Code Here

TOP

Related Classes of org.apache.ws.addressing.EndpointReference

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.