Package org.talend.esb.sam._2011._03.common

Examples of org.talend.esb.sam._2011._03.common.OriginatorType


      // The example Service, DiskWsdmServiceWSResource is written so as to emit this notification
      // every 5 seconds.
      QName                 badSectorQName = new QName( "http://com.xyz", "BadSector" );
      SubscribeResponse    sub_response =
         subscribe( badSectorQName, "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );
      EndpointReferenceType subRef = sub_response.getSubscriptionReference(  );

      assertNotNull( subRef );

      //test as a listener for events
      PortListen notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, LISTENER_TIMEOUT );
View Full Code Here


   {
      // Subscribe to a MUWS ResourceState property change
      SubscribeResponse sub_response =
         subscribe( Muws05Constants.RESOURCE_PROP_QNAME_RESOURCE_STATE,
                    this.getAxisBaseUrl(  ).toString(  ) );
      EndpointReferenceType rsSubRef = sub_response.getSubscriptionReference(  );

      //    Subscribe to a BlockSize property change
      //setup listener url for consumer endpoint url
      sub_response =
         subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );
      EndpointReferenceType bsSubRef = sub_response.getSubscriptionReference(  );
      assertNotNull( rsSubRef );
      assertNotNull( bsSubRef );

      // The two subscription references should be equal except for the ResourceID property
      assertTrue( rsSubRef.getAddress(  ).toString(  ).compareTo( bsSubRef.getAddress(  ).toString(  ) ) == 0 );
      assertTrue( rsSubRef.getPortType(  ).toString(  ).compareTo( bsSubRef.getPortType(  ).toString(  ) ) == 0 );

      //test as a listener for events
      PortListen notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, LISTENER_TIMEOUT );
      assertTrue( AxisGenTypesUtils.getResourceId( rsSubRef ).compareTo( AxisGenTypesUtils.getResourceId( bsSubRef ) ) != 0 );
View Full Code Here

      SubscribeResponse sub_response =
         subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );

      EndpointReferenceType              subscriptionReference = sub_response.getSubscriptionReference(  );

      SubscriptionManagerHttpBindingStub subMgrBinding = getSubMgrBinding(  );
      assertNotNull( subMgrBinding );

      subMgrBinding.setResourceId( AxisGenTypesUtils.getResourceId( subscriptionReference ) );
View Full Code Here

      testDiskPortSetResourcePropertiesUpdate(  );
      String incomingMessage = notificationListener.waitForIncomingMessage(  );
      assertFalse( incomingMessage.startsWith( "ERROR" ) );

      EndpointReferenceType              subscriptionReference = sub_response.getSubscriptionReference(  );
      SubscriptionManagerHttpBindingStub subMgrBinding = getSubMgrBinding(  );
      assertNotNull( subMgrBinding );

      subMgrBinding.setResourceId( AxisGenTypesUtils.getResourceId( subscriptionReference ) );
View Full Code Here

      while ( i.hasNext(  ) )
      {
         QName                 q            = (QName) i.next(  );
         SubscribeResponse    sub_response = subscribe( q,
                                                         this.getAxisBaseUrl(  ).toString(  ) );
         EndpointReferenceType rsSubRef = sub_response.getSubscriptionReference(  );
         assertNotNull( rsSubRef );
      }
   }
View Full Code Here

      while ( i.hasNext(  ) )
      {
         QName                 q            = (QName) i.next(  );
         SubscribeResponse    sub_response = subscribe( q,
                                                         this.getAxisBaseUrl(  ).toString(  ) );
         EndpointReferenceType rsSubRef = sub_response.getSubscriptionReference(  );
         assertNotNull( rsSubRef );
      }
   }
View Full Code Here

   {
      //    Subscribe to a BlockSize property change
      SubscribeResponse sub_response =
         subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    this.getAxisBaseUrl(  ).toString(  ) );
      EndpointReferenceType bsSubRef = sub_response.getSubscriptionReference(  );
      assertNotNull( bsSubRef );
   }
View Full Code Here

      Subscribe request = new Subscribe(  );
      // Create an endpoint reference for the NotificationConsumer
      // Note that since we are using PortListener to handle notifications,
      // rather than a Web Service that implements NotificationConsumer this
      // EPR is somewhat bogus.
      EndpointReferenceType epr = new EndpointReferenceType(  );
      epr.setAddress( new AttributedURI( callback_url ) );
      epr.setPortType( new AttributedQName( "nothing" ) );
      ServiceNameType snt = new ServiceNameType(  );
      snt.setPortName( new NCName( "NotificationConsumer" ) );
      snt.set_value( new QName( "TestNotifConsumer" ) );
      epr.setServiceName( snt );

      // Set a couple of reference properties, including a ResourceID.
      MessageElement[] prop = new MessageElement[2];
      MessageElement   propsResourceID =
         new SOAPBodyElement( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID, "4444" );
      prop[0] = propsResourceID;
      MessageElement otherProp = new SOAPBodyElement( new QName( "http://com.xyz/props", "myprop" ),
                                                      "foo" );
      prop[1] = otherProp;
      ReferencePropertiesType props = new ReferencePropertiesType(  );
      props.set_any( prop );
      epr.setReferenceProperties( props );
      request.setConsumerReference( epr );

      // Build the TopicExpressionType for the request.
      TopicExpressionType tet = new TopicExpressionType(  );
View Full Code Here

    * @param base_fault
    * @return Axis-generated EndpointReference.
    */
   private static EndpointReferenceType toAxisEndpointReference( BaseFaultException base_fault )
   {
      EndpointReferenceType                                    axis_endpoint = new EndpointReferenceType(  );
      org.apache.axis.message.addressing.EndpointReferenceType base_endpoint = base_fault.getOriginator(  );

      if ( base_endpoint != null )
      {
         axis_endpoint.setAddress( new AttributedURI( base_endpoint.getAddress(  ).toString(  ) ) );
         axis_endpoint.setPortType( new AttributedQName( base_endpoint.getPortType(  ) ) );
         ReferencePropertiesType                                    axis_ref_props =
            new ReferencePropertiesType(  );
         org.apache.axis.message.addressing.ReferencePropertiesType base_ref_props =
            base_endpoint.getProperties(  );
         axis_ref_props.set_any( base_ref_props.get_any(  ) );
         axis_endpoint.setReferenceProperties( axis_ref_props );
         ServiceNameType                                    axis_service_name = new ServiceNameType(  );
         org.apache.axis.message.addressing.ServiceNameType base_service_name = base_endpoint.getServiceName(  );
         axis_service_name.setPortName( new NCName( base_service_name.getPort(  ) ) );
         axis_service_name.set_value( base_service_name );
         axis_endpoint.setServiceName( axis_service_name );
      }

      return axis_endpoint;
   }
View Full Code Here

   throws URI.MalformedURIException
   {
      boolean               isNotify    = true;
      Calendar              termination = Calendar.getInstance(  );

      EndpointReferenceType axis_endpoint = new EndpointReferenceType(  );
      String                end_address   = "http://foo";
      axis_endpoint.setAddress( new AttributedURI( end_address ) );
      QName portType = new QName( end_address, "myporttype" );
      axis_endpoint.setPortType( new AttributedQName( portType ) );
      String service_name = "myfoo";
      axis_endpoint.setServiceName( new ServiceNameType( service_name ) );
      ReferencePropertiesType ref_prop = new ReferencePropertiesType(  );

      //ref_prop.set_any();
      axis_endpoint.setReferenceProperties( ref_prop );

      //axis_endpoint.set_any();
      Subscribe subscribe = new Subscribe(  );
      subscribe.setConsumerReference( axis_endpoint );
      subscribe.setInitialTerminationTime( termination );
View Full Code Here

TOP

Related Classes of org.talend.esb.sam._2011._03.common.OriginatorType

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.