Class DescriptionFactory


  • public class DescriptionFactory
    extends Object
    Creates the JAX-WS metadata description hierarchy from some combinations of WSDL, Java class information including annotations, and (in the future) deployment descriptors.
    • Method Detail

      • createServiceDescription

        public static ServiceDescription createServiceDescription​(URL wsdlURL,
                                                                  QName serviceQName,
                                                                  Class serviceClass)
        Create the initial ServiceDescription hierarchy on the CLIENT side. This is intended to be called when the client creates a ServiceDelegate. Note that it will only create the ServiceDescription at this point. The EndpointDescription hierarchy under this ServiceDescription will be created by the updateEndpoint factory method, which will be called by the ServiceDelegate once the port is known (i.e. addPort, getPort, or createDispatch).
        Parameters:
        wsdlURL - URL to the WSDL file to use; this may be null
        serviceQName - The ServiceQName for this service; may not be null
        serviceClass - The Service class; may not be null and must be assignable from javax.xml.ws.Service
        Returns:
        A ServiceDescription instance for a CLIENT access to the service.
        See Also:
        updateEndpoint(ServiceDescription, Class, QName, ServiceDescription.UpdateType)
      • createServiceDescription

        public static ServiceDescription createServiceDescription​(URL wsdlURL,
                                                                  QName serviceQName,
                                                                  Class serviceClass,
                                                                  DescriptionBuilderComposite sparseComposite,
                                                                  Object sparseCompositeKey)
        Create the initial ServiceDescripton hierarchy on the CLIENT side. This allows a sparse DBC to be specified in addition to the service class. The sparse DBC can be used to override the class annotation member values.
        Parameters:
        wsdlURL -
        serviceQName -
        serviceClass -
        sparseComposite -
        sparseCompositeKey -
        Returns:
        See Also:
        createServiceDescription(URL, QName, Class)
      • updateEndpoint

        public static EndpointDescription updateEndpoint​(ServiceDescription serviceDescription,
                                                         Class sei,
                                                         QName portQName,
                                                         DescriptionFactory.UpdateType updateType)
        Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side ServiceDescription for a particular port. If an EndpointDescritption already exists, it will be returned; if one does not already exist, it will be created. Note that if the SEI is null then the EndpointDescription returned will be for a Dispatch client only and it will not have an EndpointInterfaceDescription hierarchy associated with it. If, at a later point, the same port is requested and an SEI is provided, the existing EndpointDescription will be updated with a newly-created EndpointInterfaceDescription hierarchy.
        Parameters:
        serviceDescription - An existing client-side ServiceDescription. This must not be null.
        sei - The ServiceInterface class. This can be null for adding a port or creating a Dispatch; it can not be null when getting a port.
        portQName - The QName of the port. If this is null, the runtime will attempt to to select an appropriate port to use.
        updateType - The type of the update: adding a port, creating a dispatch, or getting an SEI-based port.
        Returns:
        An EndpointDescription corresponding to the port.
        See Also:
        createServiceDescription(URL, QName, Class), DescriptionFactory.UpdateType
      • updateEndpoint

        public static EndpointDescription updateEndpoint​(ServiceDescription serviceDescription,
                                                         Class sei,
                                                         QName portQName,
                                                         DescriptionFactory.UpdateType updateType,
                                                         Object serviceDelegateKey)
        Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side ServiceDescription for a particular port. This is identical to above, but this method has a reference back to the ServiceDelegate (which invoked it) for purposes of properly caching ServiceDescriptions that contain dynamic ports
        Parameters:
        serviceDescription - An existing client-side ServiceDescription. This must not be null.
        sei - The ServiceInterface class. This can be null for adding a port or creating a Dispatch; it can not be null when getting a port.
        portQName - The QName of the port. If this is null, the runtime will attempt to to select an appropriate port to use.
        updateType - The type of the update: adding a port, creating a dispatch, or getting an SEI-based port.
        serviceDelegateKey - A reference back to the ServiceDelegate that called it
        Returns:
        An EndpointDescription corresponding to the port.
        See Also:
        createServiceDescription(URL, QName, Class), DescriptionFactory.UpdateType
      • updateEndpoint

        public static EndpointDescription updateEndpoint​(ServiceDescription serviceDescription,
                                                         Class sei,
                                                         EndpointReference epr,
                                                         String addressingNamespace,
                                                         DescriptionFactory.UpdateType updateType)
        Retrieve or create the EndpointDescription hierachy associated with an existing CLIENT side ServiceDescription for a particular port. If an EndpointDescritption already exists, it will be returned; if one does not already exist, it will be created. Note that if the SEI is null then the EndpointDescription returned will be for a Dispatch client only and it will not have an EndpointInterfaceDescription hierachy associated with it. If, at a later point, the same port is requested and an SEI is provided, the existing EndpointDescription will be updated with a newly-created EndpointInterfaceDescription hieracy.
        Parameters:
        serviceDescription - An existing client-side ServiceDescription. This must not be null.
        sei - The ServiceInterface class. This can be null for adding a port or creating a Dispatch; it can not be null when getting a port.
        epr - The endpoint reference to the target port.
        addressingNamespace - The addressing namespace of the endpoint reference.
        updateType - The type of the update: adding a port, creating a dispatch, or getting an SEI-based port.
        Returns:
        An EndpointDescription corresponding to the port.
        See Also:
        createServiceDescription(URL, QName, Class), DescriptionFactory.UpdateType
      • updateEndpoint

        public static EndpointDescription updateEndpoint​(ServiceDescription serviceDescription,
                                                         Class sei,
                                                         EndpointReference epr,
                                                         String addressingNamespace,
                                                         DescriptionFactory.UpdateType updateType,
                                                         Object serviceDelegateKey)
        Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side ServiceDescription for a particular port. This is identical to above, but this method has a reference back to the ServiceDelegate (which invoked it) for purposes of properly caching ServiceDescriptions that contain dynamic ports
        Parameters:
        serviceDescription - An existing client-side ServiceDescription. This must not be null.
        sei - The ServiceInterface class. This can be null for adding a port or creating a Dispatch; it can not be null when getting a port.
        epr - The endpoint reference to the target port.
        addressingNamespace - The addressing namespace of the endpoint reference.
        updateType - The type of the update: adding a port, creating a dispatch, or getting an SEI-based port.
        serviceDelegateKey - A reference back to the ServiceDelegate that called it
        Returns:
        An EndpointDescription corresponding to the port.
        See Also:
        createServiceDescription(URL, QName, Class), DescriptionFactory.UpdateType
      • updateEndpoint

        public static EndpointDescription updateEndpoint​(ServiceDescription serviceDescription,
                                                         Class sei,
                                                         QName portQName,
                                                         DescriptionFactory.UpdateType updateType,
                                                         String bindingId,
                                                         String endpointAddress)
        Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side ServiceDescription for a particular port. If an EndpointDescritption already exists, it will be returned; if one does not already exist, it will be created. Note that if the SEI is null then the EndpointDescription returned will be for a Dispatch client only and it will not have an EndpointInterfaceDescription hierarchy associated with it. If, at a later point, the same port is requested and an SEI is provided, the existing EndpointDescription will be updated with a newly-created EndpointInterfaceDescription hierarchy.
        Parameters:
        serviceDescription - An existing client-side ServiceDescription. This must not be null.
        sei - The ServiceInterface class. This can be null for adding a port or creating a Dispatch; it can not be null when getting a port.
        portQName - The QName of the port. If this is null, the runtime will attempt to to select an appropriate port to use.
        updateType - The type of the update: adding a port, creating a dispatch, or getting an SEI-based port.
        Returns:
        An EndpointDescription corresponding to the port.
        See Also:
        createServiceDescription(URL, QName, Class), DescriptionFactory.UpdateType
      • updateEndpoint

        public static EndpointDescription updateEndpoint​(ServiceDescription serviceDescription,
                                                         Class sei,
                                                         QName portQName,
                                                         DescriptionFactory.UpdateType updateType,
                                                         Object serviceDelegateKey,
                                                         String bindingId,
                                                         String endpointAddress)
        Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side ServiceDescription for a particular port. This is identical to above, but this method has a reference back to the ServiceDelegate (which invoked it) for purposes of properly caching ServiceDescriptions that contain dynamic ports
        Parameters:
        serviceDescription - An existing client-side ServiceDescription. This must not be null.
        sei - The ServiceInterface class. This can be null for adding a port or creating a Dispatch; it can not be null when getting a port.
        portQName - The QName of the port. If this is null, the runtime will attempt to to select an appropriate port to use.
        updateType - The type of the update: adding a port, creating a dispatch, or getting an SEI-based port.
        serviceDelegateKey - A reference back to the ServiceDelegate that called it
        Returns:
        An EndpointDescription corresponding to the port.
        See Also:
        createServiceDescription(URL, QName, Class), DescriptionFactory.UpdateType
      • updateEndpoint

        public static EndpointDescription updateEndpoint​(ServiceDescription serviceDescription,
                                                         Class sei,
                                                         EndpointReference epr,
                                                         String addressingNamespace,
                                                         DescriptionFactory.UpdateType updateType,
                                                         String bindingId,
                                                         String endpointAddress)
        Retrieve or create the EndpointDescription hierachy associated with an existing CLIENT side ServiceDescription for a particular port. If an EndpointDescritption already exists, it will be returned; if one does not already exist, it will be created. Note that if the SEI is null then the EndpointDescription returned will be for a Dispatch client only and it will not have an EndpointInterfaceDescription hierachy associated with it. If, at a later point, the same port is requested and an SEI is provided, the existing EndpointDescription will be updated with a newly-created EndpointInterfaceDescription hieracy.
        Parameters:
        serviceDescription - An existing client-side ServiceDescription. This must not be null.
        sei - The ServiceInterface class. This can be null for adding a port or creating a Dispatch; it can not be null when getting a port.
        epr - The endpoint reference to the target port.
        addressingNamespace - The addressing namespace of the endpoint reference.
        updateType - The type of the update: adding a port, creating a dispatch, or getting an SEI-based port.
        Returns:
        An EndpointDescription corresponding to the port.
        See Also:
        createServiceDescription(URL, QName, Class), DescriptionFactory.UpdateType
      • updateEndpoint

        public static EndpointDescription updateEndpoint​(ServiceDescription serviceDescription,
                                                         Class sei,
                                                         EndpointReference epr,
                                                         String addressingNamespace,
                                                         DescriptionFactory.UpdateType updateType,
                                                         Object serviceDelegateKey,
                                                         String bindingId,
                                                         String endpointAddress)
        Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side ServiceDescription for a particular port. This is identical to above, but this method has a reference back to the ServiceDelegate (which invoked it) for purposes of properly caching ServiceDescriptions that contain dynamic ports
        Parameters:
        serviceDescription - An existing client-side ServiceDescription. This must not be null.
        sei - The ServiceInterface class. This can be null for adding a port or creating a Dispatch; it can not be null when getting a port.
        epr - The endpoint reference to the target port.
        addressingNamespace - The addressing namespace of the endpoint reference.
        updateType - The type of the update: adding a port, creating a dispatch, or getting an SEI-based port.
        serviceDelegateKey - A reference back to the ServiceDelegate that called it
        Returns:
        An EndpointDescription corresponding to the port.
        See Also:
        createServiceDescription(URL, QName, Class), DescriptionFactory.UpdateType
      • createServiceDescriptionFromDBCMap

        public static List<ServiceDescription> createServiceDescriptionFromDBCMap​(HashMap<String,​DescriptionBuilderComposite> dbcMap)
        Create a full ServiceDescription hierarchy on the SERVER side for EACH service implementation entry in the DescriptionBuilderComposite (DBC) map. Note that the associated SERVER side Axis description objects are also created. To create a single ServiceDescription hierarchy for a single service implementation class, use the factory method that takes a single class and returns a single ServiceDescription.

        A service implementation DBC entry is one that: (1) Is a class and not an interface (2) Carries a WebService or WebServiceProvider annotation.

        A DBC represents the information found in the service implementation class. There will be other DBC entries in the map for classes and interfaces associated with the service implementation, such as super classes, super interfaces, fault classes, and such.

        Note that map may contain > 1 service implementation DBC. A full ServiceDescriptionhierarchy will be created for each service implementation DBC entry.

        Note that each ServiceDescription will have exactly one EndpointDescription corresponding to each service implementation.

        Parameters:
        dbcMap - A HashMap keyed on class name with a value for the DBC for that classname
        Returns:
        A List of ServiceDescriptions with the associated SERVER side hierarchy created.
      • createServiceDescriptionFromDBCMap

        public static List<ServiceDescription> createServiceDescriptionFromDBCMap​(HashMap<String,​DescriptionBuilderComposite> dbcMap,
                                                                                  ConfigurationContext configContext)
        Create a full ServiceDescription hierarchy on the SERVER side for EACH service implementation entry in the DescriptionBuilderComposite (DBC) map. Note that the associated SERVER side Axis description objects are also created. To create a single ServiceDescription hierarchy for a single service implementation class, use the factory method that takes a single class and returns a single ServiceDescription.

        A service implementation DBC entry is one that: (1) Is a class and not an interface (2) Carries a WebService or WebServiceProvider annotation.

        A DBC represents the information found in the service implementation class. There will be other DBC entries in the map for classes and interfaces associated with the service implementation, such as super classes, super interfaces, fault classes, and such.

        Note that map may contain > 1 service implementation DBC. A full ServiceDescriptionhierarchy will be created for each service implementation DBC entry.

        Note that each ServiceDescription will have exactly one EndpointDescription corresponding to each service implementation.

        Parameters:
        dbcMap - A HashMap keyed on class name with a value for the DBC for that classname
        configContext - ConfigurationContext used to get WSDL Definition configuration parameters.
        Returns:
        A List of ServiceDescriptions with the associated SERVER side hierarchy created.
      • createServiceDescriptionFromDBCMap

        public static List<ServiceDescription> createServiceDescriptionFromDBCMap​(HashMap<String,​DescriptionBuilderComposite> dbcMap,
                                                                                  ConfigurationContext configContext,
                                                                                  boolean performVaidation)
        Create a full ServiceDescription hierarchy on the SERVER side for EACH service implementation entry in the DescriptionBuilderComposite (DBC) map. Note that the associated SERVER side Axis description objects are also created. To create a single ServiceDescription hierarchy for a single service implementation class, use the factory method that takes a single class and returns a single ServiceDescription.

        A service implementation DBC entry is one that: (1) Is a class and not an interface (2) Carries a WebService or WebServiceProvider annotation.

        A DBC represents the information found in the service implementation class. There will be other DBC entries in the map for classes and interfaces associated with the service implementation, such as super classes, super interfaces, fault classes, and such.

        Note that map may contain > 1 service implementation DBC. A full ServiceDescriptionhierarchy will be created for each service implementation DBC entry.

        Note that each ServiceDescription will have exactly one EndpointDescription corresponding to each service implementation.

        Parameters:
        dbcMap - A HashMap keyed on class name with a value for the DBC for that classname
        configContext - ConfigurationContext used to get WSDL Definition configuration parameters.
        isValid -
        Returns:
        A List of ServiceDescriptions with the associated SERVER side hierarchy created.
      • createServiceDescription

        public static ServiceDescription createServiceDescription​(Class serviceImplClass)
        Create a full ServiceDescription hierarchy on the SERVER side for a single service implementation class. To create process more than one service implementation at one time or to process them without causing the service implementation classes to be loaded, use the factory method that takes a collection of DescriptionBuilderComposite objects and returns a collection of ServiceDescriptions.

        Note that the ServiceDescription will have exactly one EndpointDescription corresponding to the service implementation.

        Parameters:
        serviceImplClass - A Web Service implementation class (i.e. one that carries an WebService or WebServiceProvider annotation).
        Returns:
        A ServiceDescription with the associated SERVER side hierarchy created.
      • createAxisService

        public static AxisService createAxisService​(Class serviceImplClass)
        This provide very convenient way of creating an AxisService from an annotated java class.
        Parameters:
        serviceImplClass - A Web Service implementation class (i.e. one that carries an WebService or WebServiceProvider annotation).
        Returns:
        An AxisService instance
      • createAxisService

        public static AxisService createAxisService​(Class serviceImplClass,
                                                    ConfigurationContext configContext)
        This provide very convenient way of creating an AxisService from an annotated java class.
        Parameters:
        serviceImplClass - A Web Service implementation class (i.e. one that carries an WebService or WebServiceProvider annotation).
        Returns:
        An AxisService instance
      • createClientConfigurationFactory

        public static ClientConfigurationFactory createClientConfigurationFactory()
        Creates Client ConfigurationFactory used to create AxisConfiguration.
        Returns:
        A Client Configuration Factory's new instance. ClinetConfigurationFactory is Singleton.
      • createResolvedHandlersDescription

        public static ResolvedHandlersDescription createResolvedHandlersDescription()
        Create a ResolvedHandlersDescription object, which describes attributes of handlers that have been resolved for a give port. This includes the handler classes and the roles.
        Returns:
        A new instance of a ResolfedHandlersDescription object.