[ 
http://issues.apache.org/jira/browse/XERCESJ-1051?page=comments#action_61667 ]
     
Arthur Ryman commented on XERCESJ-1051:
---------------------------------------

Here's the failing derived namespace: reservationDetails.xsd. No error gets 
reported.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
        elementFormDefault="qualified"
        
targetNamespace="http://greath.example.com/2004/schemas/reservationDetails";
        xmlns:tns="http://greath.example.com/2004/schemas/reservationDetails";
        
xmlns:wdetails="http://greath.example.com/2004/services/reservationDetails";
        xmlns:wsdl="http://www.w3.org/2004/08/wsdl";>

        <import namespace="http://www.w3.org/2004/08/wsdl";
                schemaLocation="wsdl20.xsd" />

        <element name="confirmationNumber" type="string" />

        <element name="checkInDate" type="date" />

        <element name="checkOutDate" type="date" />

        <element name="reservationDetails">
                <complexType>
                        <sequence>
                                <element ref="tns:confirmationNumber" />
                                <element ref="tns:checkInDate" />
                                <element ref="tns:checkOutDate" />
                                <element name="roomType" type="string" />
                                <element name="smoking" type="boolean" />
                        </sequence>
                </complexType>
        </element>

        <complexType name="ReservationDetailsEndpointType">
                <complexContent>
                        <restriction base="wsdl:EndpointType">
                                <attribute name="binding" type="QName" 
use="required"
                                        
fixed="wdetails:reservationDetailsSOAPBinding" />
                        </restriction>
                </complexContent>
        </complexType>

        <complexType name="ReservationDetailsServiceType">
                <complexContent>
                        <restriction base="wsdl:ServiceType">
                                <sequence>
                                        <element name="endpoint"
                                                
type="tns:ReservationDetailsEndpointType" />
                                </sequence>
                                <attribute name="interface" type="QName" 
use="required"
                                        
fixed="wdetails:reservationDetailsInterface" />
                        </restriction>
                </complexContent>
        </complexType>

        <element name="reservationDetailsService"
                type="tns:ReservationDetailsServiceType">
                <annotation>
                        <documentation>
                                This element contains a reference to the 
Reservation
                                Details Web Service for this reservation.
                        </documentation>
                </annotation>
        </element>

</schema>

> rcase-NameAndTypeOK.1 Error Not Reported Correctly
> --------------------------------------------------
>
>          Key: XERCESJ-1051
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1051
>      Project: Xerces2-J
>         Type: Bug
>   Components: XML Schema Structures
>     Versions: 2.6.2
>  Environment: Windows XP
>     Reporter: Arthur Ryman

>
> The rcase-NameAndTypeOK.1 error is not being reported correctly for some 
> documents. I created a large schema that used <restruction> incorrectly, but 
> the error was not reported. I cut down the file to the bare minimum, and then 
> the error was reported correctly. The error occurs when you try to restrict a 
> complex type from a different namespace. In the restriction, any <element> 
> refers to the derived namespace, not the base namespace. Here is the simple 
> case where the error is reported correctly:
> Base schema: wsdl20-1.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema";
>       targetNamespace="http://www.w3.org/2004/08/wsdl";
>       xmlns:tns="http://www.w3.org/2004/08/wsdl";
>       elementFormDefault="qualified">
>       <complexType name="ServiceType">
>               <sequence>
>                       <element name="endpoint" type="tns:EndpointType" />
>               </sequence>
>       </complexType>
>       <complexType name="EndpointType">
>               <attribute name="binding" type="QName" />
>       </complexType>
> </schema>
> Derived namespace: reservationDetails-1.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema";
>       elementFormDefault="qualified"
>       
> targetNamespace="http://greath.example.com/2004/schemas/reservationDetails";
>       xmlns:tns="http://greath.example.com/2004/schemas/reservationDetails";
>       
> xmlns:wdetails="http://greath.example.com/2004/services/reservationDetails";
>       xmlns:wsdl="http://www.w3.org/2004/08/wsdl";>
>       <import namespace="http://www.w3.org/2004/08/wsdl";
>               schemaLocation="wsdl20-1.xsd" />
>       <complexType name="ReservationDetailsEndpointType">
>               <complexContent>
>                       <restriction base="wsdl:EndpointType">
>                               <attribute name="binding" type="QName" 
> use="required"
>                                       
> fixed="wdetails:reservationDetailsSOAPBinding" />
>                       </restriction>
>               </complexContent>
>       </complexType>
>       <complexType name="ReservationDetailsServiceType">
>               <complexContent>
>                       <restriction base="wsdl:ServiceType">
>                               <sequence>
>                                       <element name="endpoint"
>                                               
> type="tns:ReservationDetailsEndpointType" />
>                               </sequence>
>                       </restriction>
>               </complexContent>
>       </complexType>
>       <element name="reservationDetailsService"
>               type="tns:ReservationDetailsServiceType">
>               <annotation>
>                       <documentation>
>                               This element contains a reference to the 
> Reservation
>                               Details Web Service for this reservation.
>                       </documentation>
>               </annotation>
>       </element>
> </schema>
> There above case correctly reports the error rcase-NameAndTypeOK.1. I'll 
> append the failing test case after I create this bug.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to