Sto definendo lo schema ma sulla sua validazione in eclissi dà il seguente errore.XSD: Impossibile risolvere il nome 'tipo' a un componente (n) 'definizione del tipo'
src-resolve: Impossibile risolvere il nome 'common: Name' in un componente (n) 'tipo definizione'.
mio schema si presenta come segue:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.mycompany.com/myproject/service/v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.mycompany.com/myproject/service/v1"
xmlns:product="http://www.mycompany.com/otherproject/service/products/v1"
xmlns:common="http://www.mycompany.com/myproject/service/common/v1" elementFormDefault="qualified">
<xsd:import namespace="http://www.mycompany.com/otherproject/service/products/v1" schemaLocation="products_v1.xsd" />
<xsd:import namespace="http://www.mycompany.com/myproject/service/common/v1" schemaLocation="common_v1.xsd" />
<xsd:element name="GetProductRequest" type="tns:GetProductRequest">
<xsd:annotation>
<xsd:documentation>Get Product Request</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="GetProuctRequest">
<xsd:annotation>
<xsd:documentation>Get Product Request</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="ID" type="common:ID" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>ID</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Name" type="common:Name" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Name</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
.....
e common_v1.xsd si presenta come segue
<xsd:schema targetNamespace="http://www.mycompany.com/myproject/service/common/v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.mycompany.com/myproject/service/common/v1"
elementFormDefault="qualified">
<xsd:complexType name="ID">
<xsd:annotation>
<xsd:documentation>ID</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="X" type="xsd:string" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>X</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Y" type="xsd:string" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Y</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Name</xsd:documentation>
</xsd:annotation>
</xsd:element>
......
problema è il mio schema è in grado di risolvere alcuni degli elementi da common_v1.xsd e alcuni no Nel codice sopra comune: ID non dà alcun errore ma comune: Nome dà errore.
Non riesco a capire perché alcuni elementi non sono stati risolti.