ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: Using xmlcatalog in schema-validation
Date Sat, 16 Dec 2006 05:52:38 GMT
Hello Caleandro,

you might need to have xml-resolver.jar installed under $ANT_HOME/lib.

The install.html lists this :

resolver.jar 1.1beta or later
xmlcatalog datatype only if support for external catalog files is  
desired
http://xml.apache.org/commons/.

Regards,

Antoine


On Dec 15, 2006, at 8:39 AM, Caleandro wrote:

> Hi Ant users,
>
> I need to validate a Soap-message against a compound schema, (yes!,  
> a very
> common problem today ;-).
> I need to map two components of the schema (of soap-body part) with  
> other
> resources with respect of those declared in  the including schema.
>
> Something like this:
>
> main schema:
>
> <?xml version= "1.0" encoding = "UTF-8" ?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.svimservice.it/Schemas/PDD_SISR/SCATEL/"
> xmlns="http://www.svimservice.it/Schemas/PDD_SISR/SCATEL/"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xsd:include schemaLocation="/SVIM_Schemas/custom_types.xsd"/>   
> (shared
> common components)
> <xsd:include schemaLocation="/SVIM_Schemas/soapFault.xsd"/>     (of  
> same
> target-namespace)
>   <xsd:element  name="getMedicoDiBaseResponse" type =
> "yyy_getMedicoDiBaseResponse">
> .....
>
> for example: the '/SVIM_Schemas/custom_types.xsd' need to be mapped to
> 'D:/other_directory/custom_types.xsd.
>
> I tried using this "xmlcatalog" (that seems correctly parsed during  
> ant
> task):
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!--  Catalogo delle risorse XML utilizzate per la validazione dei  
> messaggi
> SOAP di SIST e PDD-SISR
>                       Creato da Vito Caleandro  - 14 Dicembre 2006 -->
> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" >
> 	<uri name="/SVIM_Schemas/custom_types.xsd"
> uri="D:/other_directory/custom_types.xsd" />
> 	<uri name="/SVIM_Schemas/soapFault.xsd"
> uri="D:/other_directory/soapFault.xsd" />
> </catalog>
>
> The envelope and main body-part schema were normally added, but the  
> ant
> debug messages I got, were always the same (both for 1.6.5 and 1.7.0
> versions and for xmlvalidate or schemavalidate tasks) :
> ...
> resolveEntity: 'null': 'file:/SVIM_Schemas/custom_types.xsd']]></ 
> message>
> No matching catalog entry found, parser will use:
> 'file:/SVIM_Schemas/custom_types.xsd']]></message>
> resolveEntity: 'null': 'file:/SVIM_Schemas/soapFault.xsd']]></message>
> No matching catalog entry found, parser will use:
> 'file:/SVIM_Schemas/soapFault.xsd']]></message>
> ...
>
> Where I do the error?
>
> Thanks to anyone who can help me.
>
> Vito


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message