160 Whiteboard Specification for Jakarta™ XML Web Services

???

160.1 Introduction

Web services are an important part in today's machine-to-machine communication. The [1] Jakarta™ XML Web Services Specification (formerly known as JAX-WS) specification offers a vendor-neutral way of writing and using such services. It defines a standard Java-to-WSDL mapping (see [9] Web Services Description Language (WSDL)) which determines how web service operations are bound to Java methods when a SOAP message (see [8] SOAP Protocol) invokes an action.

The Jakarta™ XML Web Services specification provides a comprehensive model for SOAP-based web services. It supports both document-oriented and RPC-oriented operations, handles SOAP 1.1 and SOAP 1.2 protocols, and provides a robust handler framework for message processing. The specification defines key concepts such as Service Endpoints, which are the server-side components that process web service requests (see [3] Endpoint), and Handlers, which are processing units that can intercept and modify SOAP messages as they flow through the system (see [2] Handler and [7] Jakarta™ XML Web Services Handler Types). These handlers can be chained together to form a handler chain, allowing for modular cross-cutting concerns such as security, logging, or message transformation. The order in which handlers process messages depends on the message direction, as described in [4] Jakarta™ XML Web Services Handler Execution.

This specification builds upon the concepts and terminology defined in the [1] Jakarta™ XML Web Services Specification. Users and implementors of this specification are expected to be familiar with the Jakarta™ XML Web Services specification, as this whiteboard specification depends on those foundational concepts and does not redefine them.

Managing endpoints in a dynamic way with integration to different listeners and transports can be a challenging task. This specification aims to make this task much easier using the well-known [11] Whiteboard Pattern and allow integration with existing transport specifications. Even though different transports are supported, the most common one is the HTTP transport and also the only one that is mandatory for a [1] Jakarta™ XML Web Services Specification implementation. Therefore, this specification also focuses on the HTTP transport only and defines a way to interact with it. Implementations are free to support other kinds of transports as well.

The Whiteboard Specification for Jakarta™ XML Web Services supports:

  • Registering Web Service Implementation - An implementation is an annotated "implementor" of the web service used by an endpoint. An "implementor" is published by an Endpoint that handles the incoming and outgoing messages on the transport level.

  • Registering Handlers - A handler can intercept messages when they pass from/to Endpoints and perform actions on them.

Whiteboard Specification for Jakarta™ XML Web Services implementations must support at least version 4.0 of the Jakarta™ XML Web Services API and registering endpoints to the protocols provided by the used API implementation, which is HTTP as a minimum.

160.1.1 Entities

This specification defines the following entities:

  • [2] Handler - An object registered in the Service Registry responsible for filtering or inspection of messages while they flow through the web service processing.

  • Endpoint Implementor - An implementation that can be used to be registered as an [3] Endpoint

  • Endpoint Registrar - An implementation that collects Handler and Endpoint Implementor instances and publishes them for a given transport

Figure 160.1 Jakarta™ XML Web Services Overview Diagram

Jakarta™ XML Web Services Overview Diagram

160.1.2 Jakarta™ XML Web Services Whiteboard

The Jakarta™ XML Web Services specification defines the programming model and APIs for web service endpoints and handlers, but does not prescribe how these components should be discovered and managed in a dynamic environment. In a traditional Jakarta EE application server, endpoints are typically deployed as part of a WAR file with static configuration. This static deployment model conflicts with OSGi's dynamic nature where bundles can be installed, started, stopped, and uninstalled at any time.

While in a traditional web application the configuration is rather static and known in advance, in OSGi items can come and go anytime and code should be aware of this dynamism. Also, registration of listeners must happen before an endpoint is published, and only weak typing makes it hard to handle this correctly manually. As a result, the publishing of Web Services in the current state of the specification goes against the loose coupling concept usually provided by OSGi as it requires knowledge about the stakeholders involved.

It is therefore the responsibility of the Web Services Whiteboard to handle these cases in a transparent manner so the user can focus on the actual work and use common dependency injection techniques like Declarative Services to inject dependencies. The whiteboard pattern allows endpoint implementors and handlers to be registered as OSGi services, and the whiteboard implementation automatically manages their lifecycle, publishing and unpublishing endpoints as services come and go.

160.1.3 Registering Endpoint Implementor

Endpoint Implementors can be registered with the Jakarta™ XML Web Services Whiteboard by registering them as Whiteboard services. This means that the endpoint POJO implementations are registered in the Service Registry. As Web Service Endpoints are POJOs, they may be registered using any valid service interface, including Object, and use any Jakarta™ XML Web Services annotations on the endpoint object, just as they would outside of OSGi. The Jakarta™ XML Web Services specification defines annotations such as @WebService, @WebMethod, and @WebParam to declare web service endpoints and their operations (see [1] Jakarta™ XML Web Services Specification for details on these annotations).

To be picked up as endpoints, the POJO must be registered with the osgi.jakarta.xml.ws.endpoint.implementor service property with a value of "true". This property serves as a marker to the Jakarta™ XML Web Services Whiteboard runtime, indicating that this OSGi service should be further processed as an endpoint.

Besides that, the property osgi.jakarta.xml.ws.endpoint.address can be specified as a way to indicate at what address an Endpoint should be published. If given, this must be passed to the Endpoint.publish(String) method as defined in the [6] Jakarta™ XML Web Services Endpoint Publishing. If it is not specified or is empty, it is assumed that there is some other property available to allow the Whiteboard runtime to derive the publishing address or context. In the scope of this specification, there is the osgi.jakarta.xml.ws.endpoint.http.contextpath property that defines that the endpoint should be published to the HTTP transport where / represents the root. What host or port is chosen is defined by the configuration of the implementation.

The code below shows a simple echo web service Endpoint Implementor. The @WebService and @WebMethod annotations are Jakarta™ XML Web Services annotations that define the service interface and operations; these annotations are processed by the Jakarta™ XML Web Services runtime, not by the Whiteboard runtime. The Whiteboard runtime is only responsible for managing the lifecycle and registration of the endpoint:

@WebService
@WhiteboardEndpoint(address = "http://localhost/echo")
@Component(immediate = true, service = WSEcho.class, property = "wstype=echo")
public class WSEcho {

    @WebMethod(operationName = "echo", action = "echo")
    public String echo(@WebParam(name = "textIn") String text) {
        return text;
    }

}

There is no particular order in which Endpoint Implementors are published. They could be registered as soon as the service is visible in the OSGi service registry or even delayed in the background. If any particular ordering of publishing is desired, this must be synchronized externally, e.g., by observing the Runtime Service and waiting for a prerequisite endpoint to show up. Due to the dynamic nature of OSGi, most systems should be designed in a way that the exact point in time of publishing the endpoint is not required for the system to function correctly.

160.1.4 Registering Web Service Handlers

Web Service Handlers can be registered with the Jakarta™ XML Web Services Whiteboard in one of two ways:

  • Statically, using metadata in an annotation such as jakarta.jws.HandlerChain or in a provider specific configuration.

  • Dynamically, by registering the handlers as Whiteboard services in the OSGi Service Registry.

At runtime the Handler Chain is determined based on the total set of handlers, regardless of how they were registered.

To be identified as a Handler Service by the Jakarta™ XML Web Services Whiteboard the service must be registered in the following way.

  • The service must be registered using jakarta.xml.ws.handler.Handler as its service interface. The service object may implement any of the valid handler types defined by the Jakarta™ XML Web Services specification, such as SOAPHandler or LogicalHandler (see [7] Jakarta™ XML Web Services Handler Types for more information).

  • The service must be registered with a service property named osgi.jakarta.xml.ws.handler.extension set to a value of true.

A Correctly registered handler will be included in the Handler Chain used when publishing the endpoint. It will also result in a HandlerDTO being added to the RuntimeDTO of the Whiteboard Runtime Service.

Failing to register the service appropriately will result in it being ignored by the whiteboard runtime. Correctly registering a handler which turns out to be invalid, for example if it is incorrectly annotated and rejected by the Web Services runtime, will result in a FailedHandlerDTO being added to the RuntimeDTO as described in Whiteboard Error Handling.

The code below shows an example of a logging handler that wants to intercept incoming and outgoing messages, this handler is targeted to any registered Endpoint Implementor:

@Component(service = Handler.class)
@XmlWsHandler()
public class SOAPLoggingHandler implements SOAPHandler<SOAPMessageContext> {

     public Set<QName> getHeaders() {
        return null;
    }

    public boolean handleMessage(SOAPMessageContext smc) {
         smc.getMessage().writeTo(System.out);
        return true;
    }

    public boolean handleFault(SOAPMessageContext smc) {
        smc.getMessage().writeTo(System.err);
        return true;
    }

    public void close(MessageContext messageContext) {
    }
    
}

The combination of static and dynamic handlers are assembled into a handler chain according to the natural order of their service references, usually referred to as service ranking order. This means that Handlers with a higher service ranking will be positioned before those with a lower service ranking in the chain. If two handlers have the same ranking they are sorted according to their service id, with handlers registered later being positioned later in the handler chain.

If a static handler chain is provided then this is maintained in the configured order and must be placed immediately after all services with a ranking of 1 or higher and before any services with a ranking of 0 or lower.

This handler chain is then passed to the Jakarta™ XML Web Services implementation where it is used to process requests.

160.1.4.1 Understanding Handler Execution Order

This specification follows the Jakarta™ XML Web Services execution model as defined in [4] Jakarta™ XML Web Services Handler Execution. When working across multiple Jakarta specifications, developers should understand these execution model differences to avoid incorrect assumptions about handler or filter ordering.

The Jakarta™ XML Web Services specification defines a specific handler execution model that may initially seem counterintuitive. Understanding the rationale behind this design is important for correctly implementing handler chains, especially when working with different Jakarta specifications that have different execution models.

160.1.4.1.1 Jakarta™ XML Web Services Handler Execution Model

As specified in [4] Jakarta™ XML Web Services Handler Execution, the Jakarta™ XML Web Services handler execution follows these rules:

  • Outbound messages: Handler processing starts with the first handler in the chain and proceeds in the same order as the handler chain.

  • Inbound messages: The order of processing is reversed - processing starts with the last handler in the chain and proceeds backwards.

As a result, while handlers are assembled in order of service ranking (highest first), the actual processing order depends on the message direction. Users should be aware of this distinction to avoid confusion about handler execution order.

This bidirectional processing model is designed to support the layered nature of SOAP message processing. The key insight is that handlers often work in complementary pairs during request and response processing. Consider these common use cases:

  1. Security Processing: A security handler might encrypt or sign parts of an outbound SOAP message. On the inbound response, the same handler needs to decrypt or verify signatures. The reversed execution order ensures that the security handler that processed the outbound request is also the one that processes the corresponding inbound response, maintaining proper context and state.

  2. Logging and Monitoring: A logging handler positioned early in the chain for outbound messages can log the original message before any transformations. For inbound messages, by being processed last (reversed order), it logs the final processed response. This creates a symmetrical logging pattern around the entire message flow.

  3. Message Transformation: Protocol handlers (SOAPHandler) work at the SOAP message level and need to process messages before logical handlers (LogicalHandler) on outbound messages. On inbound messages, the reverse is needed - logical handlers should see the message after protocol-level processing is complete. The reversed execution naturally provides this layering.

This model creates a "tunnel" or "onion layer" pattern where each handler wraps the message processing, processing it on the way out and unwrapping it on the way back in. This is particularly important for SOAP-based web services where message integrity, security, and proper protocol layering are critical.

To illustrate this execution flow, consider a complete request-response cycle between a client and server, where both use a handler chain consisting of handlers A, B, and C (ordered by service ranking with A having the highest rank):

Figure 160.2 Handler Execution Flow: Complete Request-Response Cycle

Handler Execution Flow: Complete Request-Response Cycle

As shown in Figure 160.2, the handler chain is traversed in different directions depending on whether the message is inbound or outbound, and whether it is being processed on the client or server side. This symmetric execution model ensures that complementary operations (such as encryption/decryption or signing/verification) are performed by the same handler in the appropriate order.

It is also important to note that when different handler types are used (such as LogicalHandler and SOAPHandler), each type executes as a group in different phases of message processing. This means that ordering cannot be controlled between handlers of different types, as they run in separate processing phases. The detailed rules for handler ordering across different handler types are described in the Jakarta™ XML Web Services specification (see [5] Jakarta™ XML Web Services Handler Ordering).

160.1.4.1.2 Comparison with Other Jakarta Specifications

Understanding how Jakarta™ XML Web Services differs from other Jakarta specifications helps clarify the design rationale. The key difference is that Jakarta XML Web Services uses a single handler type that processes both outbound and inbound messages, requiring reversed execution for inbound processing. Other specifications use distinct components for request and response processing.

160.1.4.1.2.1 Jakarta™ RESTful Web Services

Jakarta™ RESTful Web Services (Jakarta REST) uses distinct filter types for requests and responses: ContainerRequestFilter and ContainerResponseFilter (see [16] Jakarta™ RESTful Web Services Filters). Each filter type has its own priority ordering as defined in Section 6.5.1 "Priorities" (see [15] Jakarta™ RESTful Web Services Priorities). Since request and response are handled by separate filter types, there is no need for reversed execution - each can be ordered independently.

Similar to how Jakarta XML Web Services separates handlers into logical and SOAP handler types for different processing phases, Jakarta REST uses @PreMatching annotations to divide filters into groups that execute at different stages of the processing pipeline (see [17] Jakarta™ RESTful Web Services Processing Pipeline). However, the fundamental difference remains: Jakarta REST filters can directly wrap the request/response objects, while Jakarta XML Web Services handlers work on a message-based approach where the response message does not yet exist during outbound processing.

160.1.4.1.2.2 Jakarta™ Servlet

Jakarta™ Servlet filters (see [18] Jakarta™ Servlet Specification) provide another comparison point. A servlet filter is called once and processes both request and response in a single invocation by wrapping them. The filter chain executes in declaration order for request processing, and automatically reverses for response processing because each filter wraps the next filter in the chain (see [19] Jakarta™ Servlet Filter Chain). This is conceptually similar to Jakarta XML Web Services' reversed execution, but achieved through the wrapping pattern rather than explicit handler chain reversal. The difference is that servlet filters can wrap request and response objects directly, whereas Jakarta XML Web Services handlers must work with messages where the response is not yet available during outbound processing.

160.1.5 Targeting specific Endpoint Implementor

If a handler wants to target a specific Endpoint Implementor it can specify the osgi.jakarta.xml.ws.handler.filter service properties and will only be installed for such Endpoint Implementor that match the provided filter.

The previous example targeting an Endpoint Implementor registered with a wstype property of echo looks like this:

@Component(service = Handler.class)
@XmlWsHandler(filter="(wstype=echo)")
public class SOAPLoggingHandler implements SOAPHandler<SOAPMessageContext> {

       ... like before ...
}

160.2 Jakarta™ XML Web Services Whiteboard Implementation

The Jakarta™ XML Web Services Whiteboard implementation is responsible for:

  • Tracking any service registered with a service property osgi.jakarta.xml.ws.endpoint.implementor with the value true and registering an Endpoint with a transport. An implementation might use different techniques to discover a suitable transport and support for different protocols, but at least the publishing using the default endpoint publish as described in the Jakarta™ XML Web Services specification must be supported (see [6] Jakarta™ XML Web Services Endpoint Publishing). In addition to that, implementations are encouraged to also support publishing to the Http Whiteboard Service (see Jakarta Servlet Whiteboard) using the property osgi.jakarta.xml.ws.endpoint.http.contextpath as described in Registering Endpoint Implementor.

  • Tracking all registered jakarta.xml.ws.handler.Handler services with the service property osgi.jakarta.xml.ws.handler.extension with the value true and attaching them to the target Implementor's Endpoint.

  • Publishing a WebserviceServiceRuntime service to the OSGi service registry so interested parties can query the current state.

As Endpoint instances can only be registered once with a transport and after publishing cannot change their handler chain, special care must be taken when Endpoints are created and published. Because of this, an Endpoint Registrar must ensure that each Endpoint will be refreshed when the Implementor or any Handler changes, which possibly leads to the transport not serving requests for a short amount of time.

160.2.1 The WebserviceServiceRuntime

The WebserviceServiceRuntime service represents the runtime state information of a Jakarta XML Web Services Whiteboard instance. This information is provided through Data Transfer Objects (DTOs). The architecture of OSGi DTOs is described in OSGi Core Release 8.

The WebserviceServiceRuntime provides service registration properties to describe its underlying Jakarta XML Web Services Whiteboard. These service properties can include implementation-specific key-value pairs. They also include the following:

Table 160.1 Service properties for the WebserviceServiceRuntime service

Service Property Name Type Description
service.changecount Long

Whenever the DTOs available from the WebserviceServiceRuntime service change, the value of this property will increase.

This allows interested parties to be notified of changes to the DTOs by observing Service Events of type MODIFIED for the WebserviceServiceRuntime service. See org.osgi.framework.Constants.SERVICE_CHANGECOUNT in OSGi Core Release 8.


160.2.2 WebserviceServiceRuntime DTOs

The getRuntimeDTO() method allows access to the RuntimeDTO that provides a snapshot of the current state of the runtime to gather information about

The EndpointDTO provides the following information:

  • The full address where this endpoint was published. Depending on the used endpoint transport, this might differ from the value given in the endpoint registration, e.g., if the value is relative to some base directory or was transformed according to rules determined by the implementation (e.g., using a load balancer or URL rewriting).

  • Currently bound handlers that matched the endpoint.

  • The implementor service reference of the endpoint that can be used to gather further properties.

The FailedDTO is the base class for the FailedEndpointDTO and FailedEndpointDTO and provides basic information about a failure:

The FailedEndpointDTO extends the FailedDTO with additional information specific to endpoints:

  • The service reference of the implementor that describes failed to be published as an endpoint.

The FailedHandlerDTO extends the FailedDTO with additional information specific to handlers:

160.2.3 Whiteboard Error Handling

There are a number of error cases where the Jakarta Web Service whiteboard may be unable to correctly register an endpoint or use a given handler. All of these cases must result in a failure DTO being created with the appropriate error code.

160.2.3.1 General Error Codes

  • Unknown Failure - Outside of the predefined error conditions, there might still be errors occurring during the construction of the objects. The implementation can use the error code FAILURE_REASON_UNKNOWN to indicate that. The implementation can use its own error codes, but to prevent clash with codes specified in later specification versions, such an error code must be equal to or larger than 1000. In all cases, an additional error message might be used to further describe the nature of the failure and give users of the DTO a hint what's going on.

  • Failure to obtain a service instance - In the case where a published service is unable to be obtained by the Jakarta Web Service whiteboard, then the service is deny-listed by the container. A failure DTO is made available from the WebserviceServiceRuntime representing the deny-listed service object. The error code in this case is FAILURE_REASON_SERVICE_NOT_GETTABLE.

160.2.3.2 Handler Error Codes

  • No matching endpoints - If a handler is currently not matching any Endpoint Implementor, it is considered failed as it cannot perform its work. The error code in this case is FAILURE_REASON_NO_MATCHING_ENDPOINT.

  • Invalid filter - If a handler specifies an invalid filter, it is considered failed as it cannot be decided if a handler matches or not. The error code in this case is FAILURE_REASON_INVALID_FILTER and the message should include the parsing error.

160.2.3.3 Endpoint Implementor Error Codes

  • Endpoint creation failed - An implementation needs to transform the Implementor into a Web Service Endpoint. This endpoint can then be further published with the Jakarta™ XML Web Services API. If this transformation fails, then the Endpoint is considered failed as no further handling is possible. The error code in this case is FAILURE_REASON_CREATE_FAILED.

  • Setting handlers not supported - If there are any matching handlers but setting Handlers for the created Web Service Endpoint is not supported, then the Endpoint is considered failed. The error code in this case is FAILURE_REASON_SET_HANDLER_NOT_SUPPORTED.

  • Setting handlers failed - If there are any matching handlers but using them for the created Web Service Endpoint failed, for example because they are incompatible, then the Endpoint is considered failed. The error code in this case is FAILURE_REASON_SET_HANDLER_FAILED.

  • Publishing failed - After creation and setup of handlers, an Endpoint is finally published with a transport. If this fails, then the Endpoint is considered failed. The error code in this case is FAILURE_REASON_PUBLISH_FAILED.

160.2.4 Capabilities

160.2.4.1 osgi.implementation Capability

The Jakarta™ XML Web Services Whiteboard Implementation bundle must provide the osgi.implementation capability with the name WEBSERVICE_IMPLEMENTATION. This capability can be used by provisioning tools and during resolution to ensure that a Web Services Whiteboard implementation is present. The capability must also declare a uses constraint for the org.osgi.service.webservice package and provide the version of this specification:

Provide-Capability: osgi.implementation;
 osgi.implementation=osgi.webservice";
 uses:="jakarta.xml.ws.handler,jakarta.xml.ws";
 version:Version="???"

The RequireWebserviceWhiteboard annotation can be used to require this capability.

This capability must follow the rules defined for the osgi.implementation Namespace.

160.2.4.2 osgi.service Capability

The bundle providing the Jakarta™ XML Web Services Whiteboard service must provide capabilities in the osgi.service namespace representing the Runtime Service it is required to register. This capability must also declare uses constraints for the relevant service packages:

Provide-Capability: osgi.service;
 objectClass:List<String>="org.osgi.service.webservice.runtime.WebserviceServiceRuntime";
 uses:="org.osgi.service.webservice.runtime,org.osgi.service.webservice.runtime.dto"

This capability must follow the rules defined for the osgi.service Namespace.

160.2.5 org.osgi.service.webservice.runtime

Version 1.0

Jakarta Web Services Runtime Package Version 1.0.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.service.webservice.runtime; version="[1.0,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.service.webservice.runtime; version="[1.0,1.1)"

160.2.5.1 Summary

  • WebserviceServiceRuntime - The JakartarsServiceRuntime service represents the runtime information of a Jakarta RESTful Web Services Whiteboard implementation, it provides access to DTOs representing the current state of the service.

160.2.5.2 public interface WebserviceServiceRuntime

The JakartarsServiceRuntime service represents the runtime information of a Jakarta RESTful Web Services Whiteboard implementation, it provides access to DTOs representing the current state of the service.

Thread-safe

Consumers of this API must not implement this type

160.2.5.2.1 public RuntimeDTO getRuntimeDTO()

Return the runtime DTO representing the current state.

The runtime DTO.

160.2.6 org.osgi.service.webservice.runtime.dto

Version 1.0

Jakarta Web Services Runtime DTO Package Version 1.0.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.service.webservice.runtime.dto; version="[1.0,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.service.webservice.runtime.dto; version="[1.0,1.1)"

160.2.6.1 Summary

  • EndpointDTO - The EndpointDTO describes the current state of an endoint implementor known to the service runtime

  • FailedDTO - Base class representing a failure with a code and optional message

  • FailedEndpointDTO - The EndpointDTO describes the current state of an endoint implementor known to the service runtime

  • FailedHandlerDTO - Represents a handler currently known to the webservice runtime but can't be used to a failure

  • HandlerDTO - Represents a handler currently known to the webservice runtime

  • RuntimeDTO - Represents the state of a Jakarta Webservice Runtime.

160.2.6.2 public class EndpointDTO
extends DTO

The EndpointDTO describes the current state of an endoint implementor known to the service runtime

160.2.6.2.1 public String address

The full resolved address this endpoint is published to This value is never null.

160.2.6.2.2 public HandlerDTO[] handlers

Returns all handlers that are bound to this endpoint, the returned array may be empty.

160.2.6.2.3 public ServiceReferenceDTO implementor

The DTO for the corresponding implementor that created this endpoint. This value is never null.

160.2.6.2.4 public EndpointDTO()

160.2.6.3 public class FailedDTO
extends DTO

Base class representing a failure with a code and optional message

160.2.6.3.1 public static final int FAILURE_REASON_SERVICE_NOT_GETTABLE = 1

The service is registered in the service registry but getting the service fails as it returns null.

160.2.6.3.2 public static final int FAILURE_REASON_UNKNOWN = 0

Failure reason is unknown.

160.2.6.3.3 public int failureCode

Contains a code to indicate why the handler failed

160.2.6.3.4 public String failureMessage

Contains a message that describes the failure further, might be null in case there is no such message available

160.2.6.3.5 public FailedDTO()

160.2.6.4 public class FailedEndpointDTO
extends FailedDTO

The EndpointDTO describes the current state of an endoint implementor known to the service runtime

160.2.6.4.1 public static final int FAILURE_REASON_CREATE_FAILED = 200

Transforming the endpoint implementor into a JAX-WS endpoint failed

160.2.6.4.2 public static final int FAILURE_REASON_PUBLISH_FAILED = 203

publishing then endpoint to the transport failed

160.2.6.4.3 public static final int FAILURE_REASON_SET_HANDLER_FAILED = 202

There are matching handlers for this endpoint but an error in the configuration of the handler chain occurred

160.2.6.4.4 public static final int FAILURE_REASON_SET_HANDLER_NOT_SUPPORTED = 201

There are matching handlers for this endpoint but setting a handler chain is not supported. This may be done to avoid any overriding of a pre-configured handler chain.

160.2.6.4.5 public ServiceReferenceDTO implementor

The DTO for the corresponding implementor that created this endpoint. This value is never null.

160.2.6.4.6 public FailedEndpointDTO()

160.2.6.5 public class FailedHandlerDTO
extends FailedDTO

Represents a handler currently known to the webservice runtime but can't be used to a failure

160.2.6.5.1 public static final int FAILURE_REASON_INVALID_FILTER = 101

The registered service specifies an invalid filter "osgi.service.webservice.handler.filter" property, this includes:

  • The property is not of type String

  • The property can not be parsed as a valid OSGi Filter

160.2.6.5.2 public static final int FAILURE_REASON_NO_MATCHING_ENDPOINT = 100

No matching endpoint.

160.2.6.5.3 public ServiceReferenceDTO serviceReference

The service reference of the handler, is never null.

160.2.6.5.4 public FailedHandlerDTO()

160.2.6.6 public class HandlerDTO
extends DTO

Represents a handler currently known to the webservice runtime

160.2.6.6.1 public ServiceReferenceDTO serviceReference

The service reference of the handler, is never null.

160.2.6.6.2 public HandlerDTO()

160.2.6.7 public class RuntimeDTO
extends DTO

Represents the state of a Jakarta Webservice Runtime.

Not Thread-safe

160.2.6.7.1 public EndpointDTO[] endpoints

Returns the representations of the Web Services endpoints currently registered, The returned array may be empty.

160.2.6.7.2 public FailedEndpointDTO[] failedEndpoints

Returns the representations of the Web Services endpoints currently known but failed to register, The returned array may be empty.

160.2.6.7.3 public FailedHandlerDTO[] failedHandlers

Returns all handlers that are known but not currently bound to an endpoint, the returned array may be empty.

160.2.6.7.4 public HandlerDTO[] handlers

Returns all handlers that are known and bound to an endpoint, the returned array may be empty.

160.2.6.7.5 public ServiceReferenceDTO serviceReference

Returns the current service reference under that the runtime is registered

160.2.6.7.6 public RuntimeDTO()

160.2.7 org.osgi.service.webservice.whiteboard

Version 1.0

Jakarta Web Services Whiteboard Package Version 1.0.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.service.webservice.whiteboard; version="[1.0,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.service.webservice.whiteboard; version="[1.0,1.1)"

160.2.7.1 Summary

160.2.7.2 public class WebserviceWhiteboardConstants

Defines standard constants for the Jakarta Web Services Whiteboard services.

160.2.7.2.1 public static final String WEBSERVICE = "osgi.service.webservice"

Base namespace for the Webservice Whiteboard specification

160.2.7.2.2 public static final String WEBSERVICE_ENDPOINT_ADDRESS = "osgi.service.webservice.endpoint.address"

property that defines the address to use where endpoints should be published

160.2.7.2.3 public static final String WEBSERVICE_ENDPOINT_IMPLEMENTOR = "osgi.service.webservice.endpoint.implementor"

property used to mark a service as an endpoint implementor

160.2.7.2.4 public static final String WEBSERVICE_ENDPOINT_PREFIX = "osgi.service.webservice.endpoint."

Prefix used for properties of an endpoint implementor

160.2.7.2.5 public static final String WEBSERVICE_HANDLER_EXTENSION = "osgi.service.webservice.handler.extension"

property to define that a handler registered as a service must be considered by the whiteboard

160.2.7.2.6 public static final String WEBSERVICE_HANDLER_FILTER = "osgi.service.webservice.handler.filter"

property to define a filter that allows handlers to select a given endpoint as their target

160.2.7.2.7 public static final String WEBSERVICE_HANDLER_PREFIX = "osgi.service.webservice.handler."

Prefix used for properties of an message handler implementor

160.2.7.2.8 public static final String WEBSERVICE_HTTP_ENDPOINT_PREFIX = "osgi.service.webservice.endpoint.http."

prefix used for properties related to the http transport

160.2.7.2.9 public static final String WEBSERVICE_IMPLEMENTATION = "osgi.webservice"

Specification namesüace

160.2.7.2.10 public static final String WEBSERVICE_PREFIX = "osgi.service.webservice."

Base prefix used in component property types

160.2.7.2.11 public static final String WEBSERVICE_SPECIFICATION_VERSION = "1.0"

Specification version

160.2.8 org.osgi.service.webservice.whiteboard.annotations

Version 1.0

Jakarta Web Services Whiteboard Annotations Package Version 1.0.

This package contains annotations that can be used to require the Jakarta RESTful Web Services Whiteboard implementation.

Bundles should not normally need to import this package as the annotations are only used at build-time.

160.2.8.1 Summary

160.2.8.2 @RequireWebserviceWhiteboard

Annotation that can be added to a type or package to indicate it requires the soap whiteboard extender

CLASS

TYPE, PACKAGE

160.2.9 org.osgi.service.webservice.whiteboard.propertytypes

Version 1.0

Jakarta Web Services Whiteboard Package Version 1.0.

This package contains annotations that can be used to require the Jakarta RESTful Web Services Whiteboard implementation.

Bundles should not normally need to import this package as the annotations are only used at build-time.

160.2.9.1 Summary

  • HttpWhiteboardEndpoint - Annotation that can be used to mark a service component as an object that should be considered by the SOAP Whiteboard Extender using http on the transport level.

  • WhiteboardEndpoint - Annotation that can be used to mark a service component as an object that should be considered by the SOPA Whiteboard Extender specifying a default address

  • XmlWsHandler - Component property type to mark a Handler to be considered by the Jakarta XML Webservices Whiteboard Runtime

160.2.9.2 @HttpWhiteboardEndpoint

Annotation that can be used to mark a service component as an object that should be considered by the SOAP Whiteboard Extender using http on the transport level.

CLASS

TYPE

160.2.9.2.1 String contextpath

the http contextpath under that the endpoint should be registered where / represents the context root

160.2.9.2.2 String PREFIX_ = "osgi.service.webservice.endpoint.http."

prefix used for component properties

160.2.9.3 @WhiteboardEndpoint

Annotation that can be used to mark a service component as an object that should be considered by the SOPA Whiteboard Extender specifying a default address

CLASS

TYPE

160.2.9.3.1 boolean implementor default true

true if this is an implementor for the soap whiteboard, false otherwise, can be used to switch an implementation on/off

160.2.9.3.2 String address default ""

A URI specifying the address and transport/protocol to use, this will be passed to the jakarta.xml.ws.Endpoint.publish(String), if the address is empty, it is assumed that there is some other way of specify the address for example using HttpWhiteboardEndpoint annotation

the address under which this endpoint should be registered

160.2.9.3.3 String PREFIX_ = "osgi.service.webservice.endpoint."

prefix used for component properties

160.2.9.4 @XmlWsHandler

Component property type to mark a Handler to be considered by the Jakarta XML Webservices Whiteboard Runtime

CLASS

TYPE

160.2.9.4.1 boolean extension default true

Marks this component as to be considered by the whiteboard extender

true

160.2.9.4.2 String filter default ""

the filter to select an endpoint must be a valid OSGi filter, the empty string is treated as if the property is not defined and should match any endpoint

160.2.9.4.3 String PREFIX_ = "osgi.service.webservice.handler."

prefix used for component properties

160.2.10 References

[8] SOAP Protocol https://www.w3.org/TR/soap/

[9] Web Services Description Language (WSDL) https://www.w3.org/TR/wsdl20/

[10] Portable Java Contract Definitions https://docs.osgi.org/reference/portable-java-contracts.html