Class TestService


  • public class TestService
    extends java.lang.Object
    A service to be deployed for a test.

    TODO: We need to be able to mark service as an EJB service

    Author:
    Kohsuke Kawaguchi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.io.File baseDir
      Directory in which the service's source files reside.
      java.util.List<java.io.File> customizations
      Possibly empty list of JAXB/JAX-WS external binding customizations.
      java.util.Set<TestEndpoint> endpoints
      TestEndpoints that this service exposes.
      boolean isSTS
      Determines if the service is an STS for WSTrust and needs special handling
      java.lang.String name
      Name of the service.
      TestDescriptor parent  
      java.util.List<WSDL> wsdl
      Optional WSDL file that describes this service.
    • Constructor Summary

      Constructors 
      Constructor Description
      TestService​(TestDescriptor parent, java.lang.String name, java.io.File baseDir, java.util.List<WSDL> wsdl, boolean sts, java.lang.String explicitServiceClassName)  
    • Field Detail

      • name

        @NotNull
        public final java.lang.String name
        Name of the service. The name must be:
        1. Unique within TestDescriptor
        2. an empty string or a valid Java identifier.

        An empty string is convenient to describe the default/primary service (or when there's just one service involved, which is the majority.)

      • baseDir

        @NotNull
        public final java.io.File baseDir
        Directory in which the service's source files reside.
      • wsdl

        @Nullable
        public final java.util.List<WSDL> wsdl
        Optional WSDL file that describes this service.
      • customizations

        @NotNull
        public final java.util.List<java.io.File> customizations
        Possibly empty list of JAXB/JAX-WS external binding customizations. Must be empty when wsdl is null.
      • endpoints

        @NotNull
        public final java.util.Set<TestEndpoint> endpoints
        TestEndpoints that this service exposes.

        The harness uses this information to inject proxies to the client.

      • isSTS

        public boolean isSTS
        Determines if the service is an STS for WSTrust and needs special handling
    • Constructor Detail

      • TestService

        public TestService​(TestDescriptor parent,
                           java.lang.String name,
                           java.io.File baseDir,
                           java.util.List<WSDL> wsdl,
                           boolean sts,
                           @Nullable
                           java.lang.String explicitServiceClassName)
                    throws java.io.IOException
        Parameters:
        explicitServiceClassName - Descriptor can explicitly specify the service class name. If this happens, we won't search for @WebService classes and just use this instead. Used for deploying inner classes and testing inheritance.
        Throws:
        java.io.IOException
    • Method Detail

      • getAbsolutePath

        public java.lang.String getAbsolutePath​(java.lang.String relativePath)
      • getEndpointByImpl

        public TestEndpoint getEndpointByImpl​(java.lang.String implClassFullName)
        Gets the TestEndpoint that has the specified implementation class.
      • getGlobalUniqueName

        public java.lang.String getGlobalUniqueName()
        Returns the name combined with the test case name to make a globaly unique name for this service.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getHandlerConfiguration

        public java.io.File[] getHandlerConfiguration()
      • getConfiguredFile

        public java.io.File getConfiguredFile​(java.lang.String filename)