public interface DocumentLocationResolver
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.
Say: http://localhost/hello?wsdl has reference to
<xsd:import namespace="urn:test:types" schemaLocation="http://localhost/hello?xsd=1"/>
Using this class, it is possible to write A.wsdl to a local filesystem with a local file schema import.
<xsd:import namespace="urn:test:types" schemaLocation="hello.xsd"/>
Modifier and Type | Method and Description |
---|---|
String |
getLocationFor(String namespaceURI,
String systemId)
Produces a relative reference from one document to another.
|
@Nullable String getLocationFor(String namespaceURI, String systemId)
namespaceURI
- The namespace urI for the referenced document.
for e.g. wsdl:import/@namespace, xsd:import/@namespacesystemId
- The location value for the referenced document.
for e.g. wsdl:import/@location, xsd:import/@schemaLocationcurrent
to refer to
referenced
. This can be a relative URL as well as
an absolute. If null is returned, then the document
will produce a "implicit reference" (for example, <xs:import>
without the @schemaLocation attribute, etc).Copyright © 2015 Oracle Corporation. All rights reserved.