Interface DocumentAddressResolver
-
public interface DocumentAddressResolverResolves relative references amongSDDocuments.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 theSDDocumentcan correctly produce references to other documents.This mechanism allows the user of
WSEndpointto assign logical URLs to eachSDDocument(which is often necessarily done in a transport-dependent way), and then serve description documents.Usage Example 1
HTTP servlet transport chose to expose those metadata documents to HTTP GET requests where each
SDDocumentis identified by a simple query string "?ID". (HTTP servlet transport assigns such IDs by itself.)In this nameing scheme, when
SDDocumentX refers toSDDocumentY, it can put a reference as "?IDofY". By implementingDocumentAddressResolverit can do so.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetRelativeAddressFor(SDDocument current, SDDocument referenced)Produces a relative reference from one document to another.
-
-
-
Method Detail
-
getRelativeAddressFor
@Nullable String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced)
Produces a relative reference from one document to another.- Parameters:
current- The document that is being generated.referenced- The document that is referenced.- Returns:
- The reference to be put inside
currentto refer toreferenced. This can be a relative URL as well as an absolute. If null is returned, then theSDDocumentwill produce a "implicit reference" (for example, <xs:import> without the @schemaLocation attribute, etc).
-
-