# Class ContextService

java.lang.Object
org.apache.tomcat.util.descriptor.web.ResourceBase
org.apache.tomcat.util.descriptor.web.ContextService

All Implemented Interfaces:
  `Serializable, Injectable`

public class ContextService extends ResourceBase
Representation of a web service reference for a web application, as represented in a `<service-ref>` element in the deployment descriptor.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContextService()`
  Default constructor for ContextService.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addHandler(ContextHandler handler)`
  Adds a handler for this service reference.
  `void`
  `addPortcomponent(String serviceendpoint, String portlink)`
  Adds a port component mapping for the given service endpoint.
  `boolean`
  `equals(Object obj)`
  `String`
  `getDisplayname()`
  Returns the WebService reference display name.
  `ContextHandler`
  `getHandler(String handlername)`
  Returns the handler with the given name.
  `Iterator<String>`
  `getHandlers()`
  Returns an iterator over the handler names.
  `String`
  `getInterface()`
  Returns the JAX-WS Service interface class name.
  `String`
  `getJaxrpcmappingfile()`
  Returns the JAX-RPC mapping file.
  `String`
  `getLargeIcon()`
  Returns the large icon for this WebService.
  `String`
  `getPortlink(String serviceendpoint)`
  Returns the port link for the given service endpoint.
  `Iterator<String>`
  `getServiceendpoints()`
  Declares a client dependency on the container to resolving a Service Endpoint Interface to a WSDL port.
  `String[]`
  `getServiceqname()`
  Returns the WSDL service QName array.
  `String`
  `getServiceqname(int i)`
  Returns the WSDL service QName at the given index.
  `String`
  `getServiceqnameLocalpart()`
  Returns the local part of the WSDL service QName.
  `String`
  `getServiceqnameNamespaceURI()`
  Returns the namespace URI of the WSDL service QName.
  `String`
  `getSmallIcon()`
  Returns the small icon for this WebService.
  `String`
  `getWsdlfile()`
  Returns the location of the web service WSDL description.
  `int`
  `hashCode()`
  `void`
  `setDisplayname(String displayname)`
  Sets the WebService reference display name.
  `void`
  `setInterface(String serviceInterface)`
  Sets the JAX-WS Service interface class name.
  `void`
  `setJaxrpcmappingfile(String jaxrpcmappingfile)`
  Sets the JAX-RPC mapping file.
  `void`
  `setLargeIcon(String largeIcon)`
  Sets the large icon for this WebService.
  `void`
  `setServiceqname(String[] serviceqname)`
  Sets the WSDL service QName array.
  `void`
  `setServiceqname(String serviceqname, int i)`
  Sets the WSDL service QName at the given index.
  `void`
  `setServiceqnameLocalpart(String localpart)`
  Sets the local part of the WSDL service QName.
  `void`
  `setServiceqnameNamespaceURI(String namespaceuri)`
  Sets the namespace URI of the WSDL service QName.
  `void`
  `setSmallIcon(String smallIcon)`
  Sets the small icon for this WebService.
  `void`
  `setWsdlfile(String wsdlfile)`
  Sets the location of the web service WSDL description.
  `String`
  `toString()`
  Return a String representation of this object.

  ### Methods inherited from class ResourceBase

  `addInjectionTarget, getDescription, getInjectionTargets, getLookupName, getName, getNamingResources, getProperty, getType, listProperties, removeProperty, setDescription, setLookupName, setName, setNamingResources, setProperty, setType`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ContextService

    public ContextService()
    Default constructor for ContextService.

- ## Method Details

  - ### getDisplayname

    public String getDisplayname()
    Returns the WebService reference display name.
    Returns:
      the display name

  - ### setDisplayname

    public void setDisplayname(String displayname)
    Sets the WebService reference display name.
    Parameters:
      `displayname` - the display name

  - ### getLargeIcon

    public String getLargeIcon()
    Returns the large icon for this WebService.
    Returns:
      the large icon path

  - ### setLargeIcon

    public void setLargeIcon(String largeIcon)
    Sets the large icon for this WebService.
    Parameters:
      `largeIcon` - the large icon path

  - ### getSmallIcon

    public String getSmallIcon()
    Returns the small icon for this WebService.
    Returns:
      the small icon path

  - ### setSmallIcon

    public void setSmallIcon(String smallIcon)
    Sets the small icon for this WebService.
    Parameters:
      `smallIcon` - the small icon path

  - ### getInterface

    public String getInterface()
    Returns the JAX-WS Service interface class name.
    Returns:
      the service interface class name

  - ### setInterface

    public void setInterface(String serviceInterface)
    Sets the JAX-WS Service interface class name.
    Parameters:
      `serviceInterface` - the service interface class name

  - ### getWsdlfile

    public String getWsdlfile()
    Returns the location of the web service WSDL description.
    Returns:
      the WSDL file location

  - ### setWsdlfile

    public void setWsdlfile(String wsdlfile)
    Sets the location of the web service WSDL description.
    Parameters:
      `wsdlfile` - the WSDL file location

  - ### getJaxrpcmappingfile

    public String getJaxrpcmappingfile()
    Returns the JAX-RPC mapping file.
    Returns:
      the JAX-RPC mapping file path

  - ### setJaxrpcmappingfile

    public void setJaxrpcmappingfile(String jaxrpcmappingfile)
    Sets the JAX-RPC mapping file.
    Parameters:
      `jaxrpcmappingfile` - the JAX-RPC mapping file path

  - ### getServiceqname

    public String[] getServiceqname()
    Returns the WSDL service QName array.
    Returns:
      the service QName array

  - ### getServiceqname

    public String getServiceqname(int i)
    Returns the WSDL service QName at the given index.
    Parameters:
      `i` - the index
    Returns:
      the service QName component

  - ### getServiceqnameNamespaceURI

    public String getServiceqnameNamespaceURI()
    Returns the namespace URI of the WSDL service QName.
    Returns:
      the namespace URI

  - ### getServiceqnameLocalpart

    public String getServiceqnameLocalpart()
    Returns the local part of the WSDL service QName.
    Returns:
      the local part

  - ### setServiceqname

    public void setServiceqname(String[] serviceqname)
    Sets the WSDL service QName array.
    Parameters:
      `serviceqname` - the service QName array

  - ### setServiceqname

    public void setServiceqname(String serviceqname, int i)
    Sets the WSDL service QName at the given index.
    Parameters:
      `serviceqname` - the service QName component
      `i` - the index

  - ### setServiceqnameNamespaceURI

    public void setServiceqnameNamespaceURI(String namespaceuri)
    Sets the namespace URI of the WSDL service QName.
    Parameters:
      `namespaceuri` - the namespace URI

  - ### setServiceqnameLocalpart

    public void setServiceqnameLocalpart(String localpart)
    Sets the local part of the WSDL service QName.
    Parameters:
      `localpart` - the local part

  - ### getServiceendpoints

    public Iterator<String> getServiceendpoints()
    Declares a client dependency on the container to resolving a Service Endpoint Interface to a WSDL port. It optionally associates the Service Endpoint Interface with a particular port-component.
    Returns:
      the endpoint names iterator

  - ### getPortlink

    public String getPortlink(String serviceendpoint)
    Returns the port link for the given service endpoint.
    Parameters:
      `serviceendpoint` - the service endpoint name
    Returns:
      the port link

  - ### addPortcomponent

    public void addPortcomponent(String serviceendpoint, String portlink)
    Adds a port component mapping for the given service endpoint.
    Parameters:
      `serviceendpoint` - the service endpoint name
      `portlink` - the port link

  - ### getHandlers

    public Iterator<String> getHandlers()
    Returns an iterator over the handler names.
    Returns:
      iterator of handler names

  - ### getHandler

    public ContextHandler getHandler(String handlername)
    Returns the handler with the given name.
    Parameters:
      `handlername` - the handler name
    Returns:
      the handler

  - ### addHandler

    public void addHandler(ContextHandler handler)
    Adds a handler for this service reference.
    Parameters:
      `handler` - the handler to add

  - ### toString

    public String toString()
    Return a String representation of this object.
    Overrides:
      `toString` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `ResourceBase`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `ResourceBase`