Package com.sun.xml.ws.wsdl.writer
Interface DocumentLocationResolver
-
public interface DocumentLocationResolverResolves relative references among the metadata(WSDL, schema) documents.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.Usage Example 1
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"/>
- Author:
- Jitendra Kotamraju
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetLocationFor(String namespaceURI, String systemId)Produces a relative reference from one document to another.
-
-
-
Method Detail
-
getLocationFor
@Nullable String getLocationFor(String namespaceURI, String systemId)
Produces a relative reference from one document to another.- Parameters:
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/@schemaLocation- 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 the document will produce a "implicit reference" (for example, <xs:import> without the @schemaLocation attribute, etc).
-
-