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 "Arthur Ryman (JIRA)" <xe...@xml.apache.org> on 2005/03/28 21:49:23 UTC

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

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


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

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ 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


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

Posted by "Arthur Ryman (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1051?page=comments#action_61670 ]
     
Arthur Ryman commented on XERCESJ-1051:
---------------------------------------

Sandy Gao has analysed the test case and pointed out that the full schema contained a wildcard so there was in fact no error in the schema. Xerces is behaving correctly. I'll close this.

> 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


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

Posted by "Arthur Ryman (JIRA)" <xe...@xml.apache.org>.
     [ 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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


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

Posted by "Arthur Ryman (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1051?page=comments#action_61666 ]
     
Arthur Ryman commented on XERCESJ-1051:
---------------------------------------

I am not appending the failing test case. Here is the full base namespace: wsdl20.xsd.
<?xml version='1.0' encoding='UTF-8'?>
<!-- $Id: wsdl20.xsd,v 1.3 2005/02/03 18:46:32 aryman Exp $ -->
<!-- 
   W3C XML Schema defined in the Web Services Description (WSDL)
    Version 2.0 specification
     http://www.w3.org/TR/wsdl20

   Copyright (c) 2004 World Wide Web Consortium,
  
   (Massachusetts Institute of Technology, European Research Consortium for
   Informatics and Mathematics, Keio University). All Rights Reserved. This
   work is distributed under the W3C(r) Software License [1] in the hope that
   it will be useful, but WITHOUT ANY WARRANTY; without even the implied
   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  
   [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
-->

<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
           targetNamespace='http://www.w3.org/2004/08/wsdl'
           xmlns:wsdl='http://www.w3.org/2004/08/wsdl'
           elementFormDefault='qualified'>

  <xs:complexType name='DocumentationType' mixed='true' >
    <xs:sequence>
      <xs:any processContents='lax' minOccurs='0' maxOccurs='unbounded' />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name='DocumentedType' >
    <xs:annotation>
      <xs:documentation>
      This type is extended by component types to allow them to be documented.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name='documentation' type='wsdl:DocumentationType' minOccurs='0' />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name='ExtensibleDocumentedType' abstract='true' >
    <xs:annotation>
      <xs:documentation>
      This type is extended by component types to allow 
      attributes from other namespaces to be added.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base='wsdl:DocumentedType' >
	    <xs:anyAttribute namespace='##other' processContents='lax' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- definitions element decl and type def -->
  <xs:element name='description' type='wsdl:DescriptionType' >
    <xs:unique name='interface' >
      <xs:selector xpath='wsdl:interface' />
      <xs:field xpath='@name' />
    </xs:unique>
    <xs:unique name='binding' >
      <xs:selector xpath='wsdl:binding' />
      <xs:field xpath='@name' />
    </xs:unique>
    <xs:unique name='service' >
      <xs:selector xpath='wsdl:service' />
      <xs:field xpath='@name' />
    </xs:unique>
  </xs:element>

  <xs:complexType name='DescriptionType' >
    <xs:annotation>
      <xs:documentation>
        Please refer to the WSDL 2.0 specification for
	additional constraints on the contents of this type.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element ref='wsdl:import' />
          <xs:element ref='wsdl:include' />
          <xs:element ref='wsdl:types'/>
          <xs:element ref='wsdl:interface' />
	  <xs:element ref='wsdl:binding' />
	  <xs:element ref='wsdl:service' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
	<xs:attribute name='targetNamespace' type='xs:anyURI' use='required' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- types for import and include elements -->
  <xs:element name='import' type='wsdl:ImportType' />
  <xs:complexType name='ImportType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:attribute name='namespace' type='xs:anyURI' use='required' />
        <xs:attribute name='location' type='xs:anyURI' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name='include' type='wsdl:IncludeType' />
  <xs:complexType name='IncludeType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:attribute name='location' type='xs:anyURI' use='required' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name='types' type='wsdl:TypesType' />
  <xs:complexType name='TypesType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
	    <xs:sequence>
	      <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded' />
	    </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- parts related to wsdl:interface -->
  <xs:element name='interface' type='wsdl:InterfaceType' >
	<xs:unique name='operation' >
	  <xs:selector xpath='wsdl:operation' />
	  <xs:field xpath='@name' />
	</xs:unique>
	<xs:unique name='fault' >
	  <xs:selector xpath='wsdl:fault' />
	  <xs:field xpath='@name' />
	</xs:unique>
  </xs:element>
  <xs:complexType name='InterfaceType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='operation' type='wsdl:InterfaceOperationType' />
          <xs:element name='fault' type='wsdl:InterfaceFaultType' />
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='name' type='xs:NCName' use='required' />
        <xs:attribute name='extends' use='optional' >
		  <xs:simpleType>
		    <xs:list itemType='xs:QName' />
		  </xs:simpleType>
	</xs:attribute>
        <xs:attribute name='styleDefault' use='optional'>
		  <xs:simpleType>
		    <xs:list itemType='xs:anyURI' />
		  </xs:simpleType>
	</xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name='InterfaceOperationType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='input' type='wsdl:MessageRefType' />
          <xs:element name='output' type='wsdl:MessageRefType' />
          <xs:element name='infault' type='wsdl:MessageRefFaultType' />
          <xs:element name='outfault' type='wsdl:MessageRefFaultType' />
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='name' type='xs:NCName' use='required' />
        <xs:attribute name='pattern' type='xs:anyURI' use='required' />
        <xs:attribute name='style' type='xs:anyURI' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name='MessageRefType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='messageLabel' type='xs:NCName' use='optional' />
        <xs:attribute name='element' type='wsdl:ElementReferenceType' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="ElementReferenceType">
    <xs:union memberTypes="xs:QName">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="#any"/>
          <xs:enumeration value="#none"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>

  <xs:complexType name='MessageRefFaultType'>
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='ref' type='xs:QName' use='required' />
        <xs:attribute name='messageLabel' type='xs:NCName' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name='InterfaceFaultType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='name' type='xs:NCName' use='required' />
        <xs:attribute name='element' type='xs:QName' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name='feature' type='wsdl:FeatureType' />
  <xs:complexType name='FeatureType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='uri' type='xs:QName' use='required' />
        <xs:attribute name='required' type='xs:boolean' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name='property' type='wsdl:PropertyType' />
  <xs:complexType name='PropertyType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:sequence>
          <xs:choice minOccurs="0">
            <xs:element name='value' type='xs:anyType' />
            <xs:element name='constraint' type='xs:QName' />
          </xs:choice>
          <xs:any namespace='##other'
                  processContents='lax' 
                  minOccurs='0'
                  maxOccurs='unbounded' />
        </xs:sequence>
        <xs:attribute name='uri' type='xs:QName' use='required' />
        <xs:attribute name='required' type='xs:boolean' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- types related to wsdl:binding -->
  <xs:element name='binding' type='wsdl:BindingType' />
  <xs:complexType name='BindingType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='operation' type='wsdl:BindingOperationType' />
          <xs:element name='fault' type='wsdl:BindingFaultType' />
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='name' type='xs:NCName' use='required' />
        <xs:attribute name='interface' type='xs:QName' use='optional' />
        <xs:attribute name='type' type='xs:anyURI' use='required' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name='BindingOperationType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='input' type='wsdl:BindingOperationMessageType' />
          <xs:element name='output' type='wsdl:BindingOperationMessageType' />
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='ref' type='xs:QName' use='required' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name='BindingOperationMessageType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='messageLabel' type='xs:NCName' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name='BindingFaultType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='ref' type='xs:QName' use='required' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- types related to service -->
  <xs:element name='service' type='wsdl:ServiceType' >
	<xs:unique name='endpoint' >
	  <xs:selector xpath='wsdl:endpoint' />
	  <xs:field xpath='@name' />
	</xs:unique>
  </xs:element>
  <xs:complexType name='ServiceType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='1' maxOccurs='unbounded' >
          <xs:element name='endpoint' type='wsdl:EndpointType' />
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='name' type='xs:NCName' use='optional' />
        <xs:attribute name='interface' type='xs:QName' use='required' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name='EndpointType' >
    <xs:complexContent>
      <xs:extension base='wsdl:ExtensibleDocumentedType' >
        <xs:choice minOccurs='0' maxOccurs='unbounded' >
          <xs:element name='feature' type='wsdl:FeatureType' />
          <xs:element name='property' type='wsdl:PropertyType' />
          <xs:any namespace='##other' processContents='lax' />
        </xs:choice>
        <xs:attribute name='name' type='xs:NCName' use='required' />
        <xs:attribute name='binding' type='xs:QName' use='required' />
        <xs:attribute name='address' type='xs:anyURI' use='optional' />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:attribute name='required' type='xs:boolean' />

  <xs:complexType name='ExtensibilityElement' abstract='true' >
    <xs:annotation>
	  <xs:documentation>
	  This abstract type is intended to serve as the base type for
      extensibility elements. It includes the wsdl:required attribute
      which it is anticipated will be used by most extension elements
	  </xs:documentation>
	</xs:annotation>
    <xs:attribute ref='wsdl:required' use='optional' />
  </xs:complexType>

</xs:schema>

I'll append the failing dervived namespace next.

> 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