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 Constructor Description RegistryXmlSchemaURIResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(org.apache.synapse.util.resolver.ResourceMap resourceMap, org.apache.synapse.config.SynapseConfiguration synCfg, String wsdlKey)
void
init(org.apache.synapse.util.resolver.ResourceMap resourceMap, org.apache.synapse.config.SynapseConfiguration synCfg, List<org.apache.synapse.mediators.Value> schemaRegKeys)
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
-
-
-
Method Detail
-
init
public void init(org.apache.synapse.util.resolver.ResourceMap resourceMap, org.apache.synapse.config.SynapseConfiguration synCfg, String wsdlKey)
- Specified by:
init
in 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:
init
in interfaceorg.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 configuredResourceMap
object. If this fails (because noResourceMap
is configured or becauseResourceMap.resolve(SynapseConfiguration, String)
returns null, it will resolve the location usingSynapseConfigUtils.resolveRelativeURI(String, String)
.- Specified by:
resolveEntity
in 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:
resolveResource
in 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.
-
-