Package org.apache.axis.message.addressing

Examples of org.apache.axis.message.addressing.EndpointReference


            RegistrationManagerFactory.getManager(  ).find( SUBSCRIPTION_MANAGER_SERVICE,
                                                            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(  );
            snt.setQNameValue( QName.valueOf( subscriptionEPR.getServiceName(  ).toString(  ) ) );

            // Setup the resource properties.
            ReferencePropertiesType props      = returnEPR.addNewReferenceProperties(  );
            MessageElement[]        propsArray = subscriptionEPR.getProperties(  ).get_any(  );

            if ( propsArray != null )
            {
               for ( int i = 0; i < propsArray.length; i++ )
               {
View Full Code Here


   private void registerTestAsResource(  )
   throws MalformedURIException,
          RegistrationFailureException
   {
      m_isSingleton             = false;
      m_simulatedEndpointRef    = new EndpointReference( new URI( "http://unittest.apache.org/wsdm/unittest" ) );
      m_simulatedEndpointRef.setPortType( new AttributedQName( "", "UNIT_TEST_PORT" ) );
      ServiceNameType snt = new ServiceNameType( "UNIT_TEST_PORT", "UNIT_TEST_SERVICE" );
      snt.setPort( "UNIT_TEST_PORT" );
      m_simulatedEndpointRef.setServiceName( snt );
      m_simulatedId = "UNIT_TEST_RESOURCE_ID_1234";
View Full Code Here

    *
    * @return this resource's endpoint reference
    */
   private EndpointReference buildEndpointReference(  )
   {
      EndpointReference endpointRef = null;

      try
      {
         endpointRef = new EndpointReference( getEndpointURL(  ) );
      }
      catch ( URI.MalformedURIException murie )
      {
         throw new RuntimeException( murie );
      }

      endpointRef.setPortType( new PortType( getPortTypeQName(  ) ) );
      endpointRef.setServiceName( new ServiceNameType( getServiceQName(  ),
                                                       getPortName(  ) ) );

      // if this object is not a singleton, add the appropriate reference properties to the EPR
      if ( !isSingleton(  ) )
      {
         ReferencePropertiesType props     = new ReferencePropertiesType(  );
         MessageElement[]        propElems =
            new MessageElement[]
            {
               new MessageElement( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID,
                                   this.getId(  ) )
            };
         props.set_any( propElems );
         endpointRef.setProperties( props );
      }

      return endpointRef;
   }
View Full Code Here

   private void registerTestAsSingletonResource(  )
   throws MalformedURIException,
          RegistrationFailureException
   {
      m_isSingleton             = true;
      m_simulatedEndpointRef    = new EndpointReference( new URI( "http://unittest.apache.org/wsdm/unittest" ) );
      m_simulatedEndpointRef.setPortType( new AttributedQName( "", "UNIT_TEST_PORT" ) );
      ServiceNameType snt = new ServiceNameType( "UNIT_TEST_PORT", "UNIT_TEST_SERVICE" );
      snt.setPort( "UNIT_TEST_PORT" );
      m_simulatedEndpointRef.setServiceName( snt );
      m_simulatedId = null;
View Full Code Here

                                                                              AddressingConstants.NSURI_WS_ADDRESSING_2003_03 ) );
      actionElem.addTextNode( "wsrp:GetResourceProperty" );
      SOAPHeaderElement resourceIdElem =
         soapHeader.addHeaderElement( NameUtils.toName( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID ) );
      resourceIdElem.addTextNode( resourceId );
      EndpointReference endpointRef = new EndpointReference( to.toString(  ) );
      MessageElement[]  wsaHeaders =
         new MessageElement[]
         {
            (org.apache.axis.message.SOAPHeaderElement) toElem,
            (org.apache.axis.message.SOAPHeaderElement) actionElem,
            (org.apache.axis.message.SOAPHeaderElement) resourceIdElem
         };
      ReferencePropertiesType refProps = endpointRef.getProperties(  );
      refProps.set_any( wsaHeaders );
      return endpointRef;
   }
View Full Code Here

    */
   public EndpointReference getEndpointReference(  )
   {
      try
      {
         EndpointReference endpointRef =
            new EndpointReference( new Address( "http://xyz.com/notificationConsumer/" ) );
         endpointRef.setPortType( new PortType( new javax.xml.namespace.QName( "http://xyz.com/",
                                                                               "NotificationConsumer" ) ) );
         endpointRef.setServiceName( new ServiceNameType( new javax.xml.namespace.QName( "http://xyz.com/",
                                                                                         "NotificationConsuerService" ),
                                                          "consumer" ) );
         org.apache.axis.message.addressing.ReferencePropertiesType props =
            new org.apache.axis.message.addressing.ReferencePropertiesType(  );

         MessageElement[]                                           prop =
            new MessageElement[]
            {
               new MessageElement( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID,
                                   this.getId(  ) )
            };
         props.set_any( prop );
         endpointRef.setProperties( props );

         return endpointRef;
      }
      catch ( MalformedURIException e )
      {
View Full Code Here

      /** */
      public EndpointReference getEndpointReference(  )
      {
         try
         {
            EndpointReference epr = new EndpointReference( "http://localhost/wsdm/services/" + m_id );
            epr.setServiceName( new ServiceNameType( "urn:test", "" + m_id ) );
            epr.getServiceName(  ).setPort( "" + m_id + "_PORT" );

            return epr;
         }
         catch ( MalformedURIException e )
         {
View Full Code Here

   * SEt the from EPR
   * @param endpoint
   * @throws MalformedURIException
   */
  public void setFrom(String endpoint) throws MalformedURIException {
    this.headers.setFrom(new EndpointReference(endpoint));
  }
View Full Code Here

   * Set the from EPR
   * @param endpoint
   * @throws MalformedURIException
   */
  public void setFaultTo(String endpoint) throws MalformedURIException {
    this.headers.setFaultTo(new EndpointReference(endpoint));
  }
View Full Code Here

   * SEt the from EPR
   * @param endpoint
   * @throws MalformedURIException
   */
  public void setFrom(String endpoint) throws MalformedURIException {
    this.headers.setFrom(new EndpointReference(endpoint));
  }
View Full Code Here

TOP

Related Classes of org.apache.axis.message.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.