You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2005/03/29 00:09:18 UTC

[jira] Closed: (XERCESJ-1051) rcase-NameAndTypeOK.1 Error Not Reported Correctly

     [ http://issues.apache.org/jira/browse/XERCESJ-1051?page=history ]
     
Michael Glavassevich closed XERCESJ-1051:
-----------------------------------------

    Resolution: Incomplete

By request, closing this JIRA issue.

> 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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org