You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Thébault, Médérick" <Me...@brittany-ferries.fr> on 2002/12/05 15:42:50 UTC
Xerces1.4.4 and xerces 2.x
Hello,
Here i sthe deal. Here are two xsds.
First
<xs:schema targetNamespace="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:response="http://myhost/TruckTrace"
xmlns:request="http://myhost/TruckTrace" elementFormDefault="qualified"
attributeFormDefault="qualified">
<xs:import namespace="http://myhost/TruckTrace"
schemaLocation="TruckTraceRequest.xsd"/>
<xs:import namespace="http://myhost/TruckTrace"
schemaLocation="TruckTraceResponse.xsd"/>
<xs:element name="Envelope">
<xs:complexType>
<xs:sequence>
<xs:element name="Header"
type="SOAP-ENV:HeaderType" form="qualified" minOccurs="0"/>
<xs:element name="Body"
form="qualified">
<xs:complexType>
<xs:choice>
<xs:element
ref="request:truckEnqui"/>
<xs:element
ref="response:truckResponse"/>
<xs:element
name="Fault" type="SOAP-ENV:FaultType"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="encodingStyle"
use="optional" fixed="http://schemas.xmlsoap.org/soap/encoding/"/>
</xs:complexType>
</xs:element>
<xs:complexType name="HeaderType">
<xs:sequence>
<xs:any namespace="##other"
processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other"
processContents="lax"/>
</xs:complexType>
<xs:complexType name="FaultType">
<xs:sequence>
<xs:element name="faultcode" type="xs:QName"/>
<xs:element name="faultstring"
type="xs:string"/>
<xs:element name="faultfactor" type="xs:anyURI"
minOccurs="0"/>
<xs:element name="detail" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:any
namespace="##any" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute
namespace="##any" processContents="lax"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
and second
<xs:schema targetNamespace="http://myhost/TruckTrace"
xmlns="http://myhost/TruckTrace"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="truckResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="result"
type="resultType" form="unqualified" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="resultNumber" type="xs:int"
use="required" form="unqualified"/>
</xs:complexType>
</xs:element>
<xs:complexType name="resultType">
.....
</xs:complexType>
</xs:schema>
With our words and what we understood, the first is referencing the
second.
With xerces 1.4.4, the parser that we implemented does its job
correctly. It has the following features :
http://apache.org/xml/features/validation/schema-full-checking
http://xml.org/sax/features/validation
http://apache.org/xml/features/validation/schema
http://xml.org/sax/features/namespaces
But with xerces 2.2.1 we keep getting this error :
"src-resolve: Cannot resolve the name 'response:truckResponse' to a(n)
element declaration component."
We have no idea where the problem could be, so if you could help....
Regards
Mederick
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Xerces1.4.4 and xerces 2.x
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Try making the schema location in
<import ....>
a full URI of either file: or http: type. Perhaps the relative directory
path isn't working the same way in Xerces 2 as in Xerces 1.
Jeff
----- Original Message -----
From: "Thébault, Médérick" <Me...@brittany-ferries.fr>
To: <xe...@xml.apache.org>
Sent: Thursday, December 05, 2002 6:42 AM
Subject: Xerces1.4.4 and xerces 2.x
Hello,
Here i sthe deal. Here are two xsds.
First
<xs:schema targetNamespace="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:response="http://myhost/TruckTrace"
xmlns:request="http://myhost/TruckTrace" elementFormDefault="qualified"
attributeFormDefault="qualified">
<xs:import namespace="http://myhost/TruckTrace"
schemaLocation="TruckTraceRequest.xsd"/>
<xs:import namespace="http://myhost/TruckTrace"
schemaLocation="TruckTraceResponse.xsd"/>
...
</xs:schema>
With our words and what we understood, the first is referencing the
second.
...
But with xerces 2.2.1 we keep getting this error :
"src-resolve: Cannot resolve the name 'response:truckResponse' to a(n)
element declaration component."
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org