public interface DocumentAddressResolver
SDDocument
s.
This interface is implemented by the caller of
SDDocument.writeTo(com.sun.xml.ws.api.server.PortAddressResolver, com.sun.xml.ws.api.server.DocumentAddressResolver, java.io.OutputStream)
method so
that the SDDocument
can correctly produce references
to other documents.
This mechanism allows the user of WSEndpoint
to
assign logical URLs to each SDDocument
(which is often
necessarily done in a transport-dependent way), and then
serve description documents.
HTTP servlet transport chose to expose those metadata documents
to HTTP GET requests where each SDDocument
is identified
by a simple query string "?ID". (HTTP servlet transport
assigns such IDs by itself.)
In this nameing scheme, when SDDocument
X refers to
SDDocument
Y, it can put a reference as "?IDofY".
By implementing DocumentAddressResolver
it can do so.
Modifier and Type | Method and Description |
---|---|
String |
getRelativeAddressFor(SDDocument current,
SDDocument referenced)
Produces a relative reference from one document to another.
|
@Nullable String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced)
current
- The document that is being generated.referenced
- The document that is referenced.current
to refer to
referenced
. This can be a relative URL as well as
an absolute. If null is returned, then the SDDocument
will produce a "implicit reference" (for example, <xs:import>
without the @schemaLocation attribute, etc).Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.