com.ibm.websphere.wsaddressing

Class EndpointReferenceManager

  • java.lang.Object
    • com.ibm.websphere.wsaddressing.EndpointReferenceManager


  • public abstract class EndpointReferenceManager
    extends java.lang.Object

    This abstract class is used to create EndpointReferences.

    It may also be used by the target Web services to acquire the WS-Addressing reference parameters associated with an incoming message.

    • Constructor Detail

      • EndpointReferenceManager

        public EndpointReferenceManager()
    • Method Detail

      • createEndpointReference

        public static EndpointReference createEndpointReference(javax.xml.namespace.QName serviceName,
                                                java.lang.String endpointName)
                                                         throws EndpointReferenceCreationException

        This method creates an WS-Addressing EndpointReference based on an WSDL service name and endpoint (WSDL 1.1 port name).

        In order for this method to generate the URI correctly, the local part of the WSDL service name passed as a parameter must be the same as the webservice-description-name in the webservice deployment descriptor webservices.xml. (If the webservices.xml file is generated by tools they will be the same.)

        The [metadata] of the created EndpointReference will be based on the endpoint information passed on input to this method.

        Where the deployment allows, requests targeted at endpoint references generated by this method will be workload managed. Session and context affinity constraints will be honored within the workload managed environment.

        Parameters:
        serviceName - The QName representing the service that the newly created EPR will represent
        endpointName - The String representing the endpoint in the service that the newly created EPR will represent. In WSDL 1.1, this equates to the port name.
        Returns:
        EndpointReference The created com.ibm.websphere.EndpointReference corresponding to the endpoint identified by the input parameters.
        Throws:
        EndpointReferenceCreationException - thrown if there was a problem creating the EndpointReference. For example, if it is not possible to establish a unique URI for this endpoint, this exception will be thrown.
      • createEndpointReference

        public static EndpointReference createEndpointReference(javax.xml.namespace.QName serviceName,
                                                java.lang.String endpointName,
                                                java.rmi.Remote statefulSessionBean)
                                                         throws EndpointReferenceCreationException

        This method creates a WS-Addressing EndpointReference which is not workload managed by Websphere Application Server clients or proxies. In addition, it may be used to create an EndpointReference which represents a non-workload managed stateful session bean that may be failed over (i.e. a highly available stateful session bean).

        This method should be used to create an EndpointReference in preference to the createEndpointReference(QName serviceName, String endpointName) method, if:

        1. The application may be deployed in a cluster (workload managed environment), and
        2. The endpoint represented by the created EPR maintains state in-memory (and therefore should not be workload managed).

        The newly created EndpointReference is based on an WSDL service name, endpoint (WSDL 1.1 port name) and, optionally, a stateful session bean (that implements the endpoint).

        If the endpoint represented by the EndpointReference is not a stateful session bean, the additional parameter in this method should be set to null. This will ensure that, when the EndpointReference is used as the target for a request, affinity is maintained with the node on which the endpoint has been created (i.e. that the EndpointReference will not be workload managed). On zOS, affinity will not be maintained to the servant region on which the endpoint is created.

        If the endpoint represented by the EndpointReference is a stateful session bean, the stateful session bean should be passed as the additional parameter to this method. This method ensures that, when the EndpointReference is used as the target for a request, affinity is maintained with the stateful session bean. If high availability for stateful session beans is enabled, the EndpointReference returned from this method will remain valid even if the stateful session bean is failed over.

        In order for this method to generate the URI correctly, the local part of the WSDL service name passed as a parameter must be the same as the webservice-description-name in the webservice deployment descriptor webservices.xml. (If the webservices.xml file is generated by tools they will be the same.)

        The [metadata] of the created EndpointReference will be based on the endpoint information passed on input to this method.

        Parameters:
        serviceName - The QName representing the service that the newly created EPR will represent
        endpointName - The String representing the endpoint in the service that the newly created EPR will represent. In WSDL 1.1, this equates to the port name.
        statefulSessionBean - the stateful session bean with which affinity is to be maintained, or null.
        Returns:
        EndpointReference The created com.ibm.websphere.EndpointReference corresponding to the endpoint identified by the input parameters.
        Throws:
        EndpointReferenceCreationException - thrown if there was a problem creating the EndpointReference. For example, if it is not possible to establish a unique URI for this endpoint, this exception will be thrown.
      • getReferenceParameterFromMessageContext

        public static java.lang.String getReferenceParameterFromMessageContext(javax.xml.namespace.QName name)
                                                                        throws ReferenceParameterCreationException

        This method is intended for use by Web service applications requiring access to WS-Addressing [reference parameters] that appear on the inbound message. It returns a Reference Parameter identified by its QName.

        Note that:

        For access to [reference parameters] which do not have a String value, the com.ibm.wsspi.wsaddressing.EndpointReferenceManager.getSOAPElementReferenceParameterFromMessageContext method can be used.

        This method is intended for use at the Web service only. It is not available to the client.

        Parameters:
        name - The QName identifying the reference parameters to be returned
        Returns:
        The String reference parameter value on the message context corresponding to the name passed as input. If no reference parameter exists with the specified name, null will be returned. If more than one reference parameter exists with the specified name then behavior is undefined.
        Throws:
        ReferenceParameterCreationException - if there was a problem creating the reference parameter (for example, if there is no available SOAP Message Context).
IBM WebSphere Application ServerTM
Release 8.5