Class JakartaXmlWsBundle<C>

java.lang.Object
org.kiwiproject.dropwizard.jakarta.xml.ws.JakartaXmlWsBundle<C>
All Implemented Interfaces:
io.dropwizard.core.ConfiguredBundle<C>

public class JakartaXmlWsBundle<C> extends Object implements io.dropwizard.core.ConfiguredBundle<C>
A Dropwizard bundle that enables Dropwizard applications to publish SOAP web services using Jakarta XML Web Services and to create web service clients.
  • Field Details

  • Constructor Details

    • JakartaXmlWsBundle

      public JakartaXmlWsBundle()
      Create a new bundle instance. Service endpoints are published relative to '/soap'.
    • JakartaXmlWsBundle

      public JakartaXmlWsBundle(String servletPath)
      Create a new bundle instance. Service endpoints are published relative to the provided servletPath.
      Parameters:
      servletPath - Root path for service endpoints. Leading slash is required.
    • JakartaXmlWsBundle

      public JakartaXmlWsBundle(String servletPath, JakartaXmlWsEnvironment jwsEnvironment)
      Create a new bundle instance using the provided JakartaXmlWsEnvironment. Service endpoints are published relative to the provided servletPath.
      Parameters:
      servletPath - Root path for service endpoints. Leading slash is required.
      jwsEnvironment - Valid JakartaXmlWsEnvironment.
  • Method Details

    • initialize

      public void initialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap)
      Specified by:
      initialize in interface io.dropwizard.core.ConfiguredBundle<C>
    • run

      public void run(C configuration, io.dropwizard.core.setup.Environment environment)
      Specified by:
      run in interface io.dropwizard.core.ConfiguredBundle<C>
    • publishEndpoint

      public org.apache.cxf.jaxws.EndpointImpl publishEndpoint(EndpointBuilder endpointBuilder)
      Publish Jakarta XML Web Services endpoint. Endpoint will be published relative to the CXF servlet path.
      Parameters:
      endpointBuilder - EndpointBuilder.
      Returns:
      javax.xml.ws.Endpoint
    • getClient

      public <T> T getClient(ClientBuilder<T> clientBuilder)
      Factory method for creating Jakarta XML Web Services clients.
      Type Parameters:
      T - Service interface type.
      Parameters:
      clientBuilder - ClientBuilder.
      Returns:
      Jakarta XML Web Services client proxy.
    • getPublishedEndpointUrlPrefix

      protected @Nullable String getPublishedEndpointUrlPrefix(C configuration)
      Extract the published endpoint URL prefix from the application configuration and return it to use the returned value as the location of services in the published WSDLs.

      Override this method to configure the bundle.

      Parameters:
      configuration - Application configuration.
      Returns:
      Published endpoint URL prefix, or null if there is no prefix