Class JakartaXmlWsBundle<C>
java.lang.Object
org.kiwiproject.dropwizard.jakarta.xml.ws.JakartaXmlWsBundle<C>
- All Implemented Interfaces:
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 Summary
Modifier and TypeFieldDescriptionprotected static final String
protected final JakartaXmlWsEnvironment
protected final String
-
Constructor Summary
ConstructorDescriptionCreate a new bundle instance.JakartaXmlWsBundle
(String servletPath) Create a new bundle instance.JakartaXmlWsBundle
(String servletPath, JakartaXmlWsEnvironment jwsEnvironment) Create a new bundle instance using the provided JakartaXmlWsEnvironment. -
Method Summary
Modifier and TypeMethodDescription<T> T
getClient
(ClientBuilder<T> clientBuilder) Factory method for creating Jakarta XML Web Services clients.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.void
initialize
(io.dropwizard.core.setup.Bootstrap<?> bootstrap) org.apache.cxf.jaxws.EndpointImpl
publishEndpoint
(EndpointBuilder endpointBuilder) Publish Jakarta XML Web Services endpoint.void
-
Field Details
-
DEFAULT_PATH
- See Also:
-
jwsEnvironment
-
servletPath
-
-
Constructor Details
-
JakartaXmlWsBundle
public JakartaXmlWsBundle()Create a new bundle instance. Service endpoints are published relative to '/soap'. -
JakartaXmlWsBundle
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
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 interfaceio.dropwizard.core.ConfiguredBundle<C>
-
run
- Specified by:
run
in interfaceio.dropwizard.core.ConfiguredBundle<C>
-
publishEndpoint
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
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
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
-