org.wso2.carbon.mediation.initializer
Class RegistryXmlSchemaURIResolver
java.lang.Object
org.wso2.carbon.mediation.initializer.RegistryXmlSchemaURIResolver
- All Implemented Interfaces:
- org.apache.synapse.util.resolver.UserDefinedXmlSchemaURIResolver, org.apache.ws.commons.schema.resolver.URIResolver, LSResourceResolver
public class RegistryXmlSchemaURIResolver
- extends Object
- implements org.apache.synapse.util.resolver.UserDefinedXmlSchemaURIResolver
Adapting the schemas' Relativepath to the registry actual path
|
Method Summary |
void |
init(org.apache.synapse.util.resolver.ResourceMap resourceMap,
org.apache.synapse.config.SynapseConfiguration synCfg,
List<org.apache.synapse.mediators.Value> schemaRegKeys)
|
void |
init(org.apache.synapse.util.resolver.ResourceMap resourceMap,
org.apache.synapse.config.SynapseConfiguration synCfg,
String wsdlKey)
|
InputSource |
resolveEntity(String targetNamespace,
String schemaLocation,
String baseUri)
Resolve a schema import. |
LSInput |
resolveResource(String type,
String namespaceURI,
String publicId,
String systemId,
String baseURI)
Used in validate mediator to validate the schemas |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegistryXmlSchemaURIResolver
public RegistryXmlSchemaURIResolver()
init
public void init(org.apache.synapse.util.resolver.ResourceMap resourceMap,
org.apache.synapse.config.SynapseConfiguration synCfg,
String wsdlKey)
- Specified by:
init in interface org.apache.synapse.util.resolver.UserDefinedXmlSchemaURIResolver
init
public void init(org.apache.synapse.util.resolver.ResourceMap resourceMap,
org.apache.synapse.config.SynapseConfiguration synCfg,
List<org.apache.synapse.mediators.Value> schemaRegKeys)
- Specified by:
init in interface org.apache.synapse.util.resolver.UserDefinedXmlSchemaURIResolver
resolveEntity
public InputSource resolveEntity(String targetNamespace,
String schemaLocation,
String baseUri)
- Resolve a schema import.
This method will first attempt to resolve the location using the
configured
ResourceMap object. If this fails (because no
ResourceMap is
configured or because
ResourceMap.resolve(SynapseConfiguration, String) returns null,
it will resolve the location using
SynapseConfigUtils.resolveRelativeURI(String, String).
- Specified by:
resolveEntity in interface org.apache.ws.commons.schema.resolver.URIResolver
resolveResource
public LSInput resolveResource(String type,
String namespaceURI,
String publicId,
String systemId,
String baseURI)
- Used in validate mediator to validate the schemas
- Specified by:
resolveResource in interface LSResourceResolver
- Parameters:
type - The type of the resource being resolved. For XML [XML 1.0]
resources (i.e. entities), applications must use the value
"http://www.w3.org/TR/REC-xml". For XML Schema [XML Schema
Part 1] , applications must use the value
"http://www.w3.org/2001/XMLSchema". Other types of resources
are outside the scope of this specification and therefore
should recommend an absolute URI in order to use this method.namespaceURI - The namespace of the resource being resolved, e.g. the
target namespace of the XML Schema [XML Schema Part 1] when
resolving XML Schema resources.publicId - The public identifier of the external entity being
referenced, or null if no public identifier was supplied or if
the resource is not an entity.systemId - The system identifier, a URI reference [IETF RFC 2396], of
the external resource being referenced, or null if no system
identifier was supplied.baseURI - The absolute base URI of the resource being parsed, or null
if there is no base URI.
- Returns:
- A LSInput,
object describing the new input source, or null to
request that the parser open a regular URI connection to the
resource.
Copyright © 2015 WSO2. All rights reserved.