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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(org.apache.synapse.util.resolver.ResourceMap resourceMap, org.apache.synapse.config.SynapseConfiguration synCfg, String wsdlKey) voidinit(org.apache.synapse.util.resolver.ResourceMap resourceMap, org.apache.synapse.config.SynapseConfiguration synCfg, List<org.apache.synapse.mediators.Value> schemaRegKeys) resolveEntity(String targetNamespace, String schemaLocation, String baseUri) Resolve a schema import.Used in validate mediator to validate the schemas
-
Constructor Details
-
RegistryXmlSchemaURIResolver
public RegistryXmlSchemaURIResolver()
-
-
Method Details
-
init
public void init(org.apache.synapse.util.resolver.ResourceMap resourceMap, org.apache.synapse.config.SynapseConfiguration synCfg, String wsdlKey) - Specified by:
initin interfaceorg.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:
initin interfaceorg.apache.synapse.util.resolver.UserDefinedXmlSchemaURIResolver
-
resolveEntity
Resolve a schema import. This method will first attempt to resolve the location using the configuredResourceMapobject. If this fails (because noResourceMapis configured or becauseResourceMap.resolve(SynapseConfiguration, String)returns null, it will resolve the location usingSynapseConfigUtils.resolveRelativeURI(String, String).- Specified by:
resolveEntityin interfaceorg.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:
resolveResourcein interfaceLSResourceResolver- 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.
-